@@ -1507,7 +1507,7 @@ public static String getUserDirectoryPath() {
15071507 * @since 2.9.0
15081508 */
15091509 public static boolean isDirectory (final File file , final LinkOption ... options ) {
1510- return file != null ? Files .isDirectory (file .toPath (), options ) : false ;
1510+ return file != null && Files .isDirectory (file .toPath (), options );
15111511 }
15121512
15131513 /**
@@ -1681,7 +1681,7 @@ public static boolean isFileNewer(final File file, final Instant instant) {
16811681 */
16821682 public static boolean isFileNewer (final File file , final long timeMillis ) {
16831683 Objects .requireNonNull (file , "file" );
1684- return file .exists () ? lastModifiedUnchecked (file ) > timeMillis : false ;
1684+ return file .exists () && lastModifiedUnchecked (file ) > timeMillis ;
16851685 }
16861686
16871687 /**
@@ -1842,7 +1842,7 @@ public static boolean isFileOlder(final File file, final Instant instant) {
18421842 */
18431843 public static boolean isFileOlder (final File file , final long timeMillis ) {
18441844 Objects .requireNonNull (file , "file" );
1845- return file .exists () ? lastModifiedUnchecked (file ) < timeMillis : false ;
1845+ return file .exists () && lastModifiedUnchecked (file ) < timeMillis ;
18461846 }
18471847
18481848 /**
@@ -1860,7 +1860,7 @@ public static boolean isFileOlder(final File file, final long timeMillis) {
18601860 * @since 2.9.0
18611861 */
18621862 public static boolean isRegularFile (final File file , final LinkOption ... options ) {
1863- return file != null ? Files .isRegularFile (file .toPath (), options ) : false ;
1863+ return file != null && Files .isRegularFile (file .toPath (), options );
18641864 }
18651865
18661866 /**
@@ -1875,7 +1875,7 @@ public static boolean isRegularFile(final File file, final LinkOption... options
18751875 * @see Files#isSymbolicLink(Path)
18761876 */
18771877 public static boolean isSymlink (final File file ) {
1878- return file != null ? Files .isSymbolicLink (file .toPath ()) : false ;
1878+ return file != null && Files .isSymbolicLink (file .toPath ());
18791879 }
18801880
18811881 /**
@@ -2060,7 +2060,7 @@ public static LineIterator lineIterator(final File file, final String charsetNam
20602060 inputStream = openInputStream (file );
20612061 return IOUtils .lineIterator (inputStream , charsetName );
20622062 } catch (final IOException | RuntimeException ex ) {
2063- IOUtils .closeQuietly (inputStream , e -> ex . addSuppressed ( e ) );
2063+ IOUtils .closeQuietly (inputStream , ex :: addSuppressed );
20642064 throw ex ;
20652065 }
20662066 }
0 commit comments