MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / configureProxy

Method configureProxy

ij/src/main/java/ij/ImageJ.java:350–369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

348 }
349
350 void configureProxy() {
351 if (Prefs.useSystemProxies) {
352 try {
353 System.setProperty("java.net.useSystemProxies", "true");
354 } catch(Exception e) {}
355 } else {
356 String server = Prefs.get("proxy.server", null);
357 if (server==null||server.equals(""))
358 return;
359 int port = (int)Prefs.get("proxy.port", 0);
360 if (port==0) return;
361 Properties props = System.getProperties();
362 props.put("proxySet", "true");
363 props.put("http.proxyHost", server);
364 props.put("http.proxyPort", ""+port);
365 props.put("https.proxyHost", server);
366 props.put("https.proxyPort", ""+port);
367 }
368 //new ProxySettings().logProperties();
369 }
370
371 @AstroImageJ(reason = "Use astronomy icon instead of microscope", modified = true)
372 void setIcon() throws Exception {

Callers 1

ImageJMethod · 0.95

Calls 5

getMethod · 0.95
setPropertyMethod · 0.45
equalsMethod · 0.45
getPropertiesMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected