Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / communication / UpdateInfoRetriever.java
index 3122f0859c310b68e6000c685d29e00a101a4f1a..799c2a3dff512d1e07304a87e9e1d22f6a8ed242 100644 (file)
@@ -28,6 +28,7 @@ public class UpdateInfoRetriever {
         */
        public void start() {
                fetcher = new UpdateInfoFetcher();
+               fetcher.setName("UpdateInfoFetcher");
                fetcher.setDaemon(true);
                fetcher.start();
        }
@@ -67,7 +68,7 @@ public class UpdateInfoRetriever {
        }
        
        
-
+       
        /**
         * Parse the data received from the server.
         * 
@@ -84,7 +85,7 @@ public class UpdateInfoRetriever {
                        reader = new BufferedReader(r);
                }
                
-
+               
                String version = null;
                ArrayList<ComparablePair<Integer, String>> updates =
                                new ArrayList<ComparablePair<Integer, String>>();
@@ -113,7 +114,7 @@ public class UpdateInfoRetriever {
        }
        
        
-
+       
        /**
         * An asynchronous task that fetches and parses the update info.
         * 
@@ -183,7 +184,7 @@ public class UpdateInfoRetriever {
                                
                                String contentType = connection.getContentType();
                                if (contentType == null ||
-                                               contentType.toLowerCase().indexOf(Communicator.UPDATE_INFO_CONTENT_TYPE) < 0) {
+                                               contentType.toLowerCase(Locale.ENGLISH).indexOf(Communicator.UPDATE_INFO_CONTENT_TYPE) < 0) {
                                        // Unknown response type
                                        log.warn("Unknown Content-type received:" + contentType);
                                        return;
@@ -223,7 +224,7 @@ public class UpdateInfoRetriever {
                                        return;
                                }
                                
-
+                               
                                info = new UpdateInfo(version, updates);
                                log.info("Found update: " + info);
                        } finally {