Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
jdeparser
jdeparser2-reflection-stackwalker.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jdeparser2-reflection-stackwalker.diff of Package jdeparser
diff --git a/src/main/java/org/jboss/jdeparser/Assertions.java b/src/main/java/org/jboss/jdeparser/Assertions.java index 017c645..5b22dcc 100644 --- a/src/main/java/org/jboss/jdeparser/Assertions.java +++ b/src/main/java/org/jboss/jdeparser/Assertions.java @@ -18,7 +18,7 @@ package org.jboss.jdeparser; -import sun.reflect.Reflection; +import java.util.Set; /** * @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a> @@ -26,7 +26,8 @@ class Assertions { static boolean callerIs(Class<?> clazz) { try { - return Reflection.getCallerClass(3) == clazz; + StackWalker walker = StackWalker.getInstance(Set.of(StackWalker.Option.SHOW_REFLECT_FRAMES), 3); + return walker.getCallerClass() == clazz; } catch (Throwable ignored) {} // dunno return true;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor