src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
branchhttp-client-branch
changeset 56652 8e00f02b7dfc
parent 56621 a85c163fc41c
child 56795 03ece2518428
equal deleted inserted replaced
56644:23241a815199 56652:8e00f02b7dfc
   283         return cf;
   283         return cf;
   284     }
   284     }
   285 
   285 
   286     private static boolean retryPostValue() {
   286     private static boolean retryPostValue() {
   287         String s = Utils.getNetProperty("jdk.httpclient.enableAllMethodRetry");
   287         String s = Utils.getNetProperty("jdk.httpclient.enableAllMethodRetry");
   288         if (s == "" || "true".equals(s))
   288         if (s == null)
   289             return true;
   289             return false;
   290         return false;
   290         return s.isEmpty() ? true : Boolean.parseBoolean(s);
   291     }
   291     }
   292 
   292 
   293     private static boolean retryConnect() {
   293     private static boolean retryConnect() {
   294         String s = Utils.getNetProperty("jdk.httpclient.disableRetryConnect");
   294         String s = Utils.getNetProperty("jdk.httpclient.disableRetryConnect");
   295         if (s == "" || "true".equals(s))
   295         if (s == null)
   296             return false;
   296             return false;
   297         return true;
   297         return s.isEmpty() ? true : Boolean.parseBoolean(s);
   298     }
   298     }
   299 
   299 
   300     /** True if ALL ( even non-idempotent ) requests can be automatic retried. */
   300     /** True if ALL ( even non-idempotent ) requests can be automatic retried. */
   301     private static final boolean RETRY_ALWAYS = retryPostValue();
   301     private static final boolean RETRY_ALWAYS = retryPostValue();
   302     /** True if ConnectException should cause a retry. Enabled by default */
   302     /** True if ConnectException should cause a retry. Enabled by default */