Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Transpiler 3.2.4.06 fixes problem with Java 9 multiple resource
  • Loading branch information
hansonr authored and hansonr committed Jan 3, 2019
commit b56d3d082bcb26a167dd8a1663f0e46cc3f32e67
3 changes: 2 additions & 1 deletion sources/net.sf.j2s.core/src/net/sf/j2s/core/CorePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public class CorePlugin extends Plugin {
* register the bundle version properly. So we use VERSION here instead.
*
*/
public static String VERSION = "3.2.4.05";
public static String VERSION = "3.2.4.06";
// BH 1/2/2019 -- 3.2.4.06 fixes try(resources) with more than one resource missing semicolon
// BH 12/13/2018 -- 3.2.4.05 fixes problem with OuterClass.this.foo() not using .apply()
// BH 11/10/2018 -- 3.2.4.04 additional support for JAXB
// BH 11/4/2018 -- 3.2.4.02 broad JAXB support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,7 @@ public boolean visit(TryStatement node) {
ASTNode resource = resources.get(i);
if (resource instanceof VariableDeclarationExpression) {
resource.accept(this);
buffer.append(";");
} else {
// Java 9 -- just a Name.
buffer.append("/* Java 9 resource " + resource + "*/\r\n");
Expand Down Expand Up @@ -4560,13 +4561,13 @@ private String getFinalInnerClassList(String javaClassName) {
String s = getFinalInnerClassList(javaClassName);
if (doCache) {
Integer n = package_htIncludeNames.get(s);
if (n != null)
return "$I$(" + n + ")";
if (!s.endsWith("Exception'")) {
if (n == null && !s.endsWith("Exception'")) {
// count starts at 1, because i$[0] is the list
package_htIncludeNames.put(s, n = new Integer(++package_includeCount[0]));
package_includes.append(package_includeCount[0] == 1 ? ",I$=[[0," : ",").append(s);
}
if (n != null)
return "$I$(" + n + ")";
}
return "Clazz.load(" + s + ")";
}
Expand Down