Commits

Anonymous committed ec37110

fixed compile error with jdk 1.6

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1337e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork2/inject/ContainerImpl.java

 
     private Constructor<T> findConstructorIn(Class<T> implementation) {
       Constructor<T> found = null;
-      for (Constructor<T> constructor
-          : implementation.getDeclaredConstructors()) {
+      Constructor<T>[] declaredConstructors = (Constructor<T>[]) implementation
+                    .getDeclaredConstructors();
+      for(Constructor<T> constructor :  declaredConstructors) {
         if (constructor.getAnnotation(Inject.class) != null) {
           if (found != null) {
             throw new DependencyException("More than one constructor annotated"