You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/06/26 17:08:58 UTC

svn commit: r788730 - in /geronimo/sandbox/blueprint/blueprint-core/src/main: java/org/apache/geronimo/blueprint/container/AggregateConverter.java resources/org/apache/geronimo/blueprint/blueprint.xsd

Author: gnodet
Date: Fri Jun 26 15:08:57 2009
New Revision: 788730

URL: http://svn.apache.org/viewvc?rev=788730&view=rev
Log:
Remove unused code and update schema

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AggregateConverter.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AggregateConverter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AggregateConverter.java?rev=788730&r1=788729&r2=788730&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AggregateConverter.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/AggregateConverter.java Fri Jun 26 15:08:57 2009
@@ -280,32 +280,6 @@
         return array;
     }
 
-    // TODO need to do proper disambiguation
-    private <T> Constructor<T> getDisambiguatedConstructor(Class<T> t, Class<?> s) {
-        for (Constructor<T> c : t.getConstructors()) {
-            if (c.getParameterTypes().length == 1
-                    && c.getParameterTypes()[0] == s) {
-                return c;
-            }
-        }
-        for (Constructor<T> c : t.getConstructors()) {
-            if (c.getParameterTypes().length == 1
-                    && c.getParameterTypes()[0].isAssignableFrom(s)) {
-                return c;
-            }
-        }
-        return null;
-    }
-
-    private Collection<?> getAsCollection(Object s) {
-        if (s.getClass().isArray())
-            return Arrays.asList((Object[]) s);
-        else if (Collection.class.isAssignableFrom(s.getClass()))
-            return (Collection<?>) s;
-        else
-            return null;
-    }
-
     private boolean isAssignable(Object source, ReifiedType target) {
         return target.size() == 0
                 && unwrap(target.getRawClass()).isAssignableFrom(unwrap(source.getClass()));
@@ -333,12 +307,6 @@
         return convert( source, new GenericType(target));
     }
 
-
-    private Class<?> loadClass(String s) throws Exception {
-
-        return blueprintContainer.loadClass(s);
-    }
-
     private Class toClass(ReifiedType type) {
         return type.getRawClass();
     }

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd?rev=788730&r1=788729&r2=788730&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/resources/org/apache/geronimo/blueprint/blueprint.xsd Fri Jun 26 15:08:57 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
     /*
-    * $Revision: 7441 $
+    * $Revision$
     *
     * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
     *
@@ -293,7 +293,7 @@
                 <xsd:attribute name="activation" use="prohibited"/>
                 <xsd:attribute name="class" type="Tclass" />
                 <xsd:attribute name="init-method" type="Tmethod" />
-                <xsd:attribute name="destroy-method" type="Tmethod"/>
+                <xsd:attribute name="destroy-method" use="prohibited"/>
                 <xsd:attribute name="factory-method" type="Tmethod" />
                 <xsd:attribute name="factory-ref" type="Tidref" />
                 <xsd:attribute name="scope" fixed="prototype" type="Tscope"/>