Index: build.xml
===================================================================
--- build.xml	(revision 28940)
+++ build.xml	(working copy)
@@ -29,9 +29,9 @@
     <property name="plugin.dist.dir" value="../../dist"/>
     <property name="plugin.build.dir" value="build"/>
     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
-    <property name="ant.build.javac.target" value="1.5"/>
+    <property name="ant.build.javac.target" value="1.6"/>
     <property name="commit.message" value="Changed constructor for Plugin"/>
-    <property name="plugin.main.version" value="5553"/>
+    <property name="plugin.main.version" value="5587"/>
     <target name="init">
         <mkdir dir="${plugin.build.dir}"/>
     </target>
Index: src/cadastre_fr/CadastreGrabber.java
===================================================================
--- src/cadastre_fr/CadastreGrabber.java	(revision 28940)
+++ src/cadastre_fr/CadastreGrabber.java	(working copy)
@@ -16,6 +16,7 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.io.ProgressInputStream;
+import org.openstreetmap.josm.tools.Utils;
 
 public class CadastreGrabber {
 
@@ -83,7 +84,7 @@
     }
 
     private BufferedImage grab(URL url) throws IOException, OsmTransferException {
-        wmsInterface.urlConn = (HttpURLConnection)url.openConnection();
+        wmsInterface.urlConn = Utils.openHttpConnection(url, false);
         wmsInterface.urlConn.setRequestMethod("GET");
         wmsInterface.setCookie();
         InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE);
Index: src/cadastre_fr/CadastreInterface.java
===================================================================
--- src/cadastre_fr/CadastreInterface.java	(revision 28940)
+++ src/cadastre_fr/CadastreInterface.java	(working copy)
@@ -23,6 +23,7 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
 
 public class CadastreInterface {
     public boolean downloadCanceled = false;
@@ -109,7 +110,7 @@
         try {
             searchFormURL = new URL(baseURL + "/scpc/accueil.do");
             while (cookied == false && retries > 0) {
-                urlConn = (HttpURLConnection)searchFormURL.openConnection();
+                urlConn = Utils.openHttpConnection(searchFormURL, false);
                 urlConn.setRequestMethod("GET");
                 urlConn.connect();
                 if (urlConn.getResponseCode() == HttpURLConnection.HTTP_OK) {
@@ -213,7 +214,7 @@
             String lines = null;
             String ln = null;
             URL interfaceURL = new URL(baseURL + "/scpc/"+interfaceRef);
-            urlConn = (HttpURLConnection)interfaceURL.openConnection();
+            urlConn = Utils.openHttpConnection(interfaceURL, false);
             urlConn.setRequestMethod("GET");
             setCookie();
             urlConn.connect();
@@ -274,7 +275,7 @@
             content += "&nbResultatParPage=10";
             content += "&x=0&y=0";
             searchFormURL = new URL(baseURL + "/scpc/rechercherPlan.do");
-            urlConn = (HttpURLConnection)searchFormURL.openConnection();
+            urlConn = Utils.openHttpConnection(searchFormURL, false);
             urlConn.setRequestMethod("POST");
             urlConn.setDoOutput(true);
             urlConn.setDoInput(true);
@@ -363,7 +364,7 @@
         HttpURLConnection urlConn2 = null;
         try {
             URL getAllImagesURL = new URL(baseURL + "/scpc/listerFeuillesParcommune.do?keepVolatileSession=&offset=2000");
-            urlConn2 = (HttpURLConnection)getAllImagesURL.openConnection();
+            urlConn2 = Utils.openHttpConnection(getAllImagesURL, false);
             setCookie(urlConn2);
             urlConn2.connect();
             System.out.println("GET "+getAllImagesURL);
@@ -470,7 +471,7 @@
         String content = baseURL + "/scpc/" + interfaceRef;
         content += "&dontSaveLastForward&keepVolatileSession=";
         searchFormURL = new URL(content);
-        urlConn = (HttpURLConnection)searchFormURL.openConnection();
+        urlConn = Utils.openHttpConnection(searchFormURL, false);
         urlConn.setRequestMethod("GET");
         setCookie();
         urlConn.connect();
Index: src/cadastre_fr/DownloadSVGBuilding.java
===================================================================
--- src/cadastre_fr/DownloadSVGBuilding.java	(revision 28940)
+++ src/cadastre_fr/DownloadSVGBuilding.java	(working copy)
@@ -32,6 +32,7 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.io.ProgressInputStream;
+import org.openstreetmap.josm.tools.Utils;
 
 public class DownloadSVGBuilding extends PleaseWaitRunnable {
 
@@ -234,7 +235,7 @@
     }
 
     private String grabSVG(URL url) throws IOException, OsmTransferException {
-        wmsInterface.urlConn = (HttpURLConnection)url.openConnection();
+        wmsInterface.urlConn = Utils.openHttpConnection(url, false);
         wmsInterface.urlConn.setRequestMethod("GET");
         wmsInterface.setCookie();
         InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE);
Index: src/cadastre_fr/DownloadSVGTask.java
===================================================================
--- src/cadastre_fr/DownloadSVGTask.java	(revision 28940)
+++ src/cadastre_fr/DownloadSVGTask.java	(working copy)
@@ -32,6 +32,7 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.io.ProgressInputStream;
+import org.openstreetmap.josm.tools.Utils;
 /**
  * Grab the SVG administrative boundaries of the active commune layer (cadastre),
  * isolate the SVG path of the concerned commune (other municipalities are also
@@ -188,7 +189,7 @@
     }
 
     private String grabSVG(URL url) throws IOException, OsmTransferException {
-        wmsInterface.urlConn = (HttpURLConnection)url.openConnection();
+        wmsInterface.urlConn = Utils.openHttpConnection(url, false);
         wmsInterface.urlConn.setRequestMethod("GET");
         wmsInterface.setCookie();
         InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE);
