mbien commented on code in PR #5332:
URL: https://github.com/apache/netbeans/pull/5332#discussion_r1103568227
##########
enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/client/ClientGenerationStrategy.java:
##########
@@ -492,11 +492,15 @@ protected void addQueryParams(TreeMaker maker, HttpParams
httpParams,
commentBuffer.append("<LI>"+otherParam+" [OPTIONAL]\n");
//NOI18N
}
// add default params
- Map<String,String> defaultParams =
httpParams.getDefaultQueryParams();
- for (String key : defaultParams.keySet()) {
- commentBuffer.append("<LI>"+key+" [OPTIONAL, DEFAULT
VALUE: \""+
- defaultParams.get(key)+"\"]\n"); //NOI18N
- }
+ Map<String, String> defaultParams =
httpParams.getDefaultQueryParams();
+ defaultParams.forEach((k, v) -> {
+ commentBuffer
+ .append("<LI>")
+ .append(k)
+ .append(" [OPTIONAL, DEFAULT VALUE: \"")
+ .append(v)
+ .append("\"]\n"); //NOI18N
+ });
Review Comment:
can you revert the `append` part? Concatenation of short Strings with `+` is
already as fast as it gets thanks to invoke dynamic.
```java
commentBuffer.append("<LI>"+k+" [OPTIONAL, DEFAULT VALUE:
\""+v+"\"]\n"); //NOI18N
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists