You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2010/06/13 12:10:41 UTC

svn commit: r954194 - in /openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf: ./ scopes/

Author: struberg
Date: Sun Jun 13 10:10:40 2010
New Revision: 954194

URL: http://svn.apache.org/viewvc?rev=954194&view=rev
Log:
OWB-275 code cleanup

Modified:
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/JSFUtil.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/Jsf2ScopesExtension.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/ViewScopedContext.java

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java Sun Jun 13 10:10:40 2010
@@ -29,7 +29,7 @@ import javax.faces.context.FacesContext;
 import org.apache.webbeans.conversation.ConversationManager;
 
 public class ConversationAwareViewHandler extends ViewHandlerWrapper
-{	
+{
     private final ViewHandler delegate;
 
     public ConversationAwareViewHandler(ViewHandler delegate)
@@ -66,10 +66,12 @@ public class ConversationAwareViewHandle
         int indexOfQuery = url.indexOf('?');
         if (indexOfQuery > 0) 
         {
-        	String queryString = url.substring(indexOfQuery);
-        	// If the query string already has a cid parameter, return url directly.
-        	if (queryString.contains("?cid=") || queryString.contains("&cid="))
-        		return url;
+            String queryString = url.substring(indexOfQuery);
+            // If the query string already has a cid parameter, return url directly.
+            if (queryString.contains("?cid=") || queryString.contains("&cid="))
+            {
+                return url;
+            }
         }
         ConversationManager conversationManager = ConversationManager.getInstance();
         Conversation conversation = conversationManager.getConversationBeanReference();

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/JSFUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/JSFUtil.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/JSFUtil.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/JSFUtil.java Sun Jun 13 10:10:40 2010
@@ -182,7 +182,7 @@ public final class JSFUtil
 
     public static String getConversationId()
     {
-    	String cid = getJSFRequestParameter("cid");
-    	return cid;
+        String cid = getJSFRequestParameter("cid");
+        return cid;
     }
 }

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java Sun Jun 13 10:10:40 2010
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java Sun Jun 13 10:10:40 2010
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java Sun Jun 13 10:10:40 2010
@@ -25,7 +25,6 @@ import javax.faces.event.PhaseEvent;
 import javax.faces.event.PhaseId;
 import javax.faces.event.PhaseListener;
 
-import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.context.ConversationContext;
 import org.apache.webbeans.conversation.ConversationImpl;

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/Jsf2ScopesExtension.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/Jsf2ScopesExtension.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/Jsf2ScopesExtension.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/Jsf2ScopesExtension.java Sun Jun 13 10:10:40 2010
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/ViewScopedContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/ViewScopedContext.java?rev=954194&r1=954193&r2=954194&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/ViewScopedContext.java (original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/scopes/ViewScopedContext.java Sun Jun 13 10:10:40 2010
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * with the License. You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -67,7 +67,8 @@ public class ViewScopedContext implement
         @SuppressWarnings("unchecked")
         ConcurrentHashMap<Contextual<?>, Object> componentInstanceMap = (ConcurrentHashMap<Contextual<?>, Object>) viewMap.get(COMPONENT_MAP_NAME);
         
-        if(componentInstanceMap == null) {
+        if(componentInstanceMap == null)
+        {
             return null;
         }
         
@@ -165,7 +166,8 @@ public class ViewScopedContext implement
     }
 
     @Override
-    public boolean isListenerForSource(Object source) {
+    public boolean isListenerForSource(Object source)
+    {
         if (source instanceof UIViewRoot)
         {
             return true;
@@ -183,7 +185,8 @@ public class ViewScopedContext implement
      */
     @Override
     @SuppressWarnings("unchecked")
-    public void processEvent(SystemEvent event) {
+    public void processEvent(SystemEvent event)
+    {
         if (event instanceof PreDestroyViewMapEvent)
         {
             // better use the viewmap we get from the event to prevent concurrent modification problems
@@ -195,7 +198,8 @@ public class ViewScopedContext implement
             ConcurrentHashMap<Contextual<?>, CreationalContext<?>> creationalContextMap 
                     = (ConcurrentHashMap<Contextual<?>, CreationalContext<?>>) viewMap.get(CREATIONAL_MAP_NAME);
 
-            if(componentInstanceMap != null) {
+            if(componentInstanceMap != null)
+            {
                 for ( Entry<Contextual<?>, Object> componentEntry : componentInstanceMap.entrySet())
                 {
                     // there is no nice way to explain the Java Compiler that we are handling the same type T,