File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Ghidra/Debug/ProposedUtils/src/main/java/generic/depends Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,15 @@ public void injectServices(T obj) throws ServiceConstructionException {
144
144
constructed .put (cons .method , service );
145
145
}
146
146
instancesByClass .put (cons .cls , service );
147
- for (Field f : fieldsByClass .remove (cons .cls )) {
148
- try {
149
- f .set (obj , service );
150
- }
151
- catch (IllegalArgumentException | IllegalAccessException e ) {
152
- throw new AssertionError (e );
147
+ Set <Field > fields = fieldsByClass .remove (cons .cls );
148
+ if (fields != null ) {
149
+ for (Field f : fields ) {
150
+ try {
151
+ f .set (obj , service );
152
+ }
153
+ catch (IllegalArgumentException | IllegalAccessException e ) {
154
+ throw new AssertionError (e );
155
+ }
153
156
}
154
157
}
155
158
}
You can’t perform that action at this time.
0 commit comments