Skip to content

Commit

Permalink
delay warning messages
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
(cherry picked from commit 1de2f8c)
  • Loading branch information
lukasj committed Jul 30, 2021
1 parent a3fd4b3 commit 9061687
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ private InjectorHelper() {
static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
try {
Method m = c.getDeclaredMethod(methodname, params);
if (!m.trySetAccessible()) {
setAccessible(m);
}
setAccessible(m);
return m;
} catch (NoSuchMethodException e) {
// impossible
Expand Down Expand Up @@ -92,9 +90,7 @@ public Field run() {
}
});
if (f != null) {
if (!f.trySetAccessible()) {
setAccessible(f);
}
setAccessible(f);
return (Unsafe) f.get(null);
}
} catch (Throwable t) {
Expand Down

0 comments on commit 9061687

Please sign in to comment.