polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [2/4] zest-java git commit: Fixed that AnnotationFilters had to be 'public'.
Date Mon, 24 Oct 2016 01:47:32 GMT
Fixed that AnnotationFilters had to be 'public'.


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/87f65846
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/87f65846
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/87f65846

Branch: refs/heads/develop
Commit: 87f65846a278df3cb589e55e86be3bba215ae439
Parents: 246e367
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Mon Oct 24 09:35:41 2016 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Mon Oct 24 09:35:41 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/87f65846/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java
b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java
index 7615fdf..9a4ff0d 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/AssemblyHelper.java
@@ -21,6 +21,7 @@
 package org.apache.zest.runtime.bootstrap;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -154,7 +155,10 @@ public class AssemblyHelper
                 {
                     try
                     {
-                        filter = (AppliesToFilter) appliesToClass.newInstance();
+                        @SuppressWarnings("unchecked")
+                        Constructor<AppliesToFilter> cons = (Constructor<AppliesToFilter>)
appliesToClass.getDeclaredConstructor();
+                        cons.setAccessible(true);
+                        filter = cons.newInstance();
                     }
                     catch( Exception e )
                     {


Mime
View raw message