From 669bf93599115802725c5d946e0fb17db528947e Mon Sep 17 00:00:00 2001 From: Rafael Mattos Date: Sat, 7 Jul 2018 00:50:42 -0300 Subject: [PATCH] Adds check to ```ProxyReplacer``` for null beans When registering proxys within ```ProxyReplacer``` if the bean pass as parameter is null, changed to not test the bean. --- hotswap-agent-core/pom.xml | 2 +- hotswap-agent-parent/pom.xml | 2 +- hotswap-agent/pom.xml | 2 +- plugin/hotswap-agent-cdi-plugin/pom.xml | 2 +- plugin/hotswap-agent-deltaspike-plugin/pom.xml | 2 +- plugin/hotswap-agent-el-resolver-plugin/pom.xml | 2 +- plugin/hotswap-agent-glassfish-plugin/pom.xml | 2 +- plugin/hotswap-agent-hibernate-plugin/pom.xml | 2 +- plugin/hotswap-agent-hibernate3-plugin/pom.xml | 2 +- plugin/hotswap-agent-jbossmodules-plugin/pom.xml | 2 +- plugin/hotswap-agent-jersey1-plugin/pom.xml | 2 +- plugin/hotswap-agent-jersey2-plugin/pom.xml | 2 +- plugin/hotswap-agent-jetty-plugin/pom.xml | 2 +- plugin/hotswap-agent-log4j2-plugin/pom.xml | 2 +- plugin/hotswap-agent-logback-plugin/pom.xml | 2 +- plugin/hotswap-agent-mojarra-plugin/pom.xml | 2 +- plugin/hotswap-agent-myfaces-plugin/pom.xml | 2 +- plugin/hotswap-agent-omnifaces-plugin/pom.xml | 2 +- plugin/hotswap-agent-osgiequinox-plugin/pom.xml | 2 +- plugin/hotswap-agent-owb-plugin/pom.xml | 2 +- plugin/hotswap-agent-plugins/pom.xml | 2 +- plugin/hotswap-agent-proxy-plugin/pom.xml | 2 +- plugin/hotswap-agent-resteasy-plugin/pom.xml | 2 +- plugin/hotswap-agent-resteasy-registry-plugin/pom.xml | 2 +- plugin/hotswap-agent-seam-plugin/pom.xml | 2 +- plugin/hotswap-agent-spring-plugin/run-tests.sh | 0 .../hotswap/agent/plugin/spring/getbean/ProxyReplacer.java | 3 +++ plugin/hotswap-agent-tomcat-plugin/pom.xml | 2 +- plugin/hotswap-agent-tutorial-plugin/pom.xml | 4 ++-- plugin/hotswap-agent-vaadin-plugin/pom.xml | 2 +- plugin/hotswap-agent-webobjects-plugin/pom.xml | 2 +- plugin/hotswap-agent-weld-plugin/pom.xml | 2 +- plugin/hotswap-agent-wildfly-el-plugin/pom.xml | 2 +- plugin/hotswap-agent-zk-plugin/pom.xml | 2 +- pom.xml | 2 +- 35 files changed, 37 insertions(+), 34 deletions(-) mode change 100644 => 100755 plugin/hotswap-agent-spring-plugin/run-tests.sh diff --git a/hotswap-agent-core/pom.xml b/hotswap-agent-core/pom.xml index d19225659..2a64d303c 100644 --- a/hotswap-agent-core/pom.xml +++ b/hotswap-agent-core/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../hotswap-agent-parent/pom.xml diff --git a/hotswap-agent-parent/pom.xml b/hotswap-agent-parent/pom.xml index 8de072319..42db02c26 100644 --- a/hotswap-agent-parent/pom.xml +++ b/hotswap-agent-parent/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent pom - 1.3.0 + 1.3.1-SNAPSHOT HotswapAgent Java unlimited runtime class and resource redefinition. diff --git a/hotswap-agent/pom.xml b/hotswap-agent/pom.xml index 321bcd307..893cd4f4a 100644 --- a/hotswap-agent/pom.xml +++ b/hotswap-agent/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-cdi-plugin/pom.xml b/plugin/hotswap-agent-cdi-plugin/pom.xml index 89bc04b76..414547433 100644 --- a/plugin/hotswap-agent-cdi-plugin/pom.xml +++ b/plugin/hotswap-agent-cdi-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-deltaspike-plugin/pom.xml b/plugin/hotswap-agent-deltaspike-plugin/pom.xml index 088a8f4a4..ff67e5be0 100644 --- a/plugin/hotswap-agent-deltaspike-plugin/pom.xml +++ b/plugin/hotswap-agent-deltaspike-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-el-resolver-plugin/pom.xml b/plugin/hotswap-agent-el-resolver-plugin/pom.xml index cf74b3f10..fb6debc24 100644 --- a/plugin/hotswap-agent-el-resolver-plugin/pom.xml +++ b/plugin/hotswap-agent-el-resolver-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-glassfish-plugin/pom.xml b/plugin/hotswap-agent-glassfish-plugin/pom.xml index 738e21ebd..75ea4a2cf 100644 --- a/plugin/hotswap-agent-glassfish-plugin/pom.xml +++ b/plugin/hotswap-agent-glassfish-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-hibernate-plugin/pom.xml b/plugin/hotswap-agent-hibernate-plugin/pom.xml index 10b13d1fb..d59e14b2d 100644 --- a/plugin/hotswap-agent-hibernate-plugin/pom.xml +++ b/plugin/hotswap-agent-hibernate-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-hibernate3-plugin/pom.xml b/plugin/hotswap-agent-hibernate3-plugin/pom.xml index c97382755..acf79f90d 100644 --- a/plugin/hotswap-agent-hibernate3-plugin/pom.xml +++ b/plugin/hotswap-agent-hibernate3-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-jbossmodules-plugin/pom.xml b/plugin/hotswap-agent-jbossmodules-plugin/pom.xml index 5dddc552f..4bdea6d68 100644 --- a/plugin/hotswap-agent-jbossmodules-plugin/pom.xml +++ b/plugin/hotswap-agent-jbossmodules-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-jersey1-plugin/pom.xml b/plugin/hotswap-agent-jersey1-plugin/pom.xml index 7887a41aa..b21b87a4c 100644 --- a/plugin/hotswap-agent-jersey1-plugin/pom.xml +++ b/plugin/hotswap-agent-jersey1-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-jersey2-plugin/pom.xml b/plugin/hotswap-agent-jersey2-plugin/pom.xml index ce69ab619..d9daa04e8 100644 --- a/plugin/hotswap-agent-jersey2-plugin/pom.xml +++ b/plugin/hotswap-agent-jersey2-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-jetty-plugin/pom.xml b/plugin/hotswap-agent-jetty-plugin/pom.xml index 04e5c4f0a..6c1032647 100644 --- a/plugin/hotswap-agent-jetty-plugin/pom.xml +++ b/plugin/hotswap-agent-jetty-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-log4j2-plugin/pom.xml b/plugin/hotswap-agent-log4j2-plugin/pom.xml index c95978440..5e8532e78 100644 --- a/plugin/hotswap-agent-log4j2-plugin/pom.xml +++ b/plugin/hotswap-agent-log4j2-plugin/pom.xml @@ -7,7 +7,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-logback-plugin/pom.xml b/plugin/hotswap-agent-logback-plugin/pom.xml index 8e2624ece..a5cdbd343 100644 --- a/plugin/hotswap-agent-logback-plugin/pom.xml +++ b/plugin/hotswap-agent-logback-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-mojarra-plugin/pom.xml b/plugin/hotswap-agent-mojarra-plugin/pom.xml index db2685cb0..84df62229 100644 --- a/plugin/hotswap-agent-mojarra-plugin/pom.xml +++ b/plugin/hotswap-agent-mojarra-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-myfaces-plugin/pom.xml b/plugin/hotswap-agent-myfaces-plugin/pom.xml index a8a9258f5..d69756496 100644 --- a/plugin/hotswap-agent-myfaces-plugin/pom.xml +++ b/plugin/hotswap-agent-myfaces-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-omnifaces-plugin/pom.xml b/plugin/hotswap-agent-omnifaces-plugin/pom.xml index 0a38ee008..0d879ae0b 100644 --- a/plugin/hotswap-agent-omnifaces-plugin/pom.xml +++ b/plugin/hotswap-agent-omnifaces-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-osgiequinox-plugin/pom.xml b/plugin/hotswap-agent-osgiequinox-plugin/pom.xml index b81dad690..10069eb59 100644 --- a/plugin/hotswap-agent-osgiequinox-plugin/pom.xml +++ b/plugin/hotswap-agent-osgiequinox-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-owb-plugin/pom.xml b/plugin/hotswap-agent-owb-plugin/pom.xml index a864bf278..65c2ed39a 100644 --- a/plugin/hotswap-agent-owb-plugin/pom.xml +++ b/plugin/hotswap-agent-owb-plugin/pom.xml @@ -4,7 +4,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-plugins/pom.xml b/plugin/hotswap-agent-plugins/pom.xml index 68110b6bc..f2d1d6b05 100644 --- a/plugin/hotswap-agent-plugins/pom.xml +++ b/plugin/hotswap-agent-plugins/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-proxy-plugin/pom.xml b/plugin/hotswap-agent-proxy-plugin/pom.xml index 9fcf09595..41b12766e 100644 --- a/plugin/hotswap-agent-proxy-plugin/pom.xml +++ b/plugin/hotswap-agent-proxy-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-resteasy-plugin/pom.xml b/plugin/hotswap-agent-resteasy-plugin/pom.xml index 704e702cc..d60168f5a 100644 --- a/plugin/hotswap-agent-resteasy-plugin/pom.xml +++ b/plugin/hotswap-agent-resteasy-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-resteasy-registry-plugin/pom.xml b/plugin/hotswap-agent-resteasy-registry-plugin/pom.xml index 6f74828d1..a5f68169a 100644 --- a/plugin/hotswap-agent-resteasy-registry-plugin/pom.xml +++ b/plugin/hotswap-agent-resteasy-registry-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-seam-plugin/pom.xml b/plugin/hotswap-agent-seam-plugin/pom.xml index c95c802ff..e6b09da81 100644 --- a/plugin/hotswap-agent-seam-plugin/pom.xml +++ b/plugin/hotswap-agent-seam-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-spring-plugin/run-tests.sh b/plugin/hotswap-agent-spring-plugin/run-tests.sh old mode 100644 new mode 100755 diff --git a/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/getbean/ProxyReplacer.java b/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/getbean/ProxyReplacer.java index 21cf305b4..9df4e6408 100644 --- a/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/getbean/ProxyReplacer.java +++ b/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/getbean/ProxyReplacer.java @@ -44,6 +44,9 @@ public static void clearAllProxies() { * @return Proxied bean */ public static Object register(Object beanFactry, Object bean, Class[] paramClasses, Object[] paramValues) { + if (bean == null) { + return bean; + } if (SpringPlugin.basePackagePrefixes != null) { boolean hasMatch = false; for (String basePackagePrefix : SpringPlugin.basePackagePrefixes) { diff --git a/plugin/hotswap-agent-tomcat-plugin/pom.xml b/plugin/hotswap-agent-tomcat-plugin/pom.xml index 882043f37..0a3463f40 100644 --- a/plugin/hotswap-agent-tomcat-plugin/pom.xml +++ b/plugin/hotswap-agent-tomcat-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-tutorial-plugin/pom.xml b/plugin/hotswap-agent-tutorial-plugin/pom.xml index ff424d9cb..0fcaf9de0 100644 --- a/plugin/hotswap-agent-tutorial-plugin/pom.xml +++ b/plugin/hotswap-agent-tutorial-plugin/pom.xml @@ -7,7 +7,7 @@ org.hotswap.plugin.examples hotswap-agent-tutorial-plugin - 1.3.0 + 1.3.1-SNAPSHOT @@ -32,4 +32,4 @@ - \ No newline at end of file + diff --git a/plugin/hotswap-agent-vaadin-plugin/pom.xml b/plugin/hotswap-agent-vaadin-plugin/pom.xml index 23fd8f229..1fb7201f6 100644 --- a/plugin/hotswap-agent-vaadin-plugin/pom.xml +++ b/plugin/hotswap-agent-vaadin-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-webobjects-plugin/pom.xml b/plugin/hotswap-agent-webobjects-plugin/pom.xml index bf0f73de8..07c6aa51c 100644 --- a/plugin/hotswap-agent-webobjects-plugin/pom.xml +++ b/plugin/hotswap-agent-webobjects-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-weld-plugin/pom.xml b/plugin/hotswap-agent-weld-plugin/pom.xml index bc2d18f12..da4aeefdf 100644 --- a/plugin/hotswap-agent-weld-plugin/pom.xml +++ b/plugin/hotswap-agent-weld-plugin/pom.xml @@ -4,7 +4,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-wildfly-el-plugin/pom.xml b/plugin/hotswap-agent-wildfly-el-plugin/pom.xml index ef7cada88..65af44da5 100644 --- a/plugin/hotswap-agent-wildfly-el-plugin/pom.xml +++ b/plugin/hotswap-agent-wildfly-el-plugin/pom.xml @@ -6,7 +6,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/plugin/hotswap-agent-zk-plugin/pom.xml b/plugin/hotswap-agent-zk-plugin/pom.xml index c739d4db3..0c2bb60a1 100644 --- a/plugin/hotswap-agent-zk-plugin/pom.xml +++ b/plugin/hotswap-agent-zk-plugin/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-parent - 1.3.0 + 1.3.1-SNAPSHOT ../../hotswap-agent-parent/pom.xml diff --git a/pom.xml b/pom.xml index 99787f4bb..c02778d69 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.hotswapagent hotswap-agent-aggregator - 1.3.0 + 1.3.1-SNAPSHOT pom Hotswap Agent Aggregator