brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/2] brooklyn-server git commit: Apply class renames mapping to white-listed bundles
Date Thu, 23 Feb 2017 13:47:24 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master a0a713ee6 -> d0755dbfe


Apply class renames mapping to white-listed bundles


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/7f866a06
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/7f866a06
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/7f866a06

Branch: refs/heads/master
Commit: 7f866a06ce57b1c1edb571ee8012be4f5c478054
Parents: 5e947ce
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Thu Feb 23 14:53:19 2017 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Thu Feb 23 14:53:19 2017 +0200

----------------------------------------------------------------------
 .../mgmt/classloading/JavaBrooklynClassLoadingContext.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7f866a06/core/src/main/java/org/apache/brooklyn/core/mgmt/classloading/JavaBrooklynClassLoadingContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/classloading/JavaBrooklynClassLoadingContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/classloading/JavaBrooklynClassLoadingContext.java
index 2a53e5b..bd7c7da 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/classloading/JavaBrooklynClassLoadingContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/classloading/JavaBrooklynClassLoadingContext.java
@@ -82,12 +82,13 @@ public class JavaBrooklynClassLoadingContext extends AbstractBrooklynClassLoadin
     @Override
     @SuppressWarnings({ "rawtypes", "unchecked" })
     public Maybe<Class<?>> tryLoadClass(String className) {
-        Maybe<Class<?>> cls = tryLoadClass0(className);
+        String mappedClassName = DeserializingClassRenamesProvider.INSTANCE.findMappedName(className);
+        Maybe<Class<?>> cls = tryLoadClass0(mappedClassName);
         if (cls.isPresent()) {
             return cls;
         }
         try {
-            return (Maybe) Maybe.of(new ClassLoaderUtils(loader, mgmt).loadClass(className));
+            return (Maybe) Maybe.of(new ClassLoaderUtils(loader, mgmt).loadClass(mappedClassName));
         } catch (Exception e) {
             Exceptions.propagateIfFatal(e);
             // return original error
@@ -98,7 +99,6 @@ public class JavaBrooklynClassLoadingContext extends AbstractBrooklynClassLoadin
     @SuppressWarnings({ "rawtypes", "unchecked" })
     private Maybe<Class<?>> tryLoadClass0(String className) {
         try {
-            className = DeserializingClassRenamesProvider.INSTANCE.findMappedName(className);
             return (Maybe) Maybe.of(getClassLoader().loadClass(className));
         } catch (NoClassDefFoundError e) {
             String msg = "Invalid linkage in (transitive dependencies of) class "+className+":
"+e.toString();


Mime
View raw message