Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorMarc Khouzam2010-06-17 08:20:39 -0400
committerMarc Khouzam2010-06-17 08:20:39 -0400
commitd417d7f4d6c23fbaf3a988d038b656d9e77ccdd3 (patch)
tree54300a6ab0470cf6f793c83933cc2c9db3073148 /codan
parentea0d692c81c75782f05e4641890398d84138e09b (diff)
downloadorg.eclipse.cdt-d417d7f4d6c23fbaf3a988d038b656d9e77ccdd3.tar.gz
org.eclipse.cdt-d417d7f4d6c23fbaf3a988d038b656d9e77ccdd3.tar.xz
org.eclipse.cdt-d417d7f4d6c23fbaf3a988d038b656d9e77ccdd3.zip
Bug 317075: Wrong text passed to exception
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
index 6e865f0692..b07eb1ea0d 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
@@ -158,19 +158,18 @@ public class MapProblemPreference extends AbstractProblemPreference implements
int token;
try {
token = tokenizer.nextToken();
- String chara = String.valueOf((char) token);
if (token != '{') {
- throw new IllegalArgumentException(chara);
+ throw new IllegalArgumentException(String.valueOf((char) token));
}
while (true) {
token = tokenizer.nextToken();
String key = tokenizer.sval;
token = tokenizer.nextToken();
if (token != '=')
- throw new IllegalArgumentException(chara);
+ throw new IllegalArgumentException(String.valueOf((char) token));
token = tokenizer.nextToken();
if (token != '>')
- throw new IllegalArgumentException(chara);
+ throw new IllegalArgumentException(String.valueOf((char) token));
IProblemPreference desc = getChildDescriptor(key);
if (desc != null && desc instanceof AbstractProblemPreference) {
((AbstractProblemPreference) desc).importValue(tokenizer);
@@ -180,7 +179,7 @@ public class MapProblemPreference extends AbstractProblemPreference implements
if (token == '}')
break;
if (token != ',')
- throw new IllegalArgumentException(chara);
+ throw new IllegalArgumentException(String.valueOf((char) token));
}
} catch (IOException e) {
throw new IllegalArgumentException(e);

Back to the top