--- a/langtools/test/tools/javac/api/6440528/T6440528.java Tue Oct 21 13:08:20 2014 -0700
+++ b/langtools/test/tools/javac/api/6440528/T6440528.java Tue Oct 21 17:50:13 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -34,7 +34,6 @@
import java.io.File;
import java.lang.reflect.Field;
-import java.nio.file.Path;
import java.util.Arrays;
import static javax.tools.StandardLocation.CLASS_OUTPUT;
import javax.tools.*;
@@ -60,10 +59,10 @@
System.err.println("Got: " + got);
}
- private File getUnderlyingFile(FileObject o) throws Exception {
- Field file = o.getClass().getDeclaredField("file"); // assumes RegularFileObject
+ private File getUnderlyingFile(Object o) throws Exception {
+ Field file = o.getClass().getDeclaredField("file");
file.setAccessible(true);
- return ((Path)file.get(o)).toFile();
+ return (File)file.get(o);
}
public static void main(String... args) throws Exception {