Skip to content

Commit 89333a7

Browse files
committed
Fix some obvious raw types
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1440554 13f79535-47bb-0310-9956-ffa450edef68
1 parent eae4898 commit 89333a7

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/main/java/org/apache/commons/cli/Option.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ public Object getType()
200200
@Deprecated
201201
public void setType(Object type)
202202
{
203-
setType((Class) type);
203+
setType((Class<?>) type);
204204
}
205205

206206
/**
207207
* Sets the type of this Option.
208208
*
209209
* @param type the type of this Option
210210
*/
211-
public void setType(Class type)
211+
public void setType(Class<?> type)
212212
{
213213
this.type = type;
214214
}

src/main/java/org/apache/commons/cli/OptionBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public final class OptionBuilder
4848
private static int numberOfArgs = Option.UNINITIALIZED;
4949

5050
/** option type */
51-
private static Class type;
51+
private static Class<?> type;
5252

5353
/** option can have an optional argument value */
5454
private static boolean optionalArg;
@@ -294,7 +294,7 @@ public static OptionBuilder hasOptionalArgs(int numArgs)
294294
@Deprecated
295295
public static OptionBuilder withType(Object newType)
296296
{
297-
return withType((Class) newType);
297+
return withType((Class<?>) newType);
298298
}
299299

300300
/**
@@ -304,7 +304,7 @@ public static OptionBuilder withType(Object newType)
304304
* @param newType the type of the Options argument value
305305
* @return the OptionBuilder instance
306306
*/
307-
public static OptionBuilder withType(Class newType)
307+
public static OptionBuilder withType(Class<?> newType)
308308
{
309309
OptionBuilder.type = newType;
310310

src/main/java/org/apache/commons/cli/TypeHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class TypeHandler
4646
*/
4747
public static Object createValue(String str, Object obj) throws ParseException
4848
{
49-
return createValue(str, (Class) obj);
49+
return createValue(str, (Class<?>) obj);
5050
}
5151

5252
/**
@@ -59,7 +59,7 @@ public static Object createValue(String str, Object obj) throws ParseException
5959
* the value of <code>str</code>.
6060
* @throws ParseException if the value creation for the given class failed
6161
*/
62-
public static Object createValue(String str, Class clazz) throws ParseException
62+
public static Object createValue(String str, Class<?> clazz) throws ParseException
6363
{
6464
if (PatternOptionBuilder.STRING_VALUE == clazz)
6565
{
@@ -112,7 +112,7 @@ else if (PatternOptionBuilder.URL_VALUE == clazz)
112112
*/
113113
public static Object createObject(String classname) throws ParseException
114114
{
115-
Class cl;
115+
Class<?> cl;
116116

117117
try
118118
{
@@ -167,7 +167,7 @@ public static Number createNumber(String str) throws ParseException
167167
* @return The class if it is found
168168
* @throws ParseException if the class could not be found
169169
*/
170-
public static Class createClass(String classname) throws ParseException
170+
public static Class<?> createClass(String classname) throws ParseException
171171
{
172172
try
173173
{

0 commit comments

Comments
 (0)