Skip to content

Commit

Permalink
Merge pull request #81 from zeoflow/string-creator-param
Browse files Browse the repository at this point in the history
Fixed Invalid type for param from `StringCreator`
  • Loading branch information
teogor authored Jun 25, 2021
2 parents 67a1f90 + 4e67c99 commit d782cd5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ private void addArgument(String format, char c, Object arg, boolean camelCase, b
private String argToName(Object o)
{
if (o instanceof CharSequence) return o.toString();
else if (o instanceof Integer) return o.toString();
else if (o instanceof Long) return o.toString();
else if (o instanceof Boolean) return o.toString();
else if (o instanceof Float) return o.toString();
throw new IllegalArgumentException("expected name but was " + o);
}

Expand Down

0 comments on commit d782cd5

Please sign in to comment.