Skip to content

Commit

Permalink
fix typo in name of variable
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Jul 26, 2021
1 parent 49c6b67 commit dc69022
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -28,7 +28,7 @@
*/
public class StringToObjectConverter {

private static final Class<?>[] STING_CLASS_PARAMETER = new Class[] { String.class };
private static final Class<?>[] STRING_CLASS_PARAMETER = new Class[] { String.class };

static public boolean canBeBuiltFromSimpleString(Class<?> parameterClass) {
Package p = parameterClass.getPackage();
Expand Down Expand Up @@ -98,7 +98,7 @@ static private Charset convertToCharset(ContextAware ca, String val) {
// returned value may be null and in most cases it is null.
public static Method getValueOfMethod(Class<?> type) {
try {
return type.getMethod(CoreConstants.VALUE_OF, STING_CLASS_PARAMETER);
return type.getMethod(CoreConstants.VALUE_OF, STRING_CLASS_PARAMETER);
} catch (NoSuchMethodException e) {
return null;
} catch (SecurityException e) {
Expand All @@ -117,7 +117,7 @@ static private boolean followsTheValueOfConvention(Class<?> parameterClass) {

private static Object convertByValueOfMethod(ContextAware ca, Class<?> type, String val) {
try {
Method valueOfMethod = type.getMethod(CoreConstants.VALUE_OF, STING_CLASS_PARAMETER);
Method valueOfMethod = type.getMethod(CoreConstants.VALUE_OF, STRING_CLASS_PARAMETER);
return valueOfMethod.invoke(null, val);
} catch (Exception e) {
ca.addError("Failed to invoke " + CoreConstants.VALUE_OF + "{} method in class [" + type.getName() + "] with value [" + val + "]");
Expand Down

0 comments on commit dc69022

Please sign in to comment.