devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1640128 - /incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java
Date Mon, 17 Nov 2014 10:12:37 GMT
Author: wkeil
Date: Mon Nov 17 10:12:37 2014
New Revision: 1640128

URL: http://svn.apache.org/r1640128
Log:
DMAP-53: This is an epic for tasks or issues related to examples 

Task-Url: https://issues.apache.org/jira/browse/DMAP-53

Modified:
    incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java

Modified: incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java?rev=1640128&r1=1640127&r2=1640128&view=diff
==============================================================================
--- incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java
(original)
+++ incubator/devicemap/trunk/examples/servlet/src/main/java/org/apache/devicemap/servlet/Classify.java
Mon Nov 17 10:12:37 2014
@@ -34,7 +34,12 @@ import org.apache.devicemap.loader.Loade
  */
 public class Classify extends HttpServlet {
   
-  @Override
+    /**
+     * 
+     */
+	private static final long serialVersionUID = -5231604595735057872L;
+
+@Override
   protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
     String ua = request.getParameter("ua");
 
@@ -44,11 +49,11 @@ public class Classify extends HttpServle
     
     long start = System.nanoTime();
     
-    Device device = DeviceMapFactory.getClient(LoaderOption.URL).classifyDevice(ua);
+    final Device device = DeviceMapFactory.getClient(LoaderOption.URL).classifyDevice(ua);
     
     long diff = (System.nanoTime() - start) / 1000;
 
-    StringBuilder sb = new StringBuilder();
+    final StringBuilder sb = new StringBuilder();
     sb.append("{\"success\":true,\"user-agent\":\"").append(ua).append("\",\"time_microseconds\":");
     sb.append(diff).append(",\"result\":").append(device.toString()).append("}");
 



Mime
View raw message