[seam-commits] Seam SVN: r12396 - in modules/faces/trunk/impl/src: main/java/org/jboss/seam/faces/environment and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Apr 5 16:25:12 EDT 2010


Author: lincolnthree
Date: 2010-04-05 16:25:12 -0400 (Mon, 05 Apr 2010)
New Revision: 12396

Removed:
   modules/faces/trunk/impl/src/main/java/javax/
Modified:
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/ExternalContextProducer.java
   modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/FacesContextProducer.java
   modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/ExternalContextProducerTest.java
   modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/FacesContextProducerTest.java
Log:
Fixed import errors.

Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/ExternalContextProducer.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/ExternalContextProducer.java	2010-04-05 20:21:36 UTC (rev 12395)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/ExternalContextProducer.java	2010-04-05 20:25:12 UTC (rev 12396)
@@ -1,5 +1,5 @@
 //$Id: FacesContext.java 5350 2007-06-20 17:53:19Z gavin $
-package org.jboss.seam.faces.producer;
+package org.jboss.seam.faces.environment;
 
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.inject.Produces;
@@ -8,17 +8,19 @@
 
 /**
  * <p>
- * A producer which retrieves the {@link ExternalContext} for the current request
- * of the JavaServer Faces application by calling {@link FacesContext#getExternalContext()}
- * and stores the result as a request-scoped bean instance.
+ * A producer which retrieves the {@link ExternalContext} for the current
+ * request of the JavaServer Faces application by calling
+ * {@link FacesContext#getExternalContext()} and stores the result as a
+ * request-scoped bean instance.
  * </p>
- *
+ * 
  * <p>
  * This producer allows the {@link ExternalContext} to be injected:
  * </p>
- *
+ * 
  * <pre>
- * &#064;Inject ExternalContext ctx;
+ * &#064;Inject
+ * ExternalContext ctx;
  * </pre>
  * 
  * @author <a href="mailto:lincolnbaxter at gmail.com">Lincoln Baxter, III</a>
@@ -26,7 +28,9 @@
  */
 public class ExternalContextProducer
 {
-   public @Produces @RequestScoped ExternalContext getExternalContext(FacesContext context)
+   public @Produces
+   @RequestScoped
+   ExternalContext getExternalContext(final FacesContext context)
    {
       return context.getExternalContext();
    }

Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/FacesContextProducer.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/FacesContextProducer.java	2010-04-05 20:21:36 UTC (rev 12395)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/FacesContextProducer.java	2010-04-05 20:25:12 UTC (rev 12396)
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.jboss.seam.faces.producer;
+package org.jboss.seam.faces.environment;
 
 import javax.enterprise.context.ContextNotActiveException;
 import javax.enterprise.context.RequestScoped;
@@ -24,14 +24,18 @@
 /**
  * <p>
  * A producer which retrieves the {@link FacesContext} for the current request
- * of the JavaServer Faces application by calling {@link FacesContext#getCurrentInstance()}
- * and stores the result as a request-scoped bean instance.
+ * of the JavaServer Faces application by calling
+ * {@link FacesContext#getCurrentInstance()} and stores the result as a
+ * request-scoped bean instance.
  * </p>
- *
- * <p>This producer allows the {@link FacesContext} to be injected:</p>
- *
+ * 
+ * <p>
+ * This producer allows the {@link FacesContext} to be injected:
+ * </p>
+ * 
  * <pre>
- * &#064;Inject FacesContext ctx;
+ * &#064;Inject
+ * FacesContext ctx;
  * </pre>
  * 
  * <p>
@@ -44,7 +48,9 @@
  */
 public class FacesContextProducer
 {
-   public @Produces @RequestScoped FacesContext getFacesContext()
+   public @Produces
+   @RequestScoped
+   FacesContext getFacesContext()
    {
       FacesContext ctx = FacesContext.getCurrentInstance();
       if (ctx == null)

Modified: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/ExternalContextProducerTest.java
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/ExternalContextProducerTest.java	2010-04-05 20:21:36 UTC (rev 12395)
+++ modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/ExternalContextProducerTest.java	2010-04-05 20:25:12 UTC (rev 12396)
@@ -3,15 +3,13 @@
 import javax.enterprise.context.ContextNotActiveException;
 import javax.enterprise.inject.Instance;
 import javax.faces.context.ExternalContext;
-
 import javax.faces.context.FacesContext;
 import javax.inject.Inject;
+
 import junit.framework.Assert;
+
 import org.jboss.arquillian.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.faces.producer.ExternalContextProducer;
-import org.jboss.seam.faces.producer.FacesContextProducer;
-
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ArchivePaths;
 import org.jboss.shrinkwrap.api.Archives;
@@ -21,9 +19,9 @@
 import org.junit.runner.RunWith;
 
 /**
- * Verify that the ExternalContextProducer produces the same ExternalContext
- * as returned by FacesContext#getExternalContext().
- *
+ * Verify that the ExternalContextProducer produces the same ExternalContext as
+ * returned by FacesContext#getExternalContext().
+ * 
  * @author Dan Allen
  */
 @RunWith(Arquillian.class)
@@ -32,12 +30,11 @@
    @Deployment
    public static Archive<?> createTestArchive()
    {
-      return Archives.create("test.jar", JavaArchive.class)
-            .addClass(FacesContextProducer.class).addClass(ExternalContextProducer.class)
-            .addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+      return Archives.create("test.jar", JavaArchive.class).addClass(FacesContextProducer.class).addClass(ExternalContextProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
    }
 
-   @Inject Instance<ExternalContext> externalContextInstance;
+   @Inject
+   Instance<ExternalContext> externalContextInstance;
 
    @Test
    public void testReturnsCurrentExternalContext()
@@ -59,7 +56,7 @@
       Assert.assertFalse(actualExternalContext == producedExternalContext);
       // verify we have same object through proxy by comparing hash codes
       Assert.assertEquals(actualExternalContext.hashCode(), producedExternalContext.hashCode());
-      //Assert.assertEquals(actualExternalContext, producedExternalContext);
+      // Assert.assertEquals(actualExternalContext, producedExternalContext);
       Assert.assertEquals("/app", producedExternalContext.getRequestContextPath());
    }
 

Modified: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/FacesContextProducerTest.java
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/FacesContextProducerTest.java	2010-04-05 20:21:36 UTC (rev 12395)
+++ modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/FacesContextProducerTest.java	2010-04-05 20:25:12 UTC (rev 12396)
@@ -2,15 +2,14 @@
 
 import javax.enterprise.context.ContextNotActiveException;
 import javax.enterprise.inject.Instance;
-
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
 import javax.inject.Inject;
+
 import junit.framework.Assert;
+
 import org.jboss.arquillian.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.faces.producer.FacesContextProducer;
-
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ArchivePaths;
 import org.jboss.shrinkwrap.api.Archives;
@@ -20,9 +19,9 @@
 import org.junit.runner.RunWith;
 
 /**
- * Verify that the FacesContextProducer produces the same FacesContext
- * as returned by FacesContext#getCurrentInstance().
- *
+ * Verify that the FacesContextProducer produces the same FacesContext as
+ * returned by FacesContext#getCurrentInstance().
+ * 
  * @author Dan Allen
  */
 @RunWith(Arquillian.class)
@@ -31,12 +30,11 @@
    @Deployment
    public static Archive<?> createTestArchive()
    {
-      return Archives.create("test.jar", JavaArchive.class)
-            .addClass(FacesContextProducer.class)
-            .addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+      return Archives.create("test.jar", JavaArchive.class).addClass(FacesContextProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
    }
 
-   @Inject Instance<FacesContext> facesContextInstance;
+   @Inject
+   Instance<FacesContext> facesContextInstance;
 
    @Test
    public void testReturnsCurrentFacesContext()
@@ -57,7 +55,7 @@
       Assert.assertFalse(actualFacesContext == producedFacesContext);
       // verify we have same object through proxy by comparing hash codes
       Assert.assertEquals(actualFacesContext.hashCode(), producedFacesContext.hashCode());
-      //Assert.assertEquals(actualFacesContext, producedFacesContext);
+      // Assert.assertEquals(actualFacesContext, producedFacesContext);
       Assert.assertSame(PhaseId.RENDER_RESPONSE, producedFacesContext.getCurrentPhaseId());
    }
 



More information about the seam-commits mailing list