commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1686260 [1/5] - in /commons/proper/io/trunk/src: main/java/org/apache/commons/io/ main/java/org/apache/commons/io/input/ main/java/org/apache/commons/io/monitor/ test/java/org/apache/commons/io/ test/java/org/apache/commons/io/filefilter/ ...
Date Thu, 18 Jun 2015 15:57:57 GMT
Author: krosenvold
Date: Thu Jun 18 15:57:56 2015
New Revision: 1686260

URL: http://svn.apache.org/r1686260
Log:
Language level code changes

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FilenameUtils.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/XmlStreamReader.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/monitor/FileEntry.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/ByteOrderMarkTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/DemuxTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileSystemUtilsTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsCopyTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/IOUtilsWriteTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ClassLoaderObjectInputStreamTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ProxyReaderTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamBlockSize.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/XmlStreamReaderTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/ProxyWriterTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/StringBuilderWriterTest.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java?rev=1686260&r1=1686259&r2=1686260&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java Thu
Jun 18 15:57:56 2015
@@ -74,7 +74,7 @@ public class FileCleaningTracker {
      * @throws NullPointerException if the file is null
      */
     public void track(final File file, final Object marker) {
-        track(file, marker, (FileDeleteStrategy) null);
+        track(file, marker, null);
     }
 
     /**
@@ -104,7 +104,7 @@ public class FileCleaningTracker {
      * @throws NullPointerException if the path is null
      */
     public void track(final String path, final Object marker) {
-        track(path, marker, (FileDeleteStrategy) null);
+        track(path, marker, null);
     }
 
     /**

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java?rev=1686260&r1=1686259&r2=1686260&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileSystemUtils.java Thu Jun
18 15:57:56 2015
@@ -75,23 +75,23 @@ public class FileSystemUtils {
             }
             osName = osName.toLowerCase(Locale.ENGLISH);
             // match
-            if (osName.indexOf("windows") != -1) {
+            if (osName.contains("windows")) {
                 os = WINDOWS;
-            } else if (osName.indexOf("linux") != -1 ||
-                osName.indexOf("mpe/ix") != -1 ||
-                osName.indexOf("freebsd") != -1 ||
-                osName.indexOf("irix") != -1 ||
-                osName.indexOf("digital unix") != -1 ||
-                osName.indexOf("unix") != -1 ||
-                osName.indexOf("mac os x") != -1) {
+            } else if (osName.contains("linux") ||
+                    osName.contains("mpe/ix") ||
+                    osName.contains("freebsd") ||
+                    osName.contains("irix") ||
+                    osName.contains("digital unix") ||
+                    osName.contains("unix") ||
+                    osName.contains("mac os x")) {
                 os = UNIX;
-            } else if (osName.indexOf("sun os") != -1 ||
-                osName.indexOf("sunos") != -1 ||
-                osName.indexOf("solaris") != -1) {
+            } else if (osName.contains("sun os") ||
+                    osName.contains("sunos") ||
+                    osName.contains("solaris")) {
                 os = POSIX_UNIX;
                 dfPath = "/usr/xpg4/bin/df";
-            } else if (osName.indexOf("hp-ux") != -1 ||
-                osName.indexOf("aix") != -1) {
+            } else if (osName.contains("hp-ux") ||
+                    osName.contains("aix")) {
                 os = POSIX_UNIX;
             } else {
                 os = OTHER;



Mime
View raw message