1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Add Type arguments to squelch some warnings

This commit is contained in:
Kevin Glynn 2010-06-07 12:32:32 -05:00
parent d9d7530103
commit de2680aebd
2 changed files with 14 additions and 14 deletions

View File

@ -121,7 +121,7 @@ public class DirectorySupport {
// In .Net Directory.GetFiles, if the searchpattern contains directory path separators // In .Net Directory.GetFiles, if the searchpattern contains directory path separators
// then it will search subdirs. // then it will search subdirs.
ArrayList allMatches = new ArrayList(); ArrayList<String> allMatches = new ArrayList<String>();
// we split on both / and \ characters // we split on both / and \ characters
String[] patternComponents = searchpattern.split("[/\\\\]",2); 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()]);
} }

View File

@ -235,9 +235,9 @@ public class StringSupport {
if (str.endsWith(c1+"")) if (str.endsWith(c1+""))
{ {
// Add empty string for .Net // Add empty string for .Net
ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ArrayList<String> ret_al = new ArrayList<String>(Arrays.asList(rets));
ret_al.add(""); ret_al.add("");
rets = (String[])ret_al.toArray(new String [ret_al.size()]); rets = ret_al.toArray(new String [ret_al.size()]);
} }
return rets; return rets;
} }
@ -248,9 +248,9 @@ public class StringSupport {
if (str.endsWith(c1+"") || str.endsWith(c2+"")) if (str.endsWith(c1+"") || str.endsWith(c2+""))
{ {
// Add empty string for .Net // Add empty string for .Net
ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ArrayList<String> ret_al = new ArrayList<String>(Arrays.asList(rets));
ret_al.add(""); ret_al.add("");
rets = (String[])ret_al.toArray(new String [ret_al.size()]); rets = ret_al.toArray(new String [ret_al.size()]);
} }
return rets; return rets;
} }
@ -265,16 +265,16 @@ public class StringSupport {
if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(c+"")) if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(c+""))
{ {
// Add empty string for .Net // Add empty string for .Net
ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ArrayList<String> ret_al = new ArrayList<String>(Arrays.asList(rets));
ret_al.add(""); ret_al.add("");
rets = (String[])ret_al.toArray(new String [ret_al.size()]); rets = ret_al.toArray(new String [ret_al.size()]);
break; break;
} }
} }
if (options == StringSplitOptions.RemoveEmptyEntries) if (options == StringSplitOptions.RemoveEmptyEntries)
{ {
ArrayList ret_al = new ArrayList(); ArrayList<String> ret_al = new ArrayList<String>();
for (String p : rets) for (String p : rets)
{ {
if (!p.equals("")) if (!p.equals(""))
@ -282,7 +282,7 @@ public class StringSupport {
ret_al.add(p); 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; return rets;
@ -297,16 +297,16 @@ public class StringSupport {
if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(s)) if (options != StringSplitOptions.RemoveEmptyEntries && str.endsWith(s))
{ {
// Add empty string for .Net // Add empty string for .Net
ArrayList ret_al = new ArrayList(Arrays.asList(rets)); ArrayList<String> ret_al = new ArrayList<String>(Arrays.asList(rets));
ret_al.add(""); ret_al.add("");
rets = (String[])ret_al.toArray(new String [ret_al.size()]); rets = ret_al.toArray(new String [ret_al.size()]);
break; break;
} }
} }
if (options == StringSplitOptions.RemoveEmptyEntries) if (options == StringSplitOptions.RemoveEmptyEntries)
{ {
ArrayList ret_al = new ArrayList(); ArrayList<String> ret_al = new ArrayList<String>();
for (String p : rets) for (String p : rets)
{ {
if (!p.equals("")) if (!p.equals(""))
@ -314,7 +314,7 @@ public class StringSupport {
ret_al.add(p); 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; return rets;