Tue, 21 May 2013 12:17:18 +0100
7060779: test/tools/javac/diags/Example.java leaves directories in tempdir
Reviewed-by: mcimadamore
test/tools/javac/diags/Example.java | file | annotate | diff | comparison | revisions |
1.1 --- a/test/tools/javac/diags/Example.java Tue May 21 11:41:21 2013 +0100 1.2 +++ b/test/tools/javac/diags/Example.java Tue May 21 12:17:18 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -296,7 +296,10 @@ 1.11 private Set<String> actualKeys; 1.12 private Set<String> declaredKeys; 1.13 1.14 - static File tempDir = new File(System.getProperty("java.io.tmpdir")); 1.15 + static File tempDir = (System.getProperty("test.src") != null) ? 1.16 + new File(System.getProperty("user.dir")): 1.17 + new File(System.getProperty("java.io.tmpdir")); 1.18 + 1.19 static void setTempDir(File tempDir) { 1.20 Example.tempDir = tempDir; 1.21 }