Changeset 12620 in josm for trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
- Timestamp:
- 2017-08-22T22:26:32+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r12321 r12620 177 177 } 178 178 } catch (NumberFormatException | ReflectiveOperationException e) { 179 Main.error(e);179 Logging.error(e); 180 180 } 181 181 } … … 304 304 sb.append(" (").append(getCurrentBuild()).append(')'); 305 305 } catch (ReflectiveOperationException e) { 306 Main.error(e);306 Logging.error(e); 307 307 } 308 308 return sb.toString(); … … 346 346 insecurePubKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(INSECURE_PUBLIC_KEY)); 347 347 } catch (InvalidKeySpecException | NoSuchAlgorithmException e) { 348 Main.error(e);348 Logging.error(e); 349 349 return; 350 350 } … … 362 362 } catch (InvalidKeyException | NoSuchProviderException | SignatureException e) { 363 363 // If exception this is not a certificate related to JOSM, just trace it 364 Main.trace(alias + " --> " + e.getClass().getName());365 Main.trace(e);364 Logging.trace(alias + " --> " + e.getClass().getName()); 365 Logging.trace(e); 366 366 } 367 367 } … … 385 385 JOptionPane.showMessageDialog(Main.parent, message.toString(), tr("Warning"), JOptionPane.WARNING_MESSAGE); 386 386 for (String alias : insecureCertificates) { 387 Main.warn(tr("Removing insecure certificate from {0} keystore: {1}", WINDOWS_ROOT, alias));387 Logging.warn(tr("Removing insecure certificate from {0} keystore: {1}", WINDOWS_ROOT, alias)); 388 388 try { 389 389 ks.deleteEntry(alias); 390 390 } catch (KeyStoreException e) { 391 Main.error(e, tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage()));391 Logging.log(Logging.LEVEL_ERROR, tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage()), e); 392 392 } 393 393 } … … 404 404 if (alias != null) { 405 405 // JOSM certificate found, return 406 Main.debug(tr("JOSM localhost certificate found in {0} keystore: {1}", WINDOWS_ROOT, alias));406 Logging.debug(tr("JOSM localhost certificate found in {0} keystore: {1}", WINDOWS_ROOT, alias)); 407 407 return false; 408 408 } 409 409 } catch (ArrayIndexOutOfBoundsException e) { 410 410 // catch error of JDK-8172244 as bug seems to not be fixed anytime soon 411 Main.error(e, "JDK-8172244 occured. Abort HTTPS setup");411 Logging.log(Logging.LEVEL_ERROR, "JDK-8172244 occured. Abort HTTPS setup", e); 412 412 return false; 413 413 } … … 425 425 } 426 426 // install it to Windows-ROOT keystore, used by IE, Chrome and Safari, but not by Firefox 427 Main.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT));427 Logging.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT)); 428 428 ks.setEntry(entryAlias, trustedCert, null); 429 429 return true; … … 508 508 Path templateFile = FileSystems.getDefault().getPath(javaLibPath, templateFileName); 509 509 if (!Files.isReadable(templateFile)) { 510 Main.warn("extended font config - unable to find font config template file {0}", templateFile.toString());510 Logging.warn("extended font config - unable to find font config template file {0}", templateFile.toString()); 511 511 return; 512 512 } … … 532 532 extras.add(entry); 533 533 } else { 534 Main.trace("extended font config - already registered font for charset ''{0}'' - skipping ''{1}''",534 Logging.trace("extended font config - already registered font for charset ''{0}'' - skipping ''{1}''", 535 535 entry.charset, entry.name); 536 536 } 537 537 } else { 538 Main.trace("extended font config - Font ''{0}'' not found on system - skipping", entry.name);538 Logging.trace("extended font config - Font ''{0}'' not found on system - skipping", entry.name); 539 539 } 540 540 } … … 548 548 String prevValue = props.getProperty(key); 549 549 if (prevValue != null && !prevValue.equals(value)) { 550 Main.warn("extended font config - overriding ''{0}={1}'' with ''{2}''", key, prevValue, value);550 Logging.warn("extended font config - overriding ''{0}={1}'' with ''{2}''", key, prevValue, value); 551 551 } 552 552 w.append(key + '=' + value + '\n'); … … 561 561 String prevValue = props.getProperty(key); 562 562 if (prevValue != null && !prevValue.equals(value)) { 563 Main.warn("extended font config - overriding ''{0}={1}'' with ''{2}''", key, prevValue, value);563 Logging.warn("extended font config - overriding ''{0}={1}'' with ''{2}''", key, prevValue, value); 564 564 } 565 565 w.append(key + '=' + value + '\n'); … … 575 575 Utils.updateSystemProperty("sun.awt.fontconfig", fontconfigFile.toString()); 576 576 } catch (IOException ex) { 577 Main.error(ex);577 Logging.error(ex); 578 578 } 579 579 } … … 603 603 fontsAvail.add(""); // for devanagari 604 604 } catch (IOException ex) { 605 Main.error(ex, false);606 Main.warn("extended font config - failed to load available Fonts");605 Logging.log(Logging.LEVEL_ERROR, ex); 606 Logging.warn("extended font config - failed to load available Fonts"); 607 607 fontsAvail = null; 608 608 }
Note:
See TracChangeset
for help on using the changeset viewer.
