openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r736831 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java
Date Thu, 22 Jan 2009 22:31:21 GMT
Author: struberg
Date: Thu Jan 22 14:31:20 2009
New Revision: 736831

URL: http://svn.apache.org/viewvc?rev=736831&view=rev
Log:
OWB-56 add getEnabledDeploymentTypes() which is needed in the TCK test suite

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java?rev=736831&r1=736830&r2=736831&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/deployment/DeploymentTypeManager.java
Thu Jan 22 14:31:20 2009
@@ -14,6 +14,8 @@
 package org.apache.webbeans.deployment;
 
 import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -34,8 +36,10 @@
     public static DeploymentTypeManager getInstance()
     {
         DeploymentTypeManager instance = (DeploymentTypeManager) WebBeansFinder.getSingletonInstance(WebBeansFinder.SINGLETON_DEPLOYMENT_TYPE_MANAGER);
-        instance.deploymentTypeMap.put(Standard.class, Integer.valueOf(0));
-
+        if (!instance.deploymentTypeMap.containsKey(Standard.class)) 
+        {
+            instance.deploymentTypeMap.put(Standard.class, Integer.valueOf(0));
+        }
         return instance;
     }
 
@@ -89,4 +93,12 @@
         Asserts.assertNotNull(deploymentType, "deploymentType parameter can not be null");
         return deploymentTypeMap.containsKey(deploymentType);
     }
+    
+    public List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+    {
+        ArrayList<Class<? extends Annotation>> enabledDeploymentTypes = new ArrayList<Class<?
extends Annotation>>();
+        
+        enabledDeploymentTypes.addAll(deploymentTypeMap.keySet());
+        return enabledDeploymentTypes;
+    }
 }
\ No newline at end of file



Mime
View raw message