changeset 2149:3d9750039fff

7060779: test/tools/javac/diags/Example.java leaves directories in tempdir Reviewed-by: mcimadamore
author vromero
date Tue, 21 May 2013 12:17:18 +0100
parents 824932ecdbc8
children 37295244f534
files test/tools/javac/diags/Example.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/diags/Example.java	Tue May 21 11:41:21 2013 +0100
+++ b/test/tools/javac/diags/Example.java	Tue May 21 12:17:18 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -296,7 +296,10 @@
     private Set<String> actualKeys;
     private Set<String> declaredKeys;
 
-    static File tempDir = new File(System.getProperty("java.io.tmpdir"));
+    static File tempDir = (System.getProperty("test.src") != null) ?
+            new File(System.getProperty("user.dir")):
+            new File(System.getProperty("java.io.tmpdir"));
+
     static void setTempDir(File tempDir) {
         Example.tempDir = tempDir;
     }