You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2011/02/23 10:09:05 UTC
svn commit: r1073647 -
/myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java
Author: gpetracek
Date: Wed Feb 23 09:09:05 2011
New Revision: 1073647
URL: http://svn.apache.org/viewvc?rev=1073647&view=rev
Log:
cleanup
Modified:
myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java
Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java?rev=1073647&r1=1073646&r2=1073647&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java (original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/scope/view/ViewScopedExtension.java Wed Feb 23 09:09:05 2011
@@ -73,32 +73,21 @@ public class ViewScopedExtension impleme
CodiStartupBroadcaster.broadcastStartup();
- try
- {
- // we need to do this manually because there is no dependency injection in place
- // at this time
- ProjectStageProducer psp = ProjectStageProducer.getInstance();
+ // we need to do this manually because there is no dependency injection in place
+ // at this time
+ ProjectStageProducer psp = ProjectStageProducer.getInstance();
- ProjectStage projectStage = psp.getProjectStage();
+ ProjectStage projectStage = psp.getProjectStage();
- if (projectStage == ProjectStage.UnitTest)
- {
- // for unit tests, we use the mock context
- afterBeanDiscovery.addContext(new MockViewScopedContext());
- }
- else
- {
- // otherwise we use the real JSF ViewMap context
- afterBeanDiscovery.addContext(new ViewScopedContext());
- }
+ if (projectStage == ProjectStage.UnitTest)
+ {
+ // for unit tests, we use the mock context
+ afterBeanDiscovery.addContext(new MockViewScopedContext());
}
- catch (Exception e)
+ else
{
- if (!(e instanceof RuntimeException))
- {
- throw new RuntimeException(e);
- }
- throw (RuntimeException)e;
+ // otherwise we use the real JSF ViewMap context
+ afterBeanDiscovery.addContext(new ViewScopedContext());
}
}