|
4 | 4 | import com.stripe.exception.ApiConnectionException;
|
5 | 5 | import com.stripe.exception.AuthenticationException;
|
6 | 6 | import com.stripe.exception.StripeException;
|
7 |
| -import com.stripe.util.ReflectionUtils; |
8 | 7 | import com.stripe.util.StringUtils;
|
9 | 8 | import java.io.IOException;
|
10 | 9 | import java.net.URL;
|
11 |
| -import java.net.URLStreamHandler; |
12 | 10 | import java.util.HashMap;
|
13 | 11 | import java.util.Map;
|
14 | 12 | import java.util.UUID;
|
|
18 | 16 | @Value
|
19 | 17 | @Accessors(fluent = true)
|
20 | 18 | public class StripeRequest {
|
21 |
| - /* |
22 |
| - * Set this property to override your environment's default |
23 |
| - * URLStreamHandler; Settings the property should not be needed in most |
24 |
| - * environments. |
25 |
| - */ |
26 |
| - private static final String CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME = |
27 |
| - "com.stripe.net.customURLStreamHandler"; |
28 |
| - |
29 | 19 | /** The HTTP method for the request (GET, POST or DELETE). */
|
30 | 20 | ApiResource.RequestMethod method;
|
31 | 21 |
|
@@ -100,19 +90,7 @@ private static URL buildURL(
|
100 | 90 | }
|
101 | 91 | }
|
102 | 92 |
|
103 |
| - URL url; |
104 |
| - String customUrlStreamHandlerClassName = |
105 |
| - System.getProperty(CUSTOM_URL_STREAM_HANDLER_PROPERTY_NAME, null); |
106 |
| - if (customUrlStreamHandlerClassName != null) { |
107 |
| - // instantiate the custom handler provided |
108 |
| - Class<URLStreamHandler> clazz = |
109 |
| - (Class<URLStreamHandler>) ReflectionUtils.getClassByName(customUrlStreamHandlerClassName); |
110 |
| - URLStreamHandler customHandler = ReflectionUtils.newInstance(clazz); |
111 |
| - url = new URL(null, sb.toString(), customHandler); |
112 |
| - } else { |
113 |
| - url = new URL(sb.toString()); |
114 |
| - } |
115 |
| - return url; |
| 93 | + return new URL(sb.toString()); |
116 | 94 | }
|
117 | 95 |
|
118 | 96 | private static HttpContent buildContent(
|
|
0 commit comments