Skip to content

Commit 40e4fbf

Browse files
committed
update to fix ClassName::new lambda expressions and missing
TYPE.hashCode()
1 parent 27e99dc commit 40e4fbf

File tree

12 files changed

+16
-7
lines changed

12 files changed

+16
-7
lines changed
Binary file not shown.
-149 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250130183423
1+
20250222160620
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250130183423
1+
20250222160620

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ public class CorePlugin extends Plugin {
2626
* the actual "x.y.z" version is specified in plugin.xml.
2727
*
2828
*/
29-
public static String VERSION = "5.0.1-v4";
29+
public static String VERSION = "5.0.1-v5";
3030

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 2025.02.22 -- 5.0.1-v5 fixes Iterable<IAtom> AtomIterator::new missing [this,null] in generator
3435
// BH 2024.07.14 -- 5.0.1-v4 fixes numerical array initializer using characters ['a','b',...]
3536
// BH 2024.02.22 -- 5.0.1-v3 fixes long extension issue causing MutableBitInteger to miscalculate subtraction(no change in version #)
3637
// BH 2023.11.27 -- 5.0.1-v2 final refactoring and creatiton of J2SUtil

sources/net.sf.j2s.core/src/j2s/swingjs/Java2ScriptVisitor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
// TODO: superclass inheritance for JAXB XmlAccessorType
3232
// TODO: Transpiler bug allows static String name, but JavaScript function().name is read-only and will be "clazz"
3333

34+
//BH 2025.02.22 -- 5.0.1-v5 fixes Iterable<IAtom> AtomIterator::new missing [this,null] in generator
3435
//BH 2024.07.14 -- 5.0.1-v4 fixes numerical array initializer using characters ['a','b',...], but not new int[] { "test".charAt(3) }
3536
//BH 2024.02.22 -- 5.0.1-v3 fixes long extension issue causing MutableBitInteger to miscalculate subtraction(no change in version #)
3637
//BH 2023.11.27 -- 5.0.1-v2 final refactoring and creatiton of J2SUtil
@@ -796,11 +797,12 @@ private void addConstructor(ITypeBinding javaClass,
796797
// javaClass cannot be a lambda expression, because this is Xxxx::new
797798
String key = javaClass.getKey();
798799
String finals = listFinalVariables(package_htClassKeyToVisitedFinalVars.get(key), package_outerFinalKey);
799-
if (finals != null) {
800+
// for Lambda_C we need [this,null], because maybe there are finals expressed elsewhere
801+
//if (finals != null) {
800802
buffer.append("this,").append(finals);
801803
if (params.length() > 0)
802804
buffer.append(",");
803-
}
805+
//}
804806
buffer.append(params).append("]");
805807
} else if (!isDefault) {
806808
IMethodBinding constructorMethodDeclaration = (constructorMethodBinding == null ? null
Binary file not shown.

sources/net.sf.j2s.java.core/src/javajs/util/M4d.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ public void setTranslation(T3 trans) {
336336
* @param v
337337
* the new value
338338
*/
339-
public void setElement(int row, int col, double v) {
339+
@Override
340+
public void setElement(int row, int col, double v) {
340341
if (row < 3 && col < 3) {
341342
set33(row, col, v);
342343
return;
@@ -379,7 +380,8 @@ public void setElement(int row, int col, double v) {
379380
* the column number to be retrieved (zero indexed)
380381
* @return the value at the indexed element
381382
*/
382-
public double getElement(int row, int col) {
383+
@Override
384+
public double getElement(int row, int col) {
383385
if (row < 3 && col < 3)
384386
return get33(row, col);
385387
if (row > 3 || col > 3) {

0 commit comments

Comments
 (0)