Gets a CoderResult object indicating a malformed-input error. @param length the length of the malformed-input. @return a CoderResult object indicating a malformed-input error. @throws IllegalArgumentException if length is non-pos
(int length)
| 110 | * if <code>length</code> is non-positive. |
| 111 | */ |
| 112 | public static synchronized CoderResult malformedForLength(int length) |
| 113 | throws IllegalArgumentException { |
| 114 | if (length > 0) { |
| 115 | Integer key = Integer.valueOf(length); |
| 116 | // synchronized (_malformedErrors) { |
| 117 | // CoderResult r = _malformedErrors.get(key); |
| 118 | // if (null == r) { |
| 119 | CoderResult r = new CoderResult(TYPE_MALFORMED_INPUT, length); |
| 120 | // _malformedErrors.put(key, r); |
| 121 | // } |
| 122 | return r; |
| 123 | // } |
| 124 | } |
| 125 | // niochar.08=The length must be positive: {0}. |
| 126 | throw new IllegalArgumentException(Messages.getString( |
| 127 | "niochar.08", length)); //$NON-NLS-1$ |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Gets a <code>CoderResult</code> object indicating an unmappable |
no test coverage detected