Skip to content

Commit 230a522

Browse files
committed
Fixed bug reported by Udo in July
1 parent 870ed64 commit 230a522

File tree

3 files changed

+102
-22
lines changed

3 files changed

+102
-22
lines changed

sources/net.sf.j2s.java.core/src/java/lang/Character.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ public String toString() {
455455
public static String toString(char c) {
456456
/**
457457
* @j2sNative
458-
* if (this === Charater) {
459-
* return "class java.lang.Charater"; // Charater.class.toString
458+
* if (this === Character) {
459+
* return "class java.lang.Character"; // Character.class.toString
460460
* }
461461
*/ {}
462462
return String.valueOf(c);

sources/net.sf.j2s.java.core/src/java/package.js

Lines changed: 98 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,58 @@ window["java.package.callback"] = function () {
1616
var coreZ = null;
1717
if (window["j2s.rt.z.enabled"]) {
1818
ClazzLoader.jarClasspath (base + "rt.z.js", [
19-
"java.lang.Void",
19+
"java.lang.Void",
2020
"$.reflect.AccessibleObject",
2121
"$.AnnotatedElement",
2222
"$.GenericDeclaration",
2323
"$.InvocationHandler",
2424
"$.Member",
25-
"$.Modifier",
25+
"$.Modifier",
2626
"$.Constructor",
27-
"$.Field",
28-
"$.Method",
29-
27+
"$.Field",
28+
"$.Method",
29+
"$.Array",
30+
"$.InvocationTargetException",
31+
"$.UndeclaredThrowableException",
32+
33+
"java.util.Date",
34+
"$.EventObject",
35+
"$.EventListener",
36+
"$.EventListenerProxy",
37+
"$.Iterator",
38+
"$.ListIterator",
39+
"$.Enumeration",
40+
"$.Collection",
41+
"$.Set",
42+
"$.Map",
43+
"$.List",
44+
"$.Queue",
45+
"$.RandomAccess",
46+
"$.ConcurrentModificationException",
47+
"$.EmptyStackException",
48+
"$.MissingResourceException",
49+
"$.NoSuchElementException",
50+
"$.TooManyListenersException",
51+
52+
"java.io.IOException",
53+
"$.CharConversionException",
54+
"$.EOFException",
55+
"$.FileNotFoundException",
56+
"$.InterruptedIOException",
57+
"$.ObjectStreamException",
58+
"$.InvalidClassException",
59+
"$.InvalidObjectException",
60+
"$.NotActiveException",
61+
"$.NotSerializableException",
62+
"$.OptionalDataException",
63+
"$.StreamCorruptedException",
64+
"$.SyncFailedException",
65+
"$.UnsupportedEncodingException",
66+
"$.UTFDataFormatException",
67+
"$.WriteAbortedException",
68+
3069
"java.net.URLEncoder",
31-
"java.net.URLDecoder",
70+
"$.URLDecoder",
3271
]);
3372
ClazzLoader.jarClasspath (base + "simple.z.js", [
3473
"net.sf.j2s.ajax.HttpRequest",
@@ -39,7 +78,7 @@ window["java.package.callback"] = function () {
3978
"net.sf.j2s.ajax.IXHRCallback",
4079
"$.XHRCallbackAdapter",
4180
"$.XHRCallbackSWTAdapter",
42-
81+
4382
"$.SimpleSerializable",
4483
"$.ISimpleCometable",
4584
"$.ISimpleConstant",
@@ -52,15 +91,15 @@ window["java.package.callback"] = function () {
5291
"$.ISimpleGeoLocation",
5392
"$.SimpleRPCRequest",
5493
"$.SimpleRPCSWTRequest",
55-
94+
5695
"$.SimplePipeSequence",
5796
"$.SimplePipeRunnable",
5897
"$.ISimpleCacheable",
5998
"$.ISimplePipePriority",
6099
"$.SimplePipeHelper",
61100
"$.SimplePipeRequest",
62101
"$.SimplePipeSWTRequest",
63-
102+
64103
"$.CompoundSerializable",
65104
"$.CompoundPipeSession",
66105
"$.CompoundPipeRunnable",
@@ -87,7 +126,7 @@ window["java.package.callback"] = function () {
87126

88127
"net.sf.j2s.ajax.IXHRCallback",
89128
"$.XHRCallbackAdapter",
90-
129+
91130
"$.SimpleSerializable",
92131
"$.ISimpleCometable",
93132
"$.ISimpleConstant",
@@ -108,7 +147,7 @@ window["java.package.callback"] = function () {
108147
"$.SimplePipeHelper",
109148
"$.SimplePipeRequest",
110149
"$.SimplePipeSWTRequest",
111-
150+
112151
"$.CompoundSerializable",
113152
"$.CompoundPipeSession",
114153
"$.CompoundPipeRunnable",
@@ -133,19 +172,58 @@ window["java.package.callback"] = function () {
133172
if (coreZ == null || coreZ.length == 0) {
134173
coreZ = base + "core.z.js";
135174
ClazzLoader.jarClasspath (coreZ, [
136-
"java.lang.Void",
175+
"java.lang.Void",
137176
"$.reflect.AccessibleObject",
138177
"$.AnnotatedElement",
139178
"$.GenericDeclaration",
140179
"$.InvocationHandler",
141180
"$.Member",
142-
"$.Modifier",
181+
"$.Modifier",
143182
"$.Constructor",
144-
"$.Field",
145-
"$.Method",
146-
183+
"$.Field",
184+
"$.Method",
185+
"$.Array",
186+
"$.InvocationTargetException",
187+
"$.UndeclaredThrowableException",
188+
189+
"java.util.Date",
190+
"$.EventObject",
191+
"$.EventListener",
192+
"$.EventListenerProxy",
193+
"$.Iterator",
194+
"$.ListIterator",
195+
"$.Enumeration",
196+
"$.Collection",
197+
"$.Set",
198+
"$.Map",
199+
"$.List",
200+
"$.Queue",
201+
"$.RandomAccess",
202+
"$.ConcurrentModificationException",
203+
"$.EmptyStackException",
204+
"$.MissingResourceException",
205+
"$.NoSuchElementException",
206+
"$.TooManyListenersException",
207+
208+
"java.io.IOException",
209+
"$.CharConversionException",
210+
"$.EOFException",
211+
"$.FileNotFoundException",
212+
"$.InterruptedIOException",
213+
"$.ObjectStreamException",
214+
"$.InvalidClassException",
215+
"$.InvalidObjectException",
216+
"$.NotActiveException",
217+
"$.NotSerializableException",
218+
"$.OptionalDataException",
219+
"$.StreamCorruptedException",
220+
"$.SyncFailedException",
221+
"$.UnsupportedEncodingException",
222+
"$.UTFDataFormatException",
223+
"$.WriteAbortedException",
224+
147225
"java.net.URLEncoder",
148-
"java.net.URLDecoder",
226+
"$.URLDecoder",
149227

150228
"net.sf.j2s.ajax.HttpRequest",
151229
"$.ARunnable",
@@ -155,7 +233,7 @@ window["java.package.callback"] = function () {
155233
"net.sf.j2s.ajax.IXHRCallback",
156234
"$.XHRCallbackAdapter",
157235
"$.XHRCallbackSWTAdapter",
158-
236+
159237
"$.SimpleSerializable",
160238
"$.ISimpleCometable",
161239
"$.ISimpleConstant",
@@ -168,15 +246,15 @@ window["java.package.callback"] = function () {
168246
"$.ISimpleGeoLocation",
169247
"$.SimpleRPCRequest",
170248
"$.SimpleRPCSWTRequest",
171-
249+
172250
"$.SimplePipeSequence",
173251
"$.SimplePipeRunnable",
174252
"$.ISimpleCacheable",
175253
"$.ISimplePipePriority",
176254
"$.SimplePipeHelper",
177255
"$.SimplePipeRequest",
178256
"$.SimplePipeSWTRequest",
179-
257+
180258
"$.CompoundSerializable",
181259
"$.CompoundPipeSession",
182260
"$.CompoundPipeRunnable",

sources/net.sf.j2s.java.core/src/java/util/LinkedHashSet.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* Like HashSet, LinkedHashSet is not thread safe, so access by multiple threads must be synchronized
3030
* by an external mechanism such as Collections.synchronizedSet.
3131
* @since 1.4
32+
*
33+
* @j2sRequireImport java.util.LinkedHashMap
3234
*/
3335
public class LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable,
3436
Serializable {

0 commit comments

Comments
 (0)