myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jak...@apache.org
Subject svn commit: r947002 - /myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
Date Fri, 21 May 2010 13:36:39 GMT
Author: jakobk
Date: Fri May 21 13:36:39 2010
New Revision: 947002

URL: http://svn.apache.org/viewvc?rev=947002&view=rev
Log:
small improvement - use an array with the required size for toArray() to prevent unnecessary
array creation

Modified:
    myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java

Modified: myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java?rev=947002&r1=947001&r2=947002&view=diff
==============================================================================
--- myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
(original)
+++ myfaces/core/trunk/implee6/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
Fri May 21 13:36:39 2010
@@ -133,7 +133,7 @@ public class MyFacesContainerInitializer
                 //at least one of the attempted mappings is in use, remove and try again
                 Set<String> newMappings = new HashSet<String>(Arrays.asList(mappings));
                 newMappings.removeAll(conflictMappings);
-                mappings = newMappings.toArray(new String[0]);
+                mappings = newMappings.toArray(new String[newMappings.size()]);
                 servlet.addMapping(mappings);
             }
 



Mime
View raw message