diff --git a/CS2JLibrary/src/RusticiSoftware/System/IO/DirectorySupport.java b/CS2JLibrary/src/RusticiSoftware/System/IO/DirectorySupport.java index 421f88c..a9b71e9 100755 --- a/CS2JLibrary/src/RusticiSoftware/System/IO/DirectorySupport.java +++ b/CS2JLibrary/src/RusticiSoftware/System/IO/DirectorySupport.java @@ -121,7 +121,7 @@ public class DirectorySupport { // In .Net Directory.GetFiles, if the searchpattern contains directory path separators // then it will search subdirs. - ArrayList allMatches = new ArrayList(); + ArrayList allMatches = new ArrayList(); // we split on both / and \ characters String[] patternComponents = searchpattern.split("[/\\\\]",2); @@ -145,7 +145,7 @@ public class DirectorySupport { } } - return (String[])allMatches.toArray(new String[allMatches.size()]); + return allMatches.toArray(new String[allMatches.size()]); } diff --git a/CS2JLibrary/src/RusticiSoftware/System/StringSupport.java b/CS2JLibrary/src/RusticiSoftware/System/StringSupport.java index d4f2137..4f37286 100755 --- a/CS2JLibrary/src/RusticiSoftware/System/StringSupport.java +++ b/CS2JLibrary/src/RusticiSoftware/System/StringSupport.java @@ -235,9 +235,9 @@ public class StringSupport { if (str.endsWith(c1+"")) { // Add empty string for .Net - ArrayList ret_al = new ArrayList(Arrays.asList(rets)); + ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ret_al.add(""); - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); } return rets; } @@ -248,9 +248,9 @@ public class StringSupport { if (str.endsWith(c1+"") || str.endsWith(c2+"")) { // Add empty string for .Net - ArrayList ret_al = new ArrayList(Arrays.asList(rets)); + ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ret_al.add(""); - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); } return rets; } @@ -265,16 +265,16 @@ public class StringSupport { if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(c+"")) { // Add empty string for .Net - ArrayList ret_al = new ArrayList(Arrays.asList(rets)); + ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ret_al.add(""); - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); break; } } if (options == StringSplitOptions.RemoveEmptyEntries) { - ArrayList ret_al = new ArrayList(); + ArrayList ret_al = new ArrayList(); for (String p : rets) { if (!p.equals("")) @@ -282,7 +282,7 @@ public class StringSupport { ret_al.add(p); } } - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); } return rets; @@ -297,16 +297,16 @@ public class StringSupport { if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(s)) { // Add empty string for .Net - ArrayList ret_al = new ArrayList(Arrays.asList(rets)); + ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ret_al.add(""); - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); break; } } if (options == StringSplitOptions.RemoveEmptyEntries) { - ArrayList ret_al = new ArrayList(); + ArrayList ret_al = new ArrayList(); for (String p : rets) { if (!p.equals("")) @@ -314,7 +314,7 @@ public class StringSupport { ret_al.add(p); } } - rets = (String[])ret_al.toArray(new String [ret_al.size()]); + rets = ret_al.toArray(new String [ret_al.size()]); } return rets;