Skip to content

Commit d010462

Browse files
committed
Transpiler fix for "_" (root) package not in sourceLocation
1 parent e82548c commit d010462

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed
2 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20191105121713
1+
20191105122130
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20191105121713
1+
20191105122130

sources/net.sf.j2s.core/src/net/sf/j2s/core/Java2ScriptCompiler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ boolean compileToJavaScript(IFile javaSource) {
394394
pt = sourceLocation.lastIndexOf("/" + packageName + "/");
395395
if (pt <= 0) {
396396
// also don't allow "" root directory
397-
System.out.println("J2S ignoring bad sourceLocation for package \"" + packageName + "\": " + sourceLocation);
397+
if (!"_".equals(packageName))
398+
System.out.println("J2S ignoring bad sourceLocation for package \"" + packageName + "\": " + sourceLocation);
398399
} else {
399400
String sourceDir = sourceLocation.substring(0, pt);
400401
File src = new File(sourceDir, packageName);

0 commit comments

Comments
 (0)