jdk/src/share/classes/java/io/RandomAccessFile.java
changeset 17430 c445531b8f6b
parent 11676 7e75ec031b97
child 18786 52a2658627c2
--- a/jdk/src/share/classes/java/io/RandomAccessFile.java	Mon May 06 06:05:06 2013 +0200
+++ b/jdk/src/share/classes/java/io/RandomAccessFile.java	Mon May 06 14:17:59 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -228,6 +228,9 @@
         if (name == null) {
             throw new NullPointerException();
         }
+        if (file.isInvalid()) {
+            throw new FileNotFoundException("Invalid file path");
+        }
         fd = new FileDescriptor();
         fd.attach(this);
         open(name, imode);