Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:09:19 -0400 (Fri, 14 Sep 2012)
New Revision: 16724
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java
Log:
Few minor changes on collections creation
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -34,10 +34,21 @@
*/
public abstract class AbstractExtensible implements Extensible
{
-
- private Map<Class<?>, Object> attachments = new HashMap<Class<?>,
Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
+ private Map<Class<?>, Object> attachments;
+ private Map<String, Object> properties;
+ public AbstractExtensible()
+ {
+ this.attachments = new HashMap<Class<?>, Object>();
+ this.properties = new HashMap<String, Object>();
+ }
+
+ public AbstractExtensible(int initialAttachmentsSize, int initialPropertiesSize)
+ {
+ this.attachments = new HashMap<Class<?>,
Object>(initialAttachmentsSize);
+ this.properties = new HashMap<String, Object>(initialPropertiesSize);
+ }
+
public Collection<Object> getAttachments()
{
return attachments.values();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java 2012-09-14
16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -21,8 +21,6 @@
*/
package org.jboss.wsf.spi.deployment;
-import java.io.IOException;
-import java.net.URL;
import java.util.List;
/**
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -40,8 +40,8 @@
{
private static final ResourceBundle bundle =
BundleUtils.getBundle(AbstractCommonConfig.class);
private String configName;
- private Map<String, Feature> features = new HashMap<String, Feature>();
- private Map<String, String> properties = new HashMap<String, String>();
+ private Map<String, Feature> features = new HashMap<String, Feature>(2);
+ private Map<String, String> properties = new HashMap<String, String>(4);
private List<UnifiedHandlerChainMetaData> preHandlerChains;
private List<UnifiedHandlerChainMetaData> postHandlerChains;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.spi.metadata.j2ee;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -34,7 +34,7 @@
public class EJBArchiveMetaData
{
/** ArrayList<BeanMetaData> for the ejbs */
- private List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ private List<EJBMetaData> beans = Collections.emptyList();
/** The optional JBossWS config-name */
private String configName;
/** The optional JBossWS config-file */
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -28,7 +28,7 @@
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-/** The unified metdata data for a handler chain element
+/** The unified metadata data for a handler chain element
*
* @author Thomas.Diesler(a)jboss.org
*/
@@ -37,7 +37,7 @@
private QName serviceNamePattern;
private QName portNamePattern;
private String protocolBindings;
- private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>(4);
private boolean excluded;
private String id;
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -21,20 +21,20 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-/** The unified metdata data for a handler chains element
+/** The unified metadata data for a handler chains element
*
* @author Thomas.Diesler(a)jboss.org
*/
public class UnifiedHandlerChainsMetaData extends ServiceRefElement
{
private HandlerType handlerType;
- private List<UnifiedHandlerChainMetaData> handlerChains = new
ArrayList<UnifiedHandlerChainMetaData>();
+ private List<UnifiedHandlerChainMetaData> handlerChains = new
LinkedList<UnifiedHandlerChainMetaData>();
public UnifiedHandlerChainsMetaData(HandlerType handlerType)
{
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Set;
@@ -31,7 +32,7 @@
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
/**
- * The unified metdata data for a handler element
+ * The unified metadata data for a handler element
*
* @author Thomas.Diesler(a)jboss.org
*/
@@ -49,13 +50,13 @@
// The required <handler-class> element
private String handlerClass;
// The optional <init-param> elements
- private List<UnifiedInitParamMetaData> initParams = new
ArrayList<UnifiedInitParamMetaData>();
+ private List<UnifiedInitParamMetaData> initParams = new
LinkedList<UnifiedInitParamMetaData>();
// The optional <soap-header> elements
- private Set<QName> soapHeaders = new HashSet<QName>();
+ private Set<QName> soapHeaders = new HashSet<QName>(2);
// The optional <soap-role> elements
- private Set<String> soapRoles = new HashSet<String>();
- // The optional <port-name> elements, these only apply to webserve clients
- private Set<String> portNames = new HashSet<String>();
+ private Set<String> soapRoles = new HashSet<String>(2);
+ // The optional <port-name> elements, these only apply to webservice clients
+ private Set<String> portNames = new HashSet<String>(4);
public UnifiedHandlerMetaData(UnifiedHandlerChainMetaData handlerChain)
{
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -49,9 +49,9 @@
// The optional <port-qname> element
private QName portQName;
// Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new
ArrayList<UnifiedCallPropertyMetaData>();
+ private List<UnifiedCallPropertyMetaData> callProperties = new
ArrayList<UnifiedCallPropertyMetaData>(2);
// Arbitrary proxy properties given by <stub-property>
- private List<UnifiedStubPropertyMetaData> stubProperties = new
ArrayList<UnifiedStubPropertyMetaData>();
+ private List<UnifiedStubPropertyMetaData> stubProperties = new
ArrayList<UnifiedStubPropertyMetaData>(2);
// The optional JBossWS config-name
private String configName;
// The optional JBossWS config-file
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -83,9 +83,9 @@
// The optional <service-qname> element
private QName serviceQName;
// The list <port-component-ref> elements
- private List<UnifiedPortComponentRefMetaData> portComponentRefs = new
ArrayList<UnifiedPortComponentRefMetaData>();
+ private List<UnifiedPortComponentRefMetaData> portComponentRefs = new
ArrayList<UnifiedPortComponentRefMetaData>(4);
// The optional <handler> elements. JAX-RPC handlers declared in the standard
J2EE1.4 descriptor
- private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>(4);
// The optional <handler-chains> elements. JAX-WS handlers declared in the
standard JavaEE5 descriptor
private UnifiedHandlerChainsMetaData handlerChains;
@@ -100,7 +100,7 @@
// The optional <handler-chain> element. JAX-WS handler chain declared in the
JBoss JavaEE5 descriptor
private String handlerChain;
// Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new
ArrayList<UnifiedCallPropertyMetaData>();
+ private List<UnifiedCallPropertyMetaData> callProperties = new
ArrayList<UnifiedCallPropertyMetaData>(2);
// @Addressing annotation metadata
private boolean isAddressingAnnotationSpecified;
private boolean addressingEnabled;
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -70,7 +70,7 @@
private String ejbLink;
private String servletLink;
// The optional <handler> elements
- private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>(2);
// The HTTP context root
private String contextRoot;
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java 2012-09-14
16:07:09 UTC (rev 16723)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java 2012-09-14
16:09:19 UTC (rev 16724)
@@ -33,7 +33,7 @@
public class WebservicesMetaData
{
// The required <webservice-description> elements
- private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new
ArrayList<WebserviceDescriptionMetaData>();
+ private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new
ArrayList<WebserviceDescriptionMetaData>(2);
// The URL to the webservices.xml descriptor
private URL descriptorURL;