File tree Expand file tree Collapse file tree 2 files changed +19
-25
lines changed
generator/accessor-runtime/src/main/java/me/kcra/takenaka/accessor/mapping Expand file tree Collapse file tree 2 files changed +19
-25
lines changed Original file line number Diff line number Diff line change @@ -216,19 +216,16 @@ public FieldMapping(
216216 return null ;
217217 }
218218
219- try {
220- return clazz .getField (name );
221- } catch (NoSuchFieldException ignored ) {
222- do {
223- try {
224- final Field field = clazz .getDeclaredField (name );
225- field .setAccessible (true );
226-
227- return field ;
228- } catch (NoSuchFieldException ignored2 ) {
229- }
230- } while ((clazz = clazz .getSuperclass ()) != null && clazz != Object .class );
231- }
219+ do {
220+ try {
221+ final Field field = clazz .getDeclaredField (name );
222+ field .setAccessible (true );
223+
224+ return field ;
225+ } catch (NoSuchFieldException ignored ) {
226+ }
227+ } while ((clazz = clazz .getSuperclass ()) != null && clazz != Object .class );
228+
232229 return null ;
233230 }
234231
Original file line number Diff line number Diff line change @@ -245,19 +245,16 @@ public MethodMapping(
245245 paramClasses [i ] = paramClass ;
246246 }
247247
248- try {
249- return clazz .getMethod (namePair .getName (), paramClasses );
250- } catch (NoSuchMethodException ignored ) {
251- do {
252- try {
253- final Method method = clazz .getDeclaredMethod (namePair .getName (), paramClasses );
254- method .setAccessible (true );
248+ do {
249+ try {
250+ final Method method = clazz .getDeclaredMethod (namePair .getName (), paramClasses );
251+ method .setAccessible (true );
252+
253+ return method ;
254+ } catch (NoSuchMethodException ignored ) {
255+ }
256+ } while ((clazz = clazz .getSuperclass ()) != null && clazz != Object .class );
255257
256- return method ;
257- } catch (NoSuchMethodException ignored2 ) {
258- }
259- } while ((clazz = clazz .getSuperclass ()) != null && clazz != Object .class );
260- }
261258 return null ;
262259 }
263260
You can’t perform that action at this time.
0 commit comments