Skip to content

Commit f2299e7

Browse files
committed
various fixes
1 parent 4820769 commit f2299e7

14 files changed

Lines changed: 331 additions & 184 deletions

File tree

7.04 MB
Binary file not shown.

sources/net.sf.j2s.core/dist/swingjs/_j2sclasslist.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ java/util/Set.js
171171
java/util/TimSort.js
172172
java/util/Vector.js
173173
javajs/api/JSFunction.js
174-
javajs/api/JSUtil.js
175-
174+
javajs/api/js/JSUtilI.js
175+
javajs/api/js/HTML5Applet.js
176176
javajs/util/AjaxURLConnection.js
177177
javajs/util/AjaxURLStreamHandlerFactory.js
178178
javajs/util/AU.js
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20260615150908
1+
20260627090323
7.04 MB
Binary file not shown.

sources/net.sf.j2s.core/dist/swingjs/ver/5.0.1/_j2sclasslist.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ java/util/Set.js
171171
java/util/TimSort.js
172172
java/util/Vector.js
173173
javajs/api/JSFunction.js
174-
javajs/api/JSUtil.js
175-
174+
javajs/api/js/JSUtilI.js
175+
javajs/api/js/HTML5Applet.js
176176
javajs/util/AjaxURLConnection.js
177177
javajs/util/AjaxURLStreamHandlerFactory.js
178178
javajs/util/AU.js
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20260615150908
1+
20260627090323
-3 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/site-resources_4.2/jsmol/js/JSmolJavaExt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,10 +1035,10 @@ sp.$replace=function(c1,c2){
10351035
var pt = c2.indexOf("$");
10361036
var is$ = (pt >= 0 && pt < c2.length - 1);
10371037
if (is$)
1038-
c2 = c2.replaceAll("\\$", "\uFFFD");
1038+
c2 = c2.split("$").join("\uFFFD");
10391039
var ret = this.replace(new RegExp(c1,"gm"),c2);
10401040
if (is$)
1041-
ret = ret.replaceAll("\uFFFD", "$");
1041+
ret = ret.split("\uFFFD").join("$");
10421042
return ret;
10431043
};
10441044
sp.$generateExpFunction=function(str){

sources/net.sf.j2s.java.core/src/javajs/img/CRCEncoder.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ abstract class CRCEncoder extends ImageEncoder {
1313
protected byte[] pngBytes;
1414
protected int dataLen;
1515
private byte[] int2 = new byte[2];
16-
private byte[] int4 = new byte[4];
16+
protected byte[] int4 = new byte[4];
1717

1818
CRCEncoder() {
1919
pngBytes = new byte[250];
@@ -43,28 +43,32 @@ protected void writeCRC() {
4343
* @param n The integer to be written into pngBytes.
4444
*/
4545
protected void writeInt2(int n) {
46-
int2[0] = (byte) ((n >> 8) & 0xff);
47-
int2[1] = (byte) (n & 0xff);
46+
getInt2(n, int2, 0);
4847
writeBytes(int2);
4948
}
5049

50+
protected static void getInt2(int n, byte[] b, int offset) {
51+
b[offset++] = (byte) ((n >> 8) & 0xff);
52+
b[offset] = (byte) (n & 0xff);
53+
}
54+
5155
/**
5256
* Write a four-byte integer into the pngBytes array at a given position.
5357
*
5458
* @param n The integer to be written into pngBytes.
5559
*/
5660
protected void writeInt4(int n) {
57-
getInt4(n, int4);
61+
getInt4(n, int4, 0);
5862
writeBytes(int4);
5963
}
6064

61-
protected static void getInt4(int n, byte[] int4) {
62-
int4[0] = (byte) ((n >> 24) & 0xff);
63-
int4[1] = (byte) ((n >> 16) & 0xff);
64-
int4[2] = (byte) ((n >> 8) & 0xff);
65-
int4[3] = (byte) (n & 0xff);
65+
protected static void getInt4(int n, byte[] b, int offset) {
66+
b[offset++] = (byte) ((n >> 24) & 0xff);
67+
b[offset++] = (byte) ((n >> 16) & 0xff);
68+
b[offset++] = (byte) ((n >> 8) & 0xff);
69+
b[offset] = (byte) (n & 0xff);
6670
}
67-
71+
6872
/**
6973
* Write a single byte into the pngBytes array at a given position.
7074
*

0 commit comments

Comments
 (0)