cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r979073 - /cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
Date Sun, 25 Jul 2010 17:33:18 GMT
Author: tomekopo
Date: Sun Jul 25 17:33:18 2010
New Revision: 979073

URL: http://svn.apache.org/viewvc?rev=979073&view=rev
Log:
Fix checkstyle errors in logbrowser sample

Modified:
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java

Modified: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java?rev=979073&r1=979072&r2=979073&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
(original)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
Sun Jul 25 17:33:18 2010
@@ -20,17 +20,13 @@
 package demo.logbrowser.servlet;
 
 import java.io.IOException;
-import java.io.PrintWriter;
-
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import java.lang.RuntimeException;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
 import org.apache.cxf.common.logging.LogUtils;
 
 public class Generate extends HttpServlet {
@@ -42,12 +38,15 @@ public class Generate extends HttpServle
     private static final String FORM_URL = "./generate.html";
 
     private enum Levels {
-        DEBUG, INFO, WARNING, ERROR;
+        DEBUG,
+        INFO,
+        WARNING,
+        ERROR;
     }
 
     public void doGet(final HttpServletRequest request, final HttpServletResponse response)
-            throws ServletException, IOException
-    {
+        throws ServletException, IOException {
+
         final String level = request.getParameter(LEVEL) != null
             ? request.getParameter(LEVEL).toLowerCase() : null;
         final String message = request.getParameter(MESSAGE);
@@ -65,19 +64,17 @@ public class Generate extends HttpServle
             log(Level.SEVERE, message, exceptionMessage);
         }
 
-        final PrintWriter out = response.getWriter();
         response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
         response.setHeader("Location", FORM_URL);
         response.setContentType("text/html");
     }
 
-    private static void log(final Level level,
-            final String message, final String exceptionMessage) {
+    private static void log(final Level level, final String message, final String exceptionMessage)
{
         if (message != null && !"".equals(message)) {
             if (exceptionMessage != null && !"".equals(exceptionMessage)) {
-               LOGGER.log(level, message, new Exception(exceptionMessage));
+                LOGGER.log(level, message, new Exception(exceptionMessage));
             } else {
-               LOGGER.log(level, message); 
+                LOGGER.log(level, message);
             }
         }
     }



Mime
View raw message