Skip to content

Commit efaa9f8

Browse files
committed
Minor JSMOuse update and Float/Double efficiencies
1 parent 63bfc38 commit efaa9f8

File tree

10 files changed

+26
-38
lines changed

10 files changed

+26
-38
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20231210191429
1+
20231213085117
1.3 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20231210191429
1+
20231213085117
-433 Bytes
Binary file not shown.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public final class String9 {
1414
static final byte LATIN1 = 0;
1515
static final byte UTF16 = 1;
1616

17-
private boolean isLatin1() {
18-
return COMPACT_STRINGS && coder == LATIN1;
19-
}
20-
17+
// private boolean isLatin1() {
18+
// return COMPACT_STRINGS && coder == LATIN1;
19+
// }
20+
//
2121

2222
/*
2323
* StringIndexOutOfBoundsException if {@code index} is

sources/net.sf.j2s.java.core/src/sun/misc/DoubleConsts.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ private DoubleConsts() {}
106106
*/
107107
public static final long SIGNIF_BIT_MASK = 0x000FFFFFFFFFFFFFL;
108108

109-
static {
110-
// verify bit masks cover all bit positions and that the bit
111-
// masks are non-overlapping
112-
assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0L) &&
113-
(((SIGN_BIT_MASK & EXP_BIT_MASK) == 0L) &&
114-
((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0L) &&
115-
((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0L)));
116-
}
109+
// static {
110+
// // verify bit masks cover all bit positions and that the bit
111+
// // masks are non-overlapping
112+
// assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0L) &&
113+
// (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0L) &&
114+
// ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0L) &&
115+
// ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0L)));
116+
// }
117117
}

sources/net.sf.j2s.java.core/src/sun/misc/FloatConsts.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ private FloatConsts() {}
101101
*/
102102
public static final int SIGNIF_BIT_MASK = 0x007FFFFF;
103103

104-
static {
105-
// verify bit masks cover all bit positions and that the bit
106-
// masks are non-overlapping
107-
assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0) &&
108-
(((SIGN_BIT_MASK & EXP_BIT_MASK) == 0) &&
109-
((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0) &&
110-
((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0)));
111-
}
104+
// static {
105+
// // verify bit masks cover all bit positions and that the bit
106+
// // masks are non-overlapping
107+
// assert(((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0) &&
108+
// (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0) &&
109+
// ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0) &&
110+
// ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0)));
111+
// }
112112
}

sources/net.sf.j2s.java.core/src/swingjs/JSMouse.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public boolean processEvent(int id, int x, int y, int modifiers, long time, Obje
6868
case KeyEvent.KEY_RELEASED:
6969
return keyAction(id, jqevent, time);
7070
}
71-
if (id != MouseEvent.MOUSE_WHEEL && id != MouseEvent.MOUSE_MOVED)
71+
if (id != MouseEvent.MOUSE_WHEEL
72+
&& id != MouseEvent.MOUSE_MOVED
73+
&& id != MouseEvent.MOUSE_DRAGGED)
7274
modifiers = applyLeftMouse(modifiers);
7375
switch (id) {
7476
case MouseEvent.MOUSE_WHEEL:

sources/net.sf.j2s.java.core/src/swingjs/api/js/DOMNode.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@
1414
*
1515
*/
1616
public interface DOMNode {
17-
18-
19-
public default void x(){
20-
Consumer<String> x = new Consumer<String>(){
21-
22-
@Override
23-
public void accept(String t) {
24-
// TODO Auto-generated method stub
25-
26-
}
27-
28-
};
29-
}
30-
3117
/**
3218
* avoiding GCC inability to handle .finally and .catch
3319
*

sources/net.sf.j2s.java.core/src/test/Test_Long.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ private static void testBoxed() {
757757
Integer IJ = null;
758758
assert(L != O);
759759
assert(II == IJ);
760-
assert(L == L);
760+
// assert(L == L);
761761
assert(P != L);
762762
assert(P.equals(L));
763763
assert(L != null);

0 commit comments

Comments
 (0)