Skip to content

Commit bc69e4e

Browse files
committed
Additional fixes and refactoring
- ensures exception matching and instanceOf do not load classes (because if the class does not already exist, there is necessarily no match. - class name refactoring to clarify what is an ASTVisitor and what is just a Java2Script helper.
1 parent 2ff4cef commit bc69e4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1462
-1812
lines changed

sources/net.sf.j2s.core/build.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source.. = src/
22
output.. = bin/
33
bin.includes = META-INF/,\
44
.,\
5-
plugin.xml,\
6-
schema/
5+
plugin.xml
6+
-7.38 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20231121063606
1+
20231122080006
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20231121063606
1+
20231122080006

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class CorePlugin extends Plugin {
3131
// if you change the x.x.x number, be sure to also indicate that in
3232
// j2sApplet.js and also (Bob only) update.bat, update-clean.bat
3333

34-
// BH 2023.11.21 -- 5.0.1-v2 adds Java8 syntaxes for try and switch; removes dependency for instanceOf
34+
// BH 2023.11.21 -- 5.0.1-v2 adds Java8 syntaxes for try and switch; removes dependency for instanceOf and exception checking
3535
// BH 2023.11.09 -- 5.0.1-v1 merges Jmol legacy (.j2sjmol) with Java8//11 (.j2s)
3636
// BH 2023.03.29 -- 3.3.1-v7 fixes outer static method call from within lambda expression.
3737
// BH 2023.02.09 -- 3.3.1.v6 fixes j2s.excluded.paths needing /src/xxxx

sources/net.sf.j2s.core/src/j2s/jmol/common/ASTFinalVariable.java renamed to sources/net.sf.j2s.core/src/j2s/jmol/common/FinalVariable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* 2006-12-6
1010
*/
11-
public class ASTFinalVariable {
11+
public class FinalVariable {
1212

1313
/**
1414
* Level of the block
@@ -30,7 +30,7 @@ public class ASTFinalVariable {
3030
*/
3131
String toVariableName;
3232

33-
public ASTFinalVariable(int blockLevel, String variableName, String methodScope) {
33+
public FinalVariable(int blockLevel, String variableName, String methodScope) {
3434
super();
3535
this.blockLevel = blockLevel;
3636
this.variableName = variableName;
@@ -61,7 +61,7 @@ public boolean equals(Object obj) {
6161
return false;
6262
if (getClass() != obj.getClass())
6363
return false;
64-
final ASTFinalVariable other = (ASTFinalVariable) obj;
64+
final FinalVariable other = (FinalVariable) obj;
6565
if (blockLevel != other.blockLevel)
6666
return false;
6767
if (methodScope == null) {

sources/net.sf.j2s.core/src/j2s/jmol/common/IVisitor.java renamed to sources/net.sf.j2s.core/src/j2s/jmol/common/IHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* 2006-12-27
1919
*/
20-
public interface IVisitor {
20+
public interface IHelper {
2121
public StringBuffer getBuffer();
2222
public J2SASTVisitor getVisitor();
2323
public void setVisitor(J2SASTVisitor visitor);

0 commit comments

Comments
 (0)