--- a/jdk/src/share/classes/java/io/FileOutputStream.java Mon May 06 06:05:06 2013 +0200
+++ b/jdk/src/share/classes/java/io/FileOutputStream.java Mon May 06 14:17:59 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2011, 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
@@ -196,6 +196,9 @@
if (name == null) {
throw new NullPointerException();
}
+ if (file.isInvalid()) {
+ throw new FileNotFoundException("Invalid file path");
+ }
this.fd = new FileDescriptor();
fd.attach(this);
this.append = append;