Skip to content

Commit b19adc2

Browse files
committed
fixes issue with Class.getFields
1 parent 726f14e commit b19adc2

File tree

1 file changed

+3
-1
lines changed
  • sources/net.sf.j2s.java.core/src/java/lang

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,8 @@ private void addFields(Object c, Field[] f, int modifiers) {
17401740
* @j2sNative
17411741
*
17421742
* for (m in c) {
1743-
* if (!!modifiers != !!this.$clazz$[m])
1743+
* var isStatic = (typeof this.$clazz$[m] != "undefined");
1744+
* if (!!modifiers != isStatic)
17441745
* continue;
17451746
* if (this.excludeField$S(m)) continue;
17461747
* var o = c[m];
@@ -1766,6 +1767,7 @@ boolean excludeField(String name) {
17661767
|| name == "$isInterface"
17671768
|| name == "$isEnum"
17681769
|| name == "implementz"
1770+
|| name == "$Class$"
17691771
|| name == "$init$"
17701772
|| name == "$init0$");
17711773
}

0 commit comments

Comments
 (0)