Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTokenConverter class has a problem #920

Open
TasMot opened this issue Feb 5, 2025 · 0 comments
Open

DateTokenConverter class has a problem #920

TasMot opened this issue Feb 5, 2025 · 0 comments

Comments

@TasMot
Copy link

TasMot commented Feb 5, 2025

This method:

`
public String convert(Object o) {
if (o == null) {
throw new IllegalArgumentException("Null argument forbidden");
} else if (o instanceof Date) {
return this.convert((Date)o);
} else if (o instanceof Instant) {
return this.convert((Instant)o);
} else {
String var10002 = String.valueOf(o);
throw new IllegalArgumentException("Cannot convert " + var10002 + " of type" + o.getClass().getName());
}
}

`
It generates the proper "String.valueOf(o)" and then it throws an exception. So, the proper string value of the object is never returnd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant