8000 method.setAccessible(true) for methods in Object.class · Issue #1170 · powermock/powermock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
method.setAccessible(true) for methods in Object.class #1170
Open
@sergiovanovi

Description

@sergiovanovi

Hi!

in this case you trying to set accessible to methods in Object.class
why?

For example, in class org.powermock.reflect.internal.WhiteboxImpl 1505 line
while (thisType != null) { final Class<?> type = thisType; final Method[] declaredMethods = AccessController.doPrivileged(new PrivilegedAction<Method[]>() { @Override public Method[] run() { return type.getDeclaredMethods(); } }); for (Method method : declaredMethods) { if(!"finalize".equals(method.getName())) { method.setAccessible(true); methods.add(method); } } Collections.addAll(methods, type.getMethods()); thisType = thisType.getSuperclass(); }

Metadata< 36E7 /h2>

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0