Skip to content

Commit ab2cd12

Browse files
author
zhourenjian
committed
Fix bug that blank SimpleSerializable descendant does not get correct parsing
1 parent 93313e7 commit ab2cd12

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sources/net.sf.j2s.ajax/ajaxrpc/net/sf/j2s/ajax/Base64.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ private static int base64toInt(char c, byte[] alphaToInt) {
218218
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
219219
51, 22, 23, 24, 25
220220
};
221-
221+
222+
/*
222223
public static void main(String args[]) {
223224
int numRuns = Integer.parseInt(args[0]);
224225
int numBytes = Integer.parseInt(args[1]);
@@ -241,4 +242,5 @@ public static void main(String args[]) {
241242
}
242243
}
243244
}
245+
*/
244246
}

sources/net.sf.j2s.ajax/ajaxrpc/net/sf/j2s/ajax/SimpleSerializable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public class SimpleSerializable implements Cloneable {
5757
var headSize = buffer.join ('').length;
5858
5959
var fields = oClass.declared$Fields;
60-
if (fields == null) return "";
60+
if (fields == null) {
61+
fields = [];
62+
}
6163
for (var i = 0; i < fields.length; i++) {
6264
var field = fields[i];
6365
var name = field.name;

0 commit comments

Comments
 (0)