geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r768046 - in /geronimo/sandbox/blueprint: blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/
Date Thu, 23 Apr 2009 20:40:30 GMT
Author: gawor
Date: Thu Apr 23 20:40:30 2009
New Revision: 768046

URL: http://svn.apache.org/viewvc?rev=768046&view=rev
Log:
some minor updates

Modified:
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
    geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java?rev=768046&r1=768045&r2=768046&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/BeanMetadata.java
Thu Apr 23 20:40:30 2009
@@ -16,7 +16,6 @@
  */
 package org.osgi.service.blueprint.reflect;
 
-import java.util.Collection;
 import java.util.List;
 
 public interface BeanMetadata extends Target, ComponentMetadata {

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java?rev=768046&r1=768045&r2=768046&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceMetadata.java
Thu Apr 23 20:40:30 2009
@@ -17,8 +17,6 @@
 package org.osgi.service.blueprint.reflect;
 
 import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
 import java.util.List;
 
 public interface ServiceMetadata extends ComponentMetadata, Target {

Modified: geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java?rev=768046&r1=768045&r2=768046&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-api/src/main/java/org/osgi/service/blueprint/reflect/ServiceReferenceMetadata.java
Thu Apr 23 20:40:30 2009
@@ -17,7 +17,6 @@
 package org.osgi.service.blueprint.reflect;
 
 import java.util.Collection;
-import java.util.Set;
 import java.util.List;
 
 public interface ServiceReferenceMetadata extends ComponentMetadata {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.java?rev=768046&r1=768045&r2=768046&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/convert/ConversionServiceImpl.java
Thu Apr 23 20:40:30 2009
@@ -19,6 +19,7 @@
 import java.io.ByteArrayInputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -143,6 +144,9 @@
     }
 
     private Object createObject(String value, Class type) throws Exception {
+        if (type.isInterface() || Modifier.isAbstract(type.getModifiers())) {
+            throw new Exception("Unable to convert. Type class is an interface or is an abstract
class");
+        }
         Constructor constructor = null;
         try {
             constructor = type.getConstructor(String.class);

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java?rev=768046&r1=768045&r2=768046&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/reflect/BeanMetadataImpl.java
Thu Apr 23 20:40:30 2009
@@ -109,6 +109,14 @@
         if (this.arguments == null) {
             this.arguments = new ArrayList<BeanArgument>();
         }
+        if (!this.arguments.isEmpty()) {
+            BeanArgument p1 = this.arguments.get(0);
+            BeanArgument p2 = argument;
+            if ( (p1.getIndex() > -1 && p2.getIndex() < 0) ||
+                 (p1.getIndex() < 0 && p2.getIndex() > -1) ) {
+                throw new IllegalArgumentException("Index attribute must be specified either
on all or none constructor arguments");
+            }
+        }
         this.arguments.add(argument);
     }
 



Mime
View raw message