errael commented on code in PR #5332:
URL: https://github.com/apache/netbeans/pull/5332#discussion_r1107804992
##########
platform/options.keymap/src/org/netbeans/modules/options/keymap/KeymapViewModel.java:
##########
@@ -229,8 +229,9 @@ private void update0() {
supressDataEvents = true;
getDataVector().removeAllElements();
- for (String categorySet : getCategories().keySet()) {
- for (String category : getCategories().get(categorySet)) {
+
+ for (Map.Entry<String, List<String>> entry :
getCategories().entrySet()) {
+ for (String category : entry.getValue()) {
Review Comment:
Ditto
##########
platform/options.keymap/src/org/netbeans/modules/options/keymap/KeymapPanel.java:
##########
@@ -299,8 +299,9 @@ private void narrowByShortcut() {
getModel().runWithoutEvents(new Runnable() {
public void run() {
getModel().getDataVector().removeAllElements();
- for (String categorySet :
getModel().getCategories().keySet()) {
- for (String category :
getModel().getCategories().get(categorySet)) {
+
+ for (Map.Entry<String, List<String>> entry :
getModel().getCategories().entrySet()) {
+ for (String category : entry.getValue()) {
Review Comment:
Almost done, I'm getting punchy... Again not looking for a change, just
mentioning, a check on myself
```
for(List<String> categories : getModel().getCategories().values()) {
for(String category : categories) {
```
##########
ide/bugtracking/src/org/netbeans/modules/bugtracking/RepositoryImpl.java:
##########
@@ -116,7 +116,7 @@ public void propertyChange(PropertyChangeEvent evt) {
}
Collection<QueryImpl> queries = new
ArrayList<>(getQueries());
synchronized(queryMap) {
- List<Q> toRemove = new LinkedList<Q>();
+ Set<Q> toRemove = new HashSet<>();
Review Comment:
Just to note, ( showing I actually looked through the PR ;-) ).
ArrayList is probably better than HashSet. And much better if larger "N" and
not too many duplicate entries.
--
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