[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ajdt-dev] Problem with German umlauts in case-tags (AspectJ 1.6.3)
|
Hi list,
i've run over some problems when using german umlauts in a case tag.
Using this code-snippet:
StringBuffer sb = new StringBuffer(100);
for (int i = 0; i < in.length(); i++) {
int c = in.charAt(i);
switch (c) {
case 'ä':
sb.append("(4a)");
break;
case 'ö':
sb.append("(b6)");
break;
case 'ü':
sb.append("(bc)");
break;
case 'Ä':
sb.append("(84)");
break;
case 'Ö':
sb.append("(96)");
break;
case 'Ü':
sb.append("(9c)");
break;
case 'ß':
sb.append("(9f)");
break;
default:
sb.append((char)c);
}
i get this error:
[iajc] info compiling
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:10:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:13:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:16:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:19:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:22:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:25:0::0
Duplicate case
[iajc] error at case '?':
[iajc] ^^^^
[iajc]
/opt/hudson/jobs/es3/workspace/es3/src/net/lacho/r2/b2bweb/util/StringUtil.java:28:0::0
Duplicate case
[iajc] info Compiler took 4670ms
[iajc] MessageHolder: (776 info) (1 warning) (7 error)
If i change the cases to something like
switch (c) {
//case 'ä':
case '\u00e4':
sb.append("(4a)");
break;
the code compiles.
To make it even more odd, if i compile my project in eclipe (with the
modified unicode-tags), i get the following error:
An internal error occurred during: "Delete and update AspectJ markers
for HEAD".
with this stacktrace:
java.lang.NumberFormatException: For input string:
"2~processRow~QResultSet;["
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.<init>(Unknown Source)
at
org.aspectj.asm.internal.JDTLikeHandleProvider.getCount(JDTLikeHandleProvider.java:207)
at
org.aspectj.asm.internal.JDTLikeHandleProvider.createHandleIdentifier(JDTLikeHandleProvider.java:118)
at
org.aspectj.asm.internal.ProgramElement.getHandleIdentifier(ProgramElement.java:555)
at
org.aspectj.asm.internal.ProgramElement.getHandleIdentifier(ProgramElement.java:547)
at org.aspectj.asm.internal.RelationshipMap.get(RelationshipMap.java:63)
at
org.eclipse.ajdt.core.model.AJProjectModelFacade$2.preProcess(AJProjectModelFacade.java:691)
at org.aspectj.asm.HierarchyWalker.process(HierarchyWalker.java:28)
at org.aspectj.asm.internal.ProgramElement.walk(ProgramElement.java:420)
at org.aspectj.asm.HierarchyWalker.process(HierarchyWalker.java:29)
at org.aspectj.asm.internal.ProgramElement.walk(ProgramElement.java:420)
at org.aspectj.asm.HierarchyWalker.process(HierarchyWalker.java:29)
at org.aspectj.asm.internal.ProgramElement.walk(ProgramElement.java:420)
at org.aspectj.asm.HierarchyWalker.process(HierarchyWalker.java:29)
at org.aspectj.asm.internal.ProgramElement.walk(ProgramElement.java:420)
at org.aspectj.asm.HierarchyWalker.process(HierarchyWalker.java:29)
at org.aspectj.asm.internal.ProgramElement.walk(ProgramElement.java:420)
at
org.eclipse.ajdt.core.model.AJProjectModelFacade.getRelationshipsForFile(AJProjectModelFacade.java:689)
at
org.eclipse.ajdt.internal.ui.markers.UpdateAJMarkers.addMarkersForFile(UpdateAJMarkers.java:170)
at
org.eclipse.ajdt.internal.ui.markers.UpdateAJMarkers.addMarkersForProject(UpdateAJMarkers.java:127)
at
org.eclipse.ajdt.internal.ui.markers.UpdateAJMarkers.run(UpdateAJMarkers.java:94)
at
org.eclipse.ajdt.internal.ui.markers.DeleteAndUpdateAJMarkersJob.run(DeleteAndUpdateAJMarkersJob.java:62)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I'm not sure if the two are related because the second error (the one in
eclipse) gives no hint in which file the error occurs. I suppose it's
when weaving aspects from an external jar, but the same jar and the same
code compiles in an ant-task without any problem.
Any hint where i could investigate further?
Cheers
Dirk
-------------------------------------
Lachowski Datensysteme GmbH
Strassburger Platz 25
D-30853 Langenhagen
Fon: +49 511 725353-71
Fax: +49 511 725353-89
Sitz der Gesellschaft: 30853 Langenhagen
Registergericht: Amtsgericht Hannover, HRB 120580
Geschäftsführer: Dirk Lachowski