8026876: (fs) Build issue with src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
authoralanb
Fri, 18 Oct 2013 15:51:43 +0100
changeset 21292 f55838e2d1e0
parent 21290 db5e0cad1102
child 21293 56310f56feac
8026876: (fs) Build issue with src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java Reviewed-by: psandoz
jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
--- a/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java	Fri Oct 18 13:51:12 2013 +0100
+++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java	Fri Oct 18 15:51:43 2013 +0100
@@ -46,11 +46,14 @@
 
     private byte[] nameAsBytes(UnixPath file, String name) throws IOException {
         byte[] bytes = Util.toBytes(name);
-        //  "", "." and ".." not allowed
-        if ((bytes.length == 0 || bytes[0] == '.') &&
-            ((bytes.length <= 1 || (bytes.length == 2 && bytes[1] == '.')) {
-            throw new FileSystemException(file.getPathForExceptionMessage(),
-                null, "'" + name + "' is not a valid name");
+        // "", "." and ".." not allowed
+        if (bytes.length == 0 || bytes[0] == '.') {
+            if (bytes.length <= 1 ||
+                (bytes.length == 2 && bytes[1] == '.'))
+            {
+                throw new FileSystemException(file.getPathForExceptionMessage(),
+                    null, "'" + name + "' is not a valid name");
+            }
         }
         return bytes;
     }