--- a/langtools/src/java.compiler/share/classes/javax/tools/ForwardingFileObject.java Wed Jul 05 20:22:22 2017 +0200
+++ b/langtools/src/java.compiler/share/classes/javax/tools/ForwardingFileObject.java Fri Feb 27 11:51:53 2015 +0000
@@ -31,6 +31,7 @@
import java.io.Reader;
import java.io.Writer;
import java.net.URI;
+import java.util.Objects;
/**
* Forwards calls to a given file object. Subclasses of this class
@@ -53,8 +54,7 @@
* @param fileObject delegate to this file object
*/
protected ForwardingFileObject(F fileObject) {
- fileObject.getClass(); // null check
- this.fileObject = fileObject;
+ this.fileObject = Objects.requireNonNull(fileObject);
}
public URI toUri() {