Skip to content

Commit

Permalink
Merge pull request #1375, remove unnecessary boxing.
Browse files Browse the repository at this point in the history
Fixes #1245
  • Loading branch information
hqq2023623 authored and chickenlj committed Feb 24, 2018
1 parent fddedf6 commit ddb677b
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ protected static Object getParamArg(Class cl) {
else if (boolean.class.equals(cl))
return Boolean.FALSE;
else if (byte.class.equals(cl))
return new Byte((byte) 0);
return 0;
else if (short.class.equals(cl))
return new Short((short) 0);
return 0;
else if (char.class.equals(cl))
return new Character((char) 0);
return 0;
else if (int.class.equals(cl))
return Integer.valueOf(0);
return 0;
else if (long.class.equals(cl))
return Long.valueOf(0);
return 0L;
else if (float.class.equals(cl))
return Float.valueOf(0);
return 0F;
else if (double.class.equals(cl))
return Double.valueOf(0);
return 0D;
else
throw new UnsupportedOperationException();
}
Expand Down

0 comments on commit ddb677b

Please sign in to comment.