--- old/src/share/classes/java/io/FileOutputStream.java 2013-05-01 17:25:03.494955636 -0700 +++ new/src/share/classes/java/io/FileOutputStream.java 2013-05-01 17:25:03.330955640 -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;