()
| 373 | private static final String CERTS_KEY = |
| 374 | "deployment.user.security.trusted.certs"; |
| 375 | @Override |
| 376 | public void runBare() throws Throwable { |
| 377 | if (runningWebStart()) { |
| 378 | super.runBare(); |
| 379 | } |
| 380 | else if (!GraphicsEnvironment.isHeadless()) { |
| 381 | File policy = File.createTempFile(getName(), ".policy"); |
| 382 | OutputStream os = new FileOutputStream(policy); |
| 383 | os.write(POLICY.getBytes()); |
| 384 | os.close(); |
| 385 | File dpfile = findDeploymentProperties(); |
| 386 | Properties saved = new Properties(); |
| 387 | saved.load(new FileInputStream(dpfile)); |
| 388 | Properties props = new Properties(); |
| 389 | props.putAll(saved); |
| 390 | props.setProperty(CERTS_KEY, new File("jna.keystore").getAbsolutePath()); |
| 391 | props.setProperty(POLICY_KEY, policy.getAbsolutePath()); |
| 392 | os = new FileOutputStream(dpfile); |
| 393 | props.store(os, "deployment.properties (for testing)"); |
| 394 | os.close(); |
| 395 | try { |
| 396 | runTestUnderWebStart(); |
| 397 | } |
| 398 | finally { |
| 399 | policy.delete(); |
| 400 | os = new FileOutputStream(dpfile); |
| 401 | saved.store(os, "deployment.properties"); |
| 402 | os.close(); |
| 403 | } |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | private static void sendResults(Throwable t, int port) throws IOException { |
| 408 | Socket s = new Socket(InetAddress.getLocalHost(), port); |
nothing calls this directly
no test coverage detected