View Javadoc
1   package my;
2   
3   import com.atlassian.plugin.osgi.StaticHolder;
4   import org.springframework.beans.CachedIntrospectionResults;
5   
6   import java.lang.reflect.Field;
7   import java.util.Map;
8   
9   public class StrongClassCacheRetriever {
10      public StrongClassCacheRetriever() {
11          try {
12              Field field = CachedIntrospectionResults.class.getDeclaredField("strongClassCache");
13              field.setAccessible(true);
14              Map classCache = (Map) field.get(null);
15  
16              StaticHolder.set(classCache);
17          } catch (Exception e) {
18              throw new RuntimeException(e);
19          }
20      }
21  }