devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1648285 - /devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java
Date Mon, 29 Dec 2014 02:58:19 GMT
Author: wkeil
Date: Mon Dec 29 02:58:19 2014
New Revision: 1648285

URL: http://svn.apache.org/r1648285
Log:
DMAP-111: Improve Web Examples 

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

Modified:
    devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java

Modified: devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java?rev=1648285&r1=1648284&r2=1648285&view=diff
==============================================================================
--- devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java
(original)
+++ devicemap/trunk/devicemap/java/simpleddr/src/main/java/org/apache/devicemap/simpleddr/builder/device/AndroidDeviceBuilder.java
Mon Dec 29 02:58:19 2014
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
 import org.apache.devicemap.simpleddr.model.device.Device;
 import org.apache.devicemap.simpleddr.model.UserAgent;
 
@@ -208,8 +209,8 @@ public class AndroidDeviceBuilder extend
     private Device fuzzyAndroidDeviceWithToken(final UserAgent userAgent, String token) {
         if (userAgent.hasMozillaPattern() || userAgent.hasOperaPattern()) {
             int subtract = 1;
-	    	for (int j = 0; j<FUZZY_TOKEN_REGEXPS.length; j++) {
-	    		if (Pattern.matches(FUZZY_TOKEN_REGEXPS[j], token)) {
+	    	for (String regEx : FUZZY_TOKEN_REGEXPS) {
+	    		if (Pattern.matches(regEx, token)) {
 	    			String deviceId = (String) orderedRules.get(token);
 	                if (devices.containsKey(deviceId)) {
 	                    Device retDevice = (Device) devices.get(deviceId).clone();



Mime
View raw message