|
@@ -103,7 +103,13 @@ public class JavaCompiler {
|
103
|
103
|
target.addScript(method);
|
104
|
104
|
|
105
|
105
|
entry.getValue().classWriter.visitEnd();
|
106
|
|
- target.addClass(entry.getKey(), entry.getValue().classWriter.toByteArray());
|
|
106
|
+
|
|
107
|
+ if (target.getClasses().containsKey(entry.getKey())) {
|
|
108
|
+ //TODO Scripts and definitions seem to create the same class. Bad!
|
|
109
|
+ System.err.println("Trying to register " + entry.getKey() + " a 2nd time");
|
|
110
|
+ }else{
|
|
111
|
+ target.addClass(entry.getKey(), entry.getValue().classWriter.toByteArray());
|
|
112
|
+ }
|
107
|
113
|
}
|
108
|
114
|
|
109
|
115
|
return target;
|