[exo-jcr-commits] exo-jcr SVN: r5585 - in ws/branches/2.3.x/exo.ws.testframework: src/main/java/org/exoplatform/services/test/mock and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Feb 8 10:36:20 EST 2012


Author: andrew.plotnikov
Date: 2012-02-08 10:36:19 -0500 (Wed, 08 Feb 2012)
New Revision: 5585

Modified:
   ws/branches/2.3.x/exo.ws.testframework/pom.xml
   ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java
   ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java
Log:
EXOJCR-1725: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2

Modified: ws/branches/2.3.x/exo.ws.testframework/pom.xml
===================================================================
--- ws/branches/2.3.x/exo.ws.testframework/pom.xml	2012-02-08 12:52:58 UTC (rev 5584)
+++ ws/branches/2.3.x/exo.ws.testframework/pom.xml	2012-02-08 15:36:19 UTC (rev 5585)
@@ -37,5 +37,9 @@
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.exoplatform.kernel</groupId>
+      <artifactId>exo.kernel.commons</artifactId>  
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Modified: ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java
===================================================================
--- ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java	2012-02-08 12:52:58 UTC (rev 5584)
+++ ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java	2012-02-08 15:36:19 UTC (rev 5585)
@@ -18,6 +18,9 @@
  */
 package org.exoplatform.services.test.mock;
 
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -44,6 +47,8 @@
 public class MockHttpServletResponse implements HttpServletResponse
 {
 
+   private static final Log LOG = ExoLogger.getLogger("org.exoplatform.services.test.mock.MockHttpServletResponse");
+
    /** The writer. */
    private PrintWriter writer;
 
@@ -286,7 +291,10 @@
       }
       catch (IOException e)
       {
-
+         if (LOG.isTraceEnabled())
+         {
+            LOG.trace("An exception occurred: " + e.getMessage());
+         }
       }
    }
 

Modified: ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java
===================================================================
--- ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java	2012-02-08 12:52:58 UTC (rev 5584)
+++ ws/branches/2.3.x/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java	2012-02-08 15:36:19 UTC (rev 5585)
@@ -18,6 +18,9 @@
  */
 package org.exoplatform.services.test.mock;
 
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -44,6 +47,8 @@
 public class MockServletContext implements ServletContext
 {
 
+   private static final Log LOG = ExoLogger.getLogger("org.exoplatform.services.MockServletContext");
+
    /** The name. */
    private String name;
 
@@ -182,6 +187,10 @@
       }
       catch (MalformedURLException e)
       {
+         if (LOG.isTraceEnabled())
+         {
+            LOG.trace("An exception occurred: " + e.getMessage());
+         }
       }
       return set;
    }



More information about the exo-jcr-commits mailing list