Skip to content

Commit 7db5958

Browse files
authored
Merge pull request BobHanson#214 from BobHanson/hanson1
J11 upgrade -
2 parents d857002 + f81bf3b commit 7db5958

File tree

18 files changed

+2057
-1390
lines changed

18 files changed

+2057
-1390
lines changed
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-
20230216124208
1+
20230301203155
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-
20230216124208
1+
20230301203155

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,10 +1577,12 @@ private boolean addMethodInvocation(SimpleName javaQualifier, List<?> arguments,
15771577
boolean isPrivateAndNotStatic = isPrivate && !isStatic;
15781578
String privateVar = (isPrivateAndNotStatic ? getPrivateVar(declaringClass, false) : null);
15791579
boolean doLogMethodCalled = (!isPrivate && global_htMethodsCalled != null);
1580-
boolean needBname = (!isStatic && lambdaArity < 0 && (expression == null
1581-
? !areEqual(declaringClass, class_typeBinding)
1580+
boolean needBname = (
1581+
1582+
!isStatic && lambdaArity < 0 && (expression == null
1583+
? !areEqual(declaringClass, class_typeBinding)
15821584
&& !class_typeBinding.isAssignmentCompatible(declaringClass)
1583-
: expression instanceof ThisExpression && ((ThisExpression) expression).getQualifier() != null));
1585+
: expression instanceof ThisExpression && ((ThisExpression) expression).getQualifier() != null) || class_localType == LAMBDA_EXPRESSION);
15841586
String bname = (needBname ? getThisRefOrSyntheticReference(javaQualifier, declaringClass, null) : null);
15851587
// add the qualifier
15861588
int pt = buffer.length();
@@ -4016,7 +4018,8 @@ public boolean visit(ThisExpression node) {
40164018
}
40174019
// xxxx.this.x
40184020
// xxxx.this.foo()
4019-
buffer.append(getThisRefOrSyntheticReference(node, node.resolveTypeBinding(), "this"));
4021+
String bthis = getThisRefOrSyntheticReference(node, node.resolveTypeBinding(), "this");
4022+
buffer.append(bthis);
40204023
return false;
40214024
}
40224025

Binary file not shown.

sources/net.sf.j2s.java.core/src/java/io/ByteArrayOutputStream.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
package java.io;
2727

28+
import java.nio.charset.Charset;
2829
import java.util.Arrays;
2930

3031
/**
@@ -253,6 +254,10 @@ public synchronized String toString(String charsetName)
253254
return new String(buf, 0, count, charsetName);
254255
}
255256

257+
public synchronized String toString(Charset charset) {
258+
return new String(buf, 0, count, charset);
259+
}
260+
256261
/**
257262
* Creates a newly allocated string. Its size is the current size of
258263
* the output stream and the valid contents of the buffer have been

0 commit comments

Comments
 (0)