diff options
author | Olivier Thomann | 2011-04-21 14:43:37 +0000 |
---|---|---|
committer | Olivier Thomann | 2011-04-21 14:43:37 +0000 |
commit | a209bfa947ecc1f9f7050d0d851a03f725813152 (patch) | |
tree | 00cb1663e73647e69c22d43d3c58afd83f3476f2 /org.eclipse.jdt.compiler.apt.tests | |
parent | 9221731a3d20320a45d9e6a6337379d8a431c366 (diff) | |
download | eclipse.jdt.core-a209bfa947ecc1f9f7050d0d851a03f725813152.tar.gz eclipse.jdt.core-a209bfa947ecc1f9f7050d0d851a03f725813152.tar.xz eclipse.jdt.core-a209bfa947ecc1f9f7050d0d851a03f725813152.zip |
HEAD - Fix getConstantExpression(..) for byte and short values
Diffstat (limited to 'org.eclipse.jdt.compiler.apt.tests')
-rw-r--r-- | org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java index be01c68572..a03ef8a9ae 100644 --- a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java +++ b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java @@ -611,6 +611,7 @@ public class ElementUtilsProc extends BaseProcessor if (constantExpression == null || constantExpression.charAt(0) != '\"' || constantExpression.charAt(constantExpression.length() - 1) != '\"') { + reportError("Unexpected value for String: " + String.valueOf(constantExpression)); return false; } } else if (constantValue instanceof Character) { @@ -618,11 +619,13 @@ public class ElementUtilsProc extends BaseProcessor if (constantExpression == null || constantExpression.charAt(0) != '\'' || constantExpression.charAt(constantExpression.length() - 1) != '\'') { + reportError("Unexpected value for Character: " + String.valueOf(constantExpression)); return false; } } else { String constantExpression = _elementUtils.getConstantExpression(constantValue); if (constantExpression == null) { + reportError("Constant expression is null"); return false; } } |