File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
jbmc/regression/jbmc/deterministic_assignments_json
src/main/java/org/cprover Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 313
313
"@type" :" java.lang.Long" ,
314
314
"value" :" 9223372036854775807"
315
315
},
316
- "inheritedStatic" :{
317
- "@type" :" java.lang.Integer" ,
318
- "value" :10
319
- },
320
316
"interfaceContainerFirst" :{
321
317
"@type" :" MyInterfaceContainerA" ,
322
318
"field" :{
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public static String classNameFromFile(File file) {
73
73
74
74
public static StaticFieldMap <Object > staticFieldMap (Class <?> clazz ) {
75
75
StaticFieldMap <Object > staticFields = new StaticFieldMap <>();
76
- for (Field field : getAllStaticFields (clazz )) {
76
+ for (Field field : getDeclaredStaticFields (clazz )) {
77
77
field .setAccessible (true );
78
78
try {
79
79
if (!field .getName ().equals ("$assertionsDisabled" )) {
@@ -88,20 +88,13 @@ public static StaticFieldMap<Object> staticFieldMap(Class<?> clazz) {
88
88
return staticFields ;
89
89
}
90
90
91
- public static List <Field > getAllStaticFields (Class <?> clazz ) {
91
+ public static List <Field > getDeclaredStaticFields (Class <?> clazz ) {
92
92
List <Field > fields = new ArrayList <>();
93
- if (clazz == null ) {
94
- return fields ;
95
- }
96
93
for (Field field : clazz .getDeclaredFields ()) {
97
94
if ((field .getModifiers () & Modifier .STATIC ) == Modifier .STATIC ) {
98
95
fields .add (field );
99
96
}
100
97
}
101
- fields .addAll (getAllStaticFields (clazz .getSuperclass ()));
102
- for (Class <?> interfaze : clazz .getInterfaces ()) {
103
- fields .addAll (getAllStaticFields (interfaze ));
104
- }
105
98
return fields ;
106
99
}
107
100
}
You can’t perform that action at this time.
0 commit comments