Author: andrew.plotnikov
Date: 2012-02-08 10:36:46 -0500 (Wed, 08 Feb 2012)
New Revision: 5586
Modified:
ws/trunk/exo.ws.testframework/pom.xml
ws/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java
ws/trunk/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/trunk/exo.ws.testframework/pom.xml
===================================================================
--- ws/trunk/exo.ws.testframework/pom.xml 2012-02-08 15:36:19 UTC (rev 5585)
+++ ws/trunk/exo.ws.testframework/pom.xml 2012-02-08 15:36:46 UTC (rev 5586)
@@ -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/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java
===================================================================
---
ws/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java 2012-02-08
15:36:19 UTC (rev 5585)
+++
ws/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockHttpServletResponse.java 2012-02-08
15:36:46 UTC (rev 5586)
@@ -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/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java
===================================================================
---
ws/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java 2012-02-08
15:36:19 UTC (rev 5585)
+++
ws/trunk/exo.ws.testframework/src/main/java/org/exoplatform/services/test/mock/MockServletContext.java 2012-02-08
15:36:46 UTC (rev 5586)
@@ -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;
}
Show replies by date