View | Details | Raw Unified | Return to bug 109940 | Differences between
and this patch

Collapse All | Expand All

(-)CharacterLiteral.java (-10 / +9 lines)
Lines 265-286 Link Here
265
								throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
265
								throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
266
							}
266
							}
267
							number = (number * 8) + Character.getNumericValue(nextChar);
267
							number = (number * 8) + Character.getNumericValue(nextChar);
268
						}
268
							nextChar = (char) scanner.getNextChar();
269
						nextChar = (char) scanner.getNextChar();
269
							if (nextChar == -1) {
270
						if (nextChar == -1) {
271
							throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
272
						}
273
						if (nextChar != '\'') {
274
							if (!Character.isDigit(nextChar)) {
275
								throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
270
								throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
276
							}
271
							}
277
							number = (number * 8) + Character.getNumericValue(nextChar);
272
							if (nextChar != '\'') {
273
								if (!Character.isDigit(nextChar)) {
274
									throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
275
								}
276
								number = (number * 8) + Character.getNumericValue(nextChar);
277
							}
278
						}
278
						}
279
						value = (char) number;
279
						return (char) number;				
280
					} else {
280
					} else {
281
						throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
281
						throw new IllegalArgumentException("illegal character literal");//$NON-NLS-1$
282
					}
282
					}
283
					break;
284
			}
283
			}
285
			nextChar = (char) scanner.getNextChar();
284
			nextChar = (char) scanner.getNextChar();
286
			if (nextChar == -1) {
285
			if (nextChar == -1) {

Return to bug 109940