Menu

#20 varargs custom functions

open
nobody
None
5
2011-03-28
2011-03-28
Robert Lieb
No

For formatting (concat) different properties in a query we created a new custom function like:

public String format(String format, Object... args) {
StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb);
formatter.format(format, args);

return sb.toString();
}

The class was registered by the Query instance but the method was not found. I guess because of the varargs in the method signature.
It would be a nice and very useful feature to have it in JoSQL.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.