You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2026/04/10 18:33:31 UTC
[PR] RequestProcessor warning fixes and minor update [netbeans]
mbien opened a new pull request, #9330:
URL: https://github.com/apache/netbeans/pull/9330
- use `SortedSet#removeFirst` instead of `getFirst()+remove()`
- remove `ThreadDeath` and `AccessController.doPrivileged()` usage
- convert `Maps` of type `WeakHashMap` to `Set` where applicable
- generics rawtype warning fixes, diamonds, overrides and similar minor renovations
- javadoc typos
low priority, can wait for NB 31 unless it gets a review in time
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] RequestProcessor warning fixes and minor update [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #9330:
URL: https://github.com/apache/netbeans/pull/9330
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] RequestProcessor warning fixes and minor update [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #9330:
URL: https://github.com/apache/netbeans/pull/9330#discussion_r3068389269
##########
platform/openide.util/src/org/openide/util/RequestProcessor.java:
##########
@@ -825,14 +820,11 @@ public Future<?> submit(Runnable task) {
@Override
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException {
Parameters.notNull("tasks", tasks); //NOI18N
- List<Future<T>> result = new ArrayList<Future<T>>(tasks.size());
+ List<Future<T>> result = new ArrayList<>(tasks.size());
CountDownLatch wait = new CountDownLatch(tasks.size());
for (Callable<T> c : tasks) {
- if (c == null) {
- throw new NullPointerException ("Contains null tasks: " + //NOI18N
- tasks);
- }
- Callable<T> delegate = new WaitableCallable<T>(c, wait);
+ Objects.requireNonNull(c, "Contains null tasks: " + tasks); //NOI18N
+ Callable<T> delegate = new WaitableCallable<>(c, wait);
Review Comment:
`requireNonNull()` was not a good idea since it will concat the string every time now. Will revert those changes and check the diff again. Those where from a jackpot script where I didn't check if the right hand side was constant.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] RequestProcessor warning fixes and minor update [netbeans]
Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on code in PR #9330:
URL: https://github.com/apache/netbeans/pull/9330#discussion_r3068488186
##########
platform/openide.util/src/org/openide/util/RequestProcessor.java:
##########
@@ -825,14 +820,11 @@ public Future<?> submit(Runnable task) {
@Override
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException {
Parameters.notNull("tasks", tasks); //NOI18N
- List<Future<T>> result = new ArrayList<Future<T>>(tasks.size());
+ List<Future<T>> result = new ArrayList<>(tasks.size());
CountDownLatch wait = new CountDownLatch(tasks.size());
for (Callable<T> c : tasks) {
- if (c == null) {
- throw new NullPointerException ("Contains null tasks: " + //NOI18N
- tasks);
- }
- Callable<T> delegate = new WaitableCallable<T>(c, wait);
+ Objects.requireNonNull(c, "Contains null tasks: " + tasks); //NOI18N
+ Callable<T> delegate = new WaitableCallable<>(c, wait);
Review Comment:
Oh, good catch.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists