Skip to content

Commit c00b0c8

Browse files
authored
Merge pull request #149 from BobHanson/hanson1
3.2.7-v5
2 parents 7e3888b + 977701f commit c00b0c8

File tree

25 files changed

+4748
-139
lines changed

25 files changed

+4748
-139
lines changed

sources/net.sf.j2s.core/dist/build-core.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141

142142
<target name="call-core" id="call-core">
143143
<echo>......Creating core${call-core.name}.js</echo>
144-
<concat destfile="${site.path}/js/core/tmp.js">
144+
<concat destfile="${site.path}/js/core/tmp.js" fixlastline="yes">
145145
<filelist dir="${site.path}/j2s" files="${call-core.list}" />
146146
</concat>
147147

38.3 KB
Binary file not shown.
-1 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200125163539
1+
20200201153353
38.3 KB
Binary file not shown.
-1 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20200125163539
1+
20200201153353

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public class CorePlugin extends Plugin {
2525
* "net.sf.j2s.core.jar" not "net.sf.j2s.core.3.2.5"
2626
*
2727
*/
28-
public static String VERSION = "3.2.7-v3";
28+
public static String VERSION = "3.2.7-v5";
29+
// BH 2020.01.31 -- 3.2.7-v5 'L' used instead of 'J' in $fields$
30+
// BH 2020.01.31 -- 3.2.7-v5 java.lang.reflect.* should not be truncated to reflect.* in parameters
31+
// BH 2020.01.16 -- 3.2.7-v4 replaces extends java.awt.Component and javax.swing.JComponent
2932
// BH 2020.01.12 -- 3.2.7-v3 fixes JAXB annotation marshalling for 3.2.7
3033
// BH 2020.01.11 -- 3.2.7-v3 corrects and rewrites synthetic bridge creation with much cleaner heap usage
3134
// BH 2020.01.09 -- 3.2.7-v2 introduces @j2sAlias as a way of adding a custom method name, as in exports.

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@
135135

136136
// TODO: superclass inheritance for JAXB XmlAccessorType
137137

138+
//BH 2020.01.31 -- 3.2.7-v5 'L' used instead of 'J' in $fields$
139+
//BH 2020.01.31 -- 3.2.7-v5 java.lang.reflect.* should not be truncated to reflect.*
138140
//BH 2020.01.16 -- 3.2.7-v4 replaces extends java.awt.Component and javax.swing.JComponent
139141
//BH 2020.01.12 -- 3.2.7-v3 fixes JAXB annotation marshalling for 3.2.7
140142
//BH 2020.01.11 -- 3.2.7-v3 corrects and rewrites synthetic bridge creation with much cleaner heap usage
@@ -535,7 +537,7 @@ private char getLastCharInBuffer() {
535537

536538
// order above can be changed, but typeCode order must then be adapted
537539

538-
private final static String typeCodes = "ZBCDFILHSO";
540+
private final static String typeCodes = "ZBCDFIJHSO";
539541

540542
private class FieldInfo {
541543
@SuppressWarnings("unchecked")
@@ -2656,7 +2658,6 @@ private void addEnumConstants(EnumDeclaration e, List<EnumConstantDeclaration> e
26562658
*
26572659
*
26582660
* @param field the field being declared
2659-
* @param fields
26602661
* @param isStatic
26612662
* @return true if anything was written to the buffer
26622663
*/
@@ -4831,9 +4832,12 @@ private String getMyJavaClassNameLambda(boolean andIncrement) {
48314832

48324833
static String stripJavaLang(String name) {
48334834
// shorten java.lang.XXX.YYY but not java.lang.xxx.YYY
4834-
String s = (!name.startsWith("java.lang.") || name.equals("java.lang.Object")
4835-
|| name.length() > 10 && !Character.isUpperCase(name.charAt(10)) ? name : name.substring(10));
4836-
return s;
4835+
return (
4836+
!name.startsWith("java.lang.")
4837+
|| name.equals("java.lang.Object")
4838+
|| name.length() > 10 && !Character.isUpperCase(name.charAt(10)) ?
4839+
name :
4840+
name.substring(10));
48374841
}
48384842

48394843
/**
@@ -5563,7 +5567,7 @@ private String j2sGetParamCode(ITypeBinding binding) {
55635567
name = "S";
55645568
break;
55655569
default:
5566-
name = NameMapper.checkClassReplacement(name).replace("java.lang.", "").replace('.', '_');
5570+
name = stripJavaLang(NameMapper.checkClassReplacement(name)).replace('.', '_');
55675571
break;
55685572
}
55695573
if (arrays != null) {

sources/net.sf.j2s.java.core/build-core-applet.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
<target name="call-core" id="call-core">
5151
<echo>......Creating core${call-core.name}.js</echo>
52-
<concat destfile="${site.path}/js/core/tmp.js">
52+
<concat destfile="${site.path}/js/core/tmp.js" fixlastline="yes">
5353
<filelist dir="${site.path}/j2s" files="${call-core.list}" />
5454
</concat>
5555

0 commit comments

Comments
 (0)