File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
sources/net.sf.j2s.java.core/src/sun/misc Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3333
3434
3535/**
36+ *
37+ * SwingJS note:
38+ *
39+ * all offsets in SwingJS will be the String name of the field. All we are doing
40+ * is getting or putting those values. Nothing truly atomic about it.
41+ *
3642 * A collection of methods for performing low-level, unsafe operations.
3743 * Although the class and all methods are public, use of this class is
3844 * limited because only trusted code can obtain instances of it.
@@ -732,7 +738,8 @@ public Object staticFieldBase(Class<?> c) {
732738 * @see #getInt(Object, long)
733739 */
734740 public long staticFieldOffset (Field f ) {
735- return 0 ;
741+ String name = f .getName ();
742+ return /** @j2sNative 1 ? name : */ 0 ;
736743 }
737744
738745 /**
@@ -753,7 +760,8 @@ public long staticFieldOffset(Field f) {
753760 * @see #getInt(Object, long)
754761 */
755762 public long objectFieldOffset (Field f ) {
756- return 0 ;
763+ String name = f .getName ();
764+ return /** @j2sNative 1 ? name : */ 0 ;
757765 }
758766
759767 /**
You can’t perform that action at this time.
0 commit comments