]> source.dussan.org Git - jgit.git/commitdiff
FS_Win32: Add missing parentheses on if-blocks 76/143576/4
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sat, 8 Jun 2019 06:06:22 +0000 (15:06 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Tue, 11 Jun 2019 01:51:30 +0000 (10:51 +0900)
Change-Id: I70504484f20aee103e51c852d71cd41b54093793
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java

index 98797dc64fff67ebf8d69888d358b356293c0d44..3ccbd72806cadee725e95bc54378cf1638fa3c95 100644 (file)
@@ -205,18 +205,21 @@ public class FS_Win32 extends FS {
        @Override
        protected File userHomeImpl() {
                String home = SystemReader.getInstance().getenv("HOME"); //$NON-NLS-1$
-               if (home != null)
+               if (home != null) {
                        return resolve(null, home);
+               }
                String homeDrive = SystemReader.getInstance().getenv("HOMEDRIVE"); //$NON-NLS-1$
                if (homeDrive != null) {
                        String homePath = SystemReader.getInstance().getenv("HOMEPATH"); //$NON-NLS-1$
-                       if (homePath != null)
+                       if (homePath != null) {
                                return new File(homeDrive, homePath);
+                       }
                }
 
                String homeShare = SystemReader.getInstance().getenv("HOMESHARE"); //$NON-NLS-1$
-               if (homeShare != null)
+               if (homeShare != null) {
                        return new File(homeShare);
+               }
 
                return super.userHomeImpl();
        }
@@ -237,8 +240,9 @@ public class FS_Win32 extends FS {
        /** {@inheritDoc} */
        @Override
        public boolean supportsSymlinks() {
-               if (supportSymlinks == null)
+               if (supportSymlinks == null) {
                        detectSymlinkSupport();
+               }
                return Boolean.TRUE.equals(supportSymlinks);
        }
 
@@ -254,12 +258,13 @@ public class FS_Win32 extends FS {
                                | InternalError e) {
                        supportSymlinks = Boolean.FALSE;
                } finally {
-                       if (tempFile != null)
+                       if (tempFile != null) {
                                try {
                                        FileUtils.delete(tempFile);
                                } catch (IOException e) {
                                        throw new RuntimeException(e); // panic
                                }
+                       }
                }
        }