summaryrefslogtreecommitdiffstats
path: root/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java')
-rwxr-xr-xpki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java b/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
index 29033d6b..a205d101 100755
--- a/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
+++ b/pki/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java
@@ -397,7 +397,7 @@ import java.util.Vector;
*/
public class ArgParser
{
- Vector matchList;
+ Vector<Record> matchList;
// int tabSpacing = 8;
String synopsisString;
boolean helpOptionsEnabled = true;
@@ -997,11 +997,11 @@ public class ArgParser
*/
public ArgParser(String synopsisString, boolean defaultHelp)
{
- matchList = new Vector(128);
+ matchList = new Vector<Record>(128);
this.synopsisString = synopsisString;
if (defaultHelp)
{ addOption ("-help,-? %h #displays help information", null);
- defaultHelpOption = firstHelpOption = (Record)matchList.get(0);
+ defaultHelpOption = firstHelpOption = matchList.get(0);
}
}
@@ -1826,7 +1826,7 @@ public class ArgParser
return null; // can't happen
}
- static void stringToArgs (Vector vec, String s,
+ static void stringToArgs (Vector<String> vec, String s,
boolean allowQuotedStrings)
throws StringScanException
{
@@ -1862,7 +1862,7 @@ public class ArgParser
{ args = new String[0];
}
LineNumberReader lineReader = new LineNumberReader (reader);
- Vector vec = new Vector(100, 100);
+ Vector<String> vec = new Vector<String>(100, 100);
String line;
int i, k;
@@ -2001,7 +2001,7 @@ public class ArgParser
*/
public String[] matchAllArgs (String[] args, int idx, int exitFlags)
{
- Vector unmatched = new Vector(10);
+ Vector<String> unmatched = new Vector<String>(10);
while (idx < args.length)
{ try
@@ -2063,6 +2063,7 @@ public class ArgParser
* @see ArgParser#getErrorMessage
* @see ArgParser#getUnmatchedArgument
*/
+ @SuppressWarnings("unchecked")
public int matchArg (String[] args, int idx)
throws ArgParseException
{
@@ -2121,7 +2122,7 @@ public class ArgParser
}
}
if (rec.resHolder instanceof Vector)
- { ((Vector)rec.resHolder).add (result);
+ { ((Vector<Object>)rec.resHolder).add (result);
}
}
catch (ArgParseException e)