Skip to content

Commit

Permalink
no need for a doPriviliagedAction call
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/openejb/trunk@1432321 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dblevins committed Jan 11, 2013
1 parent 7e39cac commit f814978
Showing 1 changed file with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import java.security.AccessController;
import java.security.PrivilegedAction;


/**
Expand All @@ -50,20 +48,15 @@
public class AsmParameterNameLoader implements ParameterNameLoader {

public static void install(){
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Field field = org.apache.xbean.recipe.ReflectionUtil.class.getDeclaredField("parameterNamesLoader");
field.setAccessible(true);
field.set(null, new AsmParameterNameLoader());
try {
Field field = org.apache.xbean.recipe.ReflectionUtil.class.getDeclaredField("parameterNamesLoader");
field.setAccessible(true);
field.set(null, new AsmParameterNameLoader());
// if (field.get(null) == null){
// }
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
});
} catch (Exception e) {
e.printStackTrace();
}
}

/**
Expand Down

0 comments on commit f814978

Please sign in to comment.