[GitHub] [netbeans-tools] matthiasblaesing merged pull request #61: More appropriate template for notifications about new NetBeans version

2023-01-20 Thread GitBox


matthiasblaesing merged PR #61:
URL: https://github.com/apache/netbeans-tools/pull/61


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on pull request #5332: Improved collections usage. Part 1

2023-01-20 Thread GitBox


mbien commented on PR #5332:
URL: https://github.com/apache/netbeans/pull/5332#issuecomment-1398744544

   as previously mentioned by several committers in #5238. I would not 
recommend to create more PRs since you will run into merge conflicts and cause 
other problems later.
   
   Running automated refactorings is easy and fast, reviewing the changeset and 
making sure that:
- nothing breaks
- no other PRs are negatively affected by project wide changes, esp during 
RC phase when the master and delivery branches should not diverge unnecessarily 
since this would make PRs no longer portable
- and CI is not flooded,
   
   is not trivial and also time consuming.
   
   Since you have been sufficiently warned before I will be simply closing new 
cleanup PRs from now on. Your contributions are appreciated but cleanups have 
to be done in a way which does not disturb the project itself.
   
   cc @matthiasblaesing @neilcsmith-net @BradWalker 


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


mbien commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398721655

   tbh in case of inline hints we should turn it off and communicate how to 
turn it on again :P
   
   I have a hotkey for it and toggle it on and off on demand - works great.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


neilcsmith-net commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398717994

   I can only see one argument against?!  Versus 3 (now 4) people saying we 
should.  As with everything (eg. inline hints! :smile:) we need to communicate 
how to switch it off, but I think this is one of those really useful things 
that no-one finds.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


mbien commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398692622

   here is the (old) thread about this:
   https://lists.apache.org/thread/g9w0038rdsksony6xyl4q42vnj4jrjk4
   
   i would like to see it too enabled by default (I personally have it always 
enabled). I think the main argument against it was that it is too noisy.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien closed issue #5326: Can't make git push

2023-01-20 Thread GitBox


mbien closed issue #5326: Can't make git push
URL: https://github.com/apache/netbeans/issues/5326


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego commented on issue #5326: Can't make git push

2023-01-20 Thread GitBox


antoniodiego commented on issue #5326:
URL: https://github.com/apache/netbeans/issues/5326#issuecomment-1398664889

   Creating a token worked
   
   Thanks


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082806548


##
harness/o.n.insane/src/org/netbeans/insane/model/BinaryHeapModel.java:
##
@@ -49,7 +49,7 @@ public static HeapModel open(File file) throws Exception {
 // mmap it
 long len = data.length();
 buffer = new 
FileInputStream(data).getChannel().map(FileChannel.MapMode.READ_ONLY, 0, len);
-System.err.println("magic=" + buffer.getInt(0));
+System.err.println("magic=" + buffer.getInt(0)); // shouldn't this be 
replaced with logging statement?

Review Comment:
   sure - comment removed in 
https://github.com/apache/netbeans/pull/5317/commits/631e3a89503ae7112dc75357a8625ac2ea51f528



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082807213


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   comment removed in 
https://github.com/apache/netbeans/pull/5317/commits/631e3a89503ae7112dc75357a8625ac2ea51f528



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082806548


##
harness/o.n.insane/src/org/netbeans/insane/model/BinaryHeapModel.java:
##
@@ -49,7 +49,7 @@ public static HeapModel open(File file) throws Exception {
 // mmap it
 long len = data.length();
 buffer = new 
FileInputStream(data).getChannel().map(FileChannel.MapMode.READ_ONLY, 0, len);
-System.err.println("magic=" + buffer.getInt(0));
+System.err.println("magic=" + buffer.getInt(0)); // shouldn't this be 
replaced with logging statement?

Review Comment:
   sure



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 opened a new pull request, #5332: Improved collections usage. Part 1

2023-01-20 Thread GitBox


tbw777 opened a new pull request, #5332:
URL: https://github.com/apache/netbeans/pull/5332

   - keySet().contains() -> containsKey()
   - values().contains() -> containsValue()
   - keySet() -> entrySet() - both keys and values are used
   - keySet() -> values() - keys used only with get()
   - entrySet() -> values() - keys not used
   - entrySet() -> keySet() - values not used
   - remove() -> removeAll() - applicable
   - put() -> putAll()
   
   Targets: performance(1), structure(2), clean code(3)
   
   
   
   
   
   ---
   **^Add meaningful description above**
   
   By opening a pull request you confirm that, unless explicitly stated 
otherwise, the changes -
   
- are all your own work, and you have the right to contribute them.
- are contributed solely under the terms and conditions of the Apache 
License 2.0 (see section 5 of the license for more information).
   
   Please make sure (eg. `git log`) that all commits have a valid name and 
email address for you in the Author field.
   
   If you're a first time contributor, see the Contributing guidelines for more 
information.
   
   If you're a committer, please label the PR before pressing "Create pull 
request" so that the right test jobs can run.
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


neilcsmith-net commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398639090

   This was discussed recently - cc @mbien 
   
   Good to know it covers what you're looking for.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


antoniodiego commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398637667

   What do you think about leaving it enabled by default ?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


antoniodiego commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398635930

   It was not enabled and I enable it now
   
   I now can see info next to the project names
   
   I think this can already help a little


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-tools] neilcsmith-net commented on pull request #61: More appropriate template for notifications about new NetBeans version

2023-01-20 Thread GitBox


neilcsmith-net commented on PR #61:
URL: https://github.com/apache/netbeans-tools/pull/61#issuecomment-1398629084

   Looks fine to me, but don't have enough context of usage in the portal to 
want to approve.  Also looks like you addressed @matthiasblaesing comment, so 
if we need this in urgently, I'd proceed.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-tools] jkovalsky commented on pull request #61: More appropriate template for notifications about new NetBeans version

2023-01-20 Thread GitBox


jkovalsky commented on PR #61:
URL: https://github.com/apache/netbeans-tools/pull/61#issuecomment-1398615410

   @matthiasblaesing / @neilcsmith-net - can I get at least 1 approval please?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


neilcsmith-net commented on issue #5331:
URL: https://github.com/apache/netbeans/issues/5331#issuecomment-1398614842

   Do you have versioning labels enabled?  `Tools / Options / Team / Versioning 
/ Show Versioning Labels`.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-tools] jkovalsky commented on a diff in pull request #61: More appropriate template for notifications about new NetBeans version

2023-01-20 Thread GitBox


jkovalsky commented on code in PR #61:
URL: https://github.com/apache/netbeans-tools/pull/61#discussion_r1082753561


##
pp3/module/Application/src/Application/Controller/AdminController.php:
##
@@ -350,32 +350,37 @@ public function emailSendingAction() {
 
 $onlyVerified = false;
 $nbVersionId = [];
-$subject = '[NetBeans PluginPortal] ';
+$subject = '[NetBeans PluginPortal] Check your plugin with the new 
Apache NetBeans %4$s version!';
 $emailText = '
 
 
 
-Dear %1$s,
+Hey %1$s,
 
-we have some news for you.
-
-Your message
+
+have you heard of the new Apache NetBeans version on the horizon?
+Yes, the NetBeans community is going to release version %4$s soon!
+In order to have your great plugin(s) available on the NetBeans Update
+Center also for users of the new version please consider testing the
+plugin(s) with the latest RC build and possibly submit new verification
+request(s) via the Plugin Portal website.
+
 
 
 Your plugins:
 %3$s
 
 
-Direct link to the plugin portal:
-%2$s
+Direct link to the list of your plugins:
+%2$s/plugin/list

Review Comment:
   Thank you Matthias. In such case I would like to merge this so that you can 
redeploy the Plugin Portal sources ASAP in order to inform all plugin owners 
about NB17 RC1. Please approve if you agree.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


matthiasblaesing commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082738982


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   Ah I finally saw it. I never expected a comment on such a trivial loop (I 
stopped reading at the opening brace). The author wanted to say "iterate" not 
"count". I would remove it or change new line 243 to read "iterate all 
nonstatic fields and sum the sizes". Then it should be correct.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5326: Can't make git push

2023-01-20 Thread GitBox


neilcsmith-net commented on issue #5326:
URL: https://github.com/apache/netbeans/issues/5326#issuecomment-1398569579

   > I put the same credentials I use to login on GitHub.
   
   GitHub doesn't support that. You need to setup a token.
   
   See 
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego opened a new issue, #5331: Push sugestion when there's no local changes

2023-01-20 Thread GitBox


antoniodiego opened a new issue, #5331:
URL: https://github.com/apache/netbeans/issues/5331

   ### Description
   
   I think that will be good if it be showed prompt to make push on a project 
when there's no local changes a it and there are differences between local anda 
remote repositories.
   
   Maybe it will help to keeping remote repositories updated avoiding 
situations like traveling and forgetting to upload changes to the remote 
repository to continue working on them elsewhere
   
   ### Use case/motivation
   
   It should apper a symbol that signals that there are outgoing commit on the 
project as there's a symbol for singnals local changes
   
   Maybe some other more flashy way will be good, at the show changes tab when 
the whole project is selected or at the notifications tab whit the push action 
on it
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego commented on issue #5326: Can't make git push

2023-01-20 Thread GitBox


antoniodiego commented on issue #5326:
URL: https://github.com/apache/netbeans/issues/5326#issuecomment-1398448184

   With me it not works.
   
   I put the same credentials I use to login on GitHub.
   
   What shoud be at the credentials fields ?
   
   Also, why credentials need to be asked ? Using the NetBeans integrated or a 
system terminal it isn't prompted 
   
   Isn't there a way to skip the credentials entry?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #5326: Can't make git push

2023-01-20 Thread GitBox


mbien commented on issue #5326:
URL: https://github.com/apache/netbeans/issues/5326#issuecomment-1398433776

   can't reproduce. Just pushed something with the IDE and it worked.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] frkinta opened a new issue, #5330: "Fix Import" omits a class when its class name with prefix is already used

2023-01-20 Thread GitBox


frkinta opened a new issue, #5330:
URL: https://github.com/apache/netbeans/issues/5330

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   In the example bolow, when editing`myClass`, if you try to fix import by 
hitting "Ctrl+Shift+I", the editor will not propose to add the missing class : 
`use Test\Services\ApiService;`. 
   This happen even when imported class are in different namespaces
   
   ### How to reproduce
   
   ```PHP
   https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #5327: Open folder on system file explorer

2023-01-20 Thread GitBox


mbien commented on issue #5327:
URL: https://github.com/apache/netbeans/issues/5327#issuecomment-1398331395

   @neilcsmith-net good to know, that is even better!
   
   There is also a somewhat related usecase where you want to copy the path of 
a file or folder and paste it somewhere into your code, PR or shell etc. I 
think this could be solved by updating the properties UI (right click -> 
properties) to contain an easily copyable path. Only mentioning this here since 
I think to remember that there was a proposal to solve this via an action too, 
analog to SystemOpenAction.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5327: Open folder on system file explorer

2023-01-20 Thread GitBox


neilcsmith-net commented on issue #5327:
URL: https://github.com/apache/netbeans/issues/5327#issuecomment-1398323497

   Thanks @mbien - I removed the triage label but forgot to comment!
   
   This would be a good improvement, but the action to use is probably already 
there 
https://github.com/apache/netbeans/blob/master/platform/core.ui/src/org/netbeans/core/ui/sysopen/SystemOpenAction.java
  It might just be a case of referencing in two extra places - folders and the 
project actions.  I actually think it would be better if that action was 
available on _all_ files too.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] frkinta opened a new issue, #5329: [PHP] Netbeans may also check inside used traits to determine if a property is used

2023-01-20 Thread GitBox


frkinta opened a new issue, #5329:
URL: https://github.com/apache/netbeans/issues/5329

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   private promoted property marked as unused
   
   ### How to reproduce
   
   ```php
   Service->execute();
   }
   
   }
   
   ```
   In this case, `$Service` is marked as unused inside `myClass` class
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   ubuntu 22.04
   
   ### JDK
   
   OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu122.04) OpenJDK 
64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu122.04, mixed mode, sharing)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #5327: Open folder on system file explorer

2023-01-20 Thread GitBox


mbien commented on issue #5327:
URL: https://github.com/apache/netbeans/issues/5327#issuecomment-1398284988

   candidate for a 
https://github.com/apache/netbeans/labels/good%20first%20issue, the 
open-in-terminal action could be used as potential blueprint.
   
   
https://github.com/apache/netbeans/blob/master/ide/dlight.terminal/src/org/netbeans/modules/dlight/terminal/action/OpenInTerminalAction.java


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


mbien commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082408930


##
harness/o.n.insane/src/org/netbeans/insane/model/BinaryHeapModel.java:
##
@@ -49,7 +49,7 @@ public static HeapModel open(File file) throws Exception {
 // mmap it
 long len = data.length();
 buffer = new 
FileInputStream(data).getChannel().map(FileChannel.MapMode.READ_ONLY, 0, len);
-System.err.println("magic=" + buffer.getInt(0));
+System.err.println("magic=" + buffer.getInt(0)); // shouldn't this be 
replaced with logging statement?

Review Comment:
   completely changing the logging mechanism of a module is out of scope of PRs 
which do simple language level cleanup. The title says no logic changes.
   
   If you want to annotate your code in temporary manner, use the github review 
feature. This feature was made for this.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082399583


##
harness/o.n.insane/src/org/netbeans/insane/model/BinaryHeapModel.java:
##
@@ -49,7 +49,7 @@ public static HeapModel open(File file) throws Exception {
 // mmap it
 long len = data.length();
 buffer = new 
FileInputStream(data).getChannel().map(FileChannel.MapMode.READ_ONLY, 0, len);
-System.err.println("magic=" + buffer.getInt(0));
+System.err.println("magic=" + buffer.getInt(0)); // shouldn't this be 
replaced with logging statement?

Review Comment:
   ha - but you spotted it and this was my intention :
   
   the thing is that the whole module does not use Loggers but prints to 
System.err - do You think it is a good oppotunity to employ loggin through 
Loggger? 
   
   I'll remove this comment in the next commit enyway.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-20 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1082397254


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   I copied the comment from original line 285 when I changed indext loop into 
for-each loop
   if it's misleading then shall I remove it?



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on pull request #5328: Integrated try-with-resource with single style

2023-01-20 Thread GitBox


tbw777 commented on PR #5328:
URL: https://github.com/apache/netbeans/pull/5328#issuecomment-1398173744

   I havent errors on ide/bugtracking tests local


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 opened a new pull request, #5328: Integrated try-with-resource with single style

2023-01-19 Thread GitBox


tbw777 opened a new pull request, #5328:
URL: https://github.com/apache/netbeans/pull/5328

   Solved part of mem leaks. Reasons of leaks: unclosed streams and streams 
without closing if any exception occur


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on a diff in pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


tbw777 commented on code in PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#discussion_r1082062254


##
java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineRefactoringPlugin.java:
##
@@ -365,7 +365,7 @@ private boolean hasQualIdentProblem(Element p, Element 
asElement) throws Illegal
 TypeElement bodyEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(p);
 TypeElement invocationEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(asElement);
 if (bodyEnclosingTypeElement.equals(invocationEnclosingTypeElement)
-&& (access == null || !access.equals(Modifier.PRIVATE))) {
+&& (access == null || access != Modifier.PRIVATE)) {

Review Comment:
   fixed



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego opened a new issue, #5327: Open folder on system file explorer

2023-01-19 Thread GitBox


antoniodiego opened a new issue, #5327:
URL: https://github.com/apache/netbeans/issues/5327

   ### Description
   
   I think it should be good to open project foldes at system file explorer 
(Like the Windows Explorer on Windows). 
   Several time we want to make it, but we need to find manually the folder 
throug the system explorer, what seems to be annoying.
   
   ### Use case/motivation
   
   Do right click on the folder, select Show at system explorer option
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] antoniodiego opened a new issue, #5326: Can't make git push

2023-01-19 Thread GitBox


antoniodiego opened a new issue, #5326:
URL: https://github.com/apache/netbeans/issues/5326

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   The authorization are failing while i'm trieng to make a git push
   
   ### How to reproduce
   
   Go to Team -> Push. Type the credentials. Click next
   
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   JDK 18
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   It appers no messages showing what error happened. The screen simple 
repeats. 
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on a diff in pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


tbw777 commented on code in PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#discussion_r1081925833


##
java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineRefactoringPlugin.java:
##
@@ -365,7 +365,7 @@ private boolean hasQualIdentProblem(Element p, Element 
asElement) throws Illegal
 TypeElement bodyEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(p);
 TypeElement invocationEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(asElement);
 if (bodyEnclosingTypeElement.equals(invocationEnclosingTypeElement)
-&& (access == null || !access.equals(Modifier.PRIVATE))) {
+&& (access == null || access != Modifier.PRIVATE)) {

Review Comment:
   I will check this interesting case



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


tbw777 commented on PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#issuecomment-1397681170

   > In my earlier/first quick glance, I thought I saw a non-enum change from 
`.equals` to `==`. I must have been hallucinating, I don't see it now. Sorry 
for the noise.
   
   Any feedbackare welcome


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] errael commented on pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


errael commented on PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#issuecomment-1397664910

   In my earlier/first quick glance, I thought I saw a non-enum change from 
`.equals` to `==`. I must have been hallucinating, I don't see it now. Sorry 
for the noise.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] errael commented on a diff in pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


errael commented on code in PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#discussion_r1081909736


##
java/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineRefactoringPlugin.java:
##
@@ -365,7 +365,7 @@ private boolean hasQualIdentProblem(Element p, Element 
asElement) throws Illegal
 TypeElement bodyEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(p);
 TypeElement invocationEnclosingTypeElement = 
elementUtilities.enclosingTypeElement(asElement);
 if (bodyEnclosingTypeElement.equals(invocationEnclosingTypeElement)
-&& (access == null || !access.equals(Modifier.PRIVATE))) {
+&& (access == null || access != Modifier.PRIVATE)) {

Review Comment:
   Could simply be
   ```
   && access != Modifier.PRIVATE) {
   ```



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


matthiasblaesing commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081846702


##
harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java:
##
@@ -351,8 +351,8 @@ private void compute() {
 objsOffset = currentOffset;
 
 // compute offsets of instances
-for (Iterator it = instanceInfo.iterator(); 
it.hasNext(); ) {
-InstanceInfo info = it.next();
+for (Iterator it = instanceInfo.iterator(); it.hasNext(); ) {
+InstanceInfo info = (InstanceInfo)it.next();

Review Comment:
   The compilation error is caused by using the wrong generics in `ObjectSet`, 
you reverted the introduced generic. Exactly these kind of problems are the 
reason to be very careful to quickly introduce generics, there is a high 
chance, that it will be not the right type.



##
harness/o.n.insane/src/org/netbeans/insane/model/BinaryHeapModel.java:
##
@@ -49,7 +49,7 @@ public static HeapModel open(File file) throws Exception {
 // mmap it
 long len = data.length();
 buffer = new 
FileInputStream(data).getChannel().map(FileChannel.MapMode.READ_ONLY, 0, len);
-System.err.println("magic=" + buffer.getInt(0));
+System.err.println("magic=" + buffer.getInt(0)); // shouldn't this be 
replaced with logging statement?

Review Comment:
   Please don't add questions - it is useless.



##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   The comment in line 246 did not exist before, the variable `sum` is 
self-explanatory and the comment in line 243 gives all context, that is needed. 
This new comment is just wrong. The loop does not count, it sums.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on pull request #5309: Replaced all [equals() -> "==", HashSet -> EnumSet, HashMap -> EnumMap] calls for enum types

2023-01-19 Thread GitBox


tbw777 commented on PR #5309:
URL: https://github.com/apache/netbeans/pull/5309#issuecomment-1397554774

   I think == is more preffered becouse of no methods used
   
   I was scan project and no enums with equals exist. Actual regexp:
   
^[^\"')(;,\;,\\s*{}/]*(\s*)enum\s+[^{}/\[\]%&?@!#$\^\*<>]+\s*((implements)\s*[^{}/\[\]%&?@!#$\^\*]+\s*,*\s*)*\{(.|\n)*public\s+boolean\s+equals
   
   Exclusions:
   1. 
enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/data/PayaraVersion.java
   
   `@Override
   public boolean equals(PayaraPlatformVersionAPI version) {
   throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
   }`
   
   3. 
enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] snowwolf212 commented on issue #5321: Freezing program upon apply settings change

2023-01-19 Thread GitBox


snowwolf212 commented on issue #5321:
URL: https://github.com/apache/netbeans/issues/5321#issuecomment-1397481883

   I just hopped back on the program and it’s not freezing anymore on my 
end… I guess it was a temporary bug or something. From: Neil C SmithSent: 
Thursday, January 19, 2023 11:53 AMTo: apache/netbeansCc: snowwolf212; 
AuthorSubject: Re: [apache/netbeans] Freezing program upon apply settings 
change (Issue #5321) Which changes?! Without knowing what you're trying to 
change when it hangs it's hard to help. Or is this with any change?—Reply to 
this email directly, view it on GitHub, or unsubscribe.You are receiving this 
because you authored the thread.Message ID: ***@***.***> 


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] errael commented on pull request #5280: Improve Dialog Placement

2023-01-19 Thread GitBox


errael commented on PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#issuecomment-1397371539

   @mbien @matthiasblaesing 
   
   In https://github.com/apache/netbeans/pull/5280#issuecomment-1386241102 I 
said that the code in `NbPresenter.initBounds()` _code to change location if 
screen boundary overlaps dialog_, could be responsible for the behavior.  But 
it looks like there are other candidates for the problem.
   
   I'm taking a look at `Window.setLocationRelativeTo()`, one comment in the 
javadoc is
   ```
   Note: If the lower edge of the window is out of the screen, then the window 
is placed to the 
   side of the Component that is closest to the center of the screen. So if the 
component is on 
   the right part of the screen, the window is placed to its left, and vice 
versa.
   ```
   which seems to echo the noted behavior.
   
   In any event, knowing the arg in `setLocationRelativeTo( findFocusedWindow() 
)` in NbPresenter.initBounds() is important for getting to the bottom of what's 
going on. Also seeing `getLocation()` for the various components and the 
precise code path and intermediate values would be useful.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] snowwolf212 commented on issue #5321: Freezing program upon apply settings change

2023-01-19 Thread GitBox


snowwolf212 commented on issue #5321:
URL: https://github.com/apache/netbeans/issues/5321#issuecomment-1397325251

   Any changes I make from that settings window. As soon as I hit apply. The 
screen freezes.
   
   Do you want me to make a video of it to show you I can do that for you.
   
   
   
   
   From: Neil C Smith ***@***.***>
   Sent: Thursday, January 19, 2023 11:53:11 AM
   To: apache/netbeans ***@***.***>
   Cc: snowwolf212 ***@***.***>; Author ***@***.***>
   Subject: Re: [apache/netbeans] Freezing program upon apply settings change 
(Issue #5321)
   
   
   Which changes?! Without knowing what you're trying to change when it hangs 
it's hard to help. Or is this with any change?
   
   —
   Reply to this email directly, view it on 
GitHub, 
or 
unsubscribe.
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5321: Freezing program upon apply settings change

2023-01-19 Thread GitBox


neilcsmith-net commented on issue #5321:
URL: https://github.com/apache/netbeans/issues/5321#issuecomment-1397296930

   Which changes?!  Without knowing what you're trying to change when it hangs 
it's hard to help.  Or is this with _any_ change?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net closed issue #5318: Copy & Paste from NetBeans to external editors doesn't work.

2023-01-19 Thread GitBox


neilcsmith-net closed issue #5318: Copy & Paste from NetBeans to external 
editors doesn't work.
URL: https://github.com/apache/netbeans/issues/5318


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5318: Copy & Paste from NetBeans to external editors doesn't work.

2023-01-19 Thread GitBox


neilcsmith-net commented on issue #5318:
URL: https://github.com/apache/netbeans/issues/5318#issuecomment-1397292231

   Thanks for the report.  This is a duplicate of #3962 Please follow up there, 
try some of the suggestions, and see if there's any further info you can 
provide.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] neilcsmith-net commented on issue #5323: Netbeans Incorrect Code Format for Java Source

2023-01-19 Thread GitBox


neilcsmith-net commented on issue #5323:
URL: https://github.com/apache/netbeans/issues/5323#issuecomment-1397287515

   Can replicate.  Only seems to be if the `try` directly follows the `case` 
statement.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] Chris2011 commented on pull request #3523: [NETBEANS-3746] Restartless theme changing for FlatLaf

2023-01-19 Thread GitBox


Chris2011 commented on PR #3523:
URL: https://github.com/apache/netbeans/pull/3523#issuecomment-1397264824

   hey @DevCharly can you please fix the merge conflicts, so that we can have a 
fresh testbuild for this? :) I added the label `ci:dev-build` which creates it 
automatically


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] errael commented on a diff in pull request #5280: Improve Dialog Placement

2023-01-19 Thread GitBox


errael commented on code in PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#discussion_r1081447824


##
platform/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java:
##
@@ -1591,6 +1591,18 @@ private void initBounds() {
  */
 private Window findFocusedWindow() {
 Window w = 
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
+if( w == null ) {
+// PR#5280
+LOG.fine( () -> "No focused window, find mainWindow" );
+for( Frame f01 : Frame.getFrames() ) {

Review Comment:
   > call `findMainWindow` ?
   
   @sdedic I'd like to do that; can you give me some guidance? Need to find a 
non-API file in `platform` that's OK to access from both `core.windows` and 
`openide.util.ui` where it's appropriate to declare `findMainWindow` as a 
public method. Such a file must exist, any pointers?



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] errael commented on a diff in pull request #5280: Improve Dialog Placement

2023-01-19 Thread GitBox


errael commented on code in PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#discussion_r1081447824


##
platform/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java:
##
@@ -1591,6 +1591,18 @@ private void initBounds() {
  */
 private Window findFocusedWindow() {
 Window w = 
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
+if( w == null ) {
+// PR#5280
+LOG.fine( () -> "No focused window, find mainWindow" );
+for( Frame f01 : Frame.getFrames() ) {

Review Comment:
   > call `findMainWindow` ?
   
   @sdedic I'd like to do that; can you give me some guidance? Need to find a 
non-API file in `platform` that's OK to access from both `core.windows` and 
`openide.util.ui` where `findMainWindow` can be declared as a public method. 
Such a file must exist, any pointers?



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#issuecomment-1397056532

   > > > i don't quite see the point in converting for loops over arrays to 
streams.. just to loop.
   > > > for loops are perfectly fine for looping.
   > > 
   > > 
   > > One line of code instead of two. Shall I rewrite them to for-each loops?
   > 
   > for-each loops would be better here yes. Also please try to use CI 
resources responsibly. Don't push every individual change into a PR. Every PR 
sync does several hours of testing on many nodes. All apache projects share the 
same cluster.
   
   Ok. I'll rewrite and try to save CI resources.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-website] ebarboni commented on pull request #636: Update quickstart-gui.adoc: Link and bold typo

2023-01-19 Thread GitBox


ebarboni commented on PR #636:
URL: https://github.com/apache/netbeans-website/pull/636#issuecomment-1397054414

   many thanks and do not hesitate if you find others !


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


mbien commented on PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#issuecomment-1397023312

   > > i don't quite see the point in converting for loops over arrays to 
streams.. just to loop.
   > > for loops are perfectly fine for looping.
   > 
   > One line of code instead of two. Shall I rewrite them to for-each loops?
   
   for-each loops would be better here yes. Also please try to use CI resources 
responsibly. Don't push every individual change into a PR. Every CI does 
several hours of testing on many nodes. All apache projects share the same 
cluster.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on a diff in pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


tbw777 commented on code in PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#discussion_r1081296565


##
ide/docker.api/src/org/netbeans/modules/docker/IgnorePattern.java:
##
@@ -108,7 +108,7 @@ static String preprocess(String pattern, char separator) {
 }
 
 ret = ret.replaceAll("^(" + Pattern.quote(sep) + "\\.\\.)+(" + 
Pattern.quote(sep) +")?", Matcher.quoteReplacement(sep))
-.replaceAll("/", Matcher.quoteReplacement(sep));
+.replace("/", Matcher.quoteReplacement(sep));

Review Comment:
   great



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


tbw777 commented on PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#issuecomment-1397018261

   > this is an unrelated CI problem, I don't know what is causing this.
   > 
   > This PR failed multiple times before, e.g yesterday: 
https://github.com/apache/netbeans/actions/runs/3948453581
   
   ok


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


mbien commented on PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#issuecomment-1397014894

   this is an unrelated CI problem, I don't know what is causing this.
   
   This PR failed multiple times before, e.g yesterday:
   https://github.com/apache/netbeans/actions/runs/3948453581


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#issuecomment-1396984048

   > i don't quite see the point in converting for loops over arrays to 
streams.. just to loop.
   > 
   > for loops are perfectly fine for looping.
   
   One line of code instead of two.
   Shall I rewrite them to for-each loops?
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] kemperalves commented on issue #5323: Netbeans Incorrect Code Format for Java Source

2023-01-19 Thread GitBox


kemperalves commented on issue #5323:
URL: https://github.com/apache/netbeans/issues/5323#issuecomment-1396982793

   The try blocks is not aligned and the blocks with these tyrs the break 
statement is wrong too.
   
   https://user-images.githubusercontent.com/27026273/213455648-385443d4-8c1f-49f3-b431-d550465a3b13.png;>
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081259499


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   I haven't modified the logic, just converted indexed loop with for-each loop 
   sum is used in line 291



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] kemperalves opened a new issue, #5323: Netbeans Incorrect Code Format

2023-01-19 Thread GitBox


kemperalves opened a new issue, #5323:
URL: https://github.com/apache/netbeans/issues/5323

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Today netbeans formatted my code erroneous, I converted the code to a simple 
sample with same structure and then the code continue to be wrong formatted.
   
   ### How to reproduce
   
   1 - Create a new java project with a main class.
   
   2 -Make your main function above:
   
   ```
   
   public static void main(String[] args) throws Exception {
   
   List myList = new ArrayList<>();
   
   for (String s : myList) {
   if (!s.isBlank()) {
   
   switch (s.substring(0, 1)) {
   case "T":
   System.out.println("T");
   break;
   case "N":   
   try {
   System.out.println(Long.valueOf(s));
   } catch (Exception ex) {
   throw new Exception("FIRST ERROR MESSAGE");
   }
   break;
   case "F":
   try {
   System.out.println(new BigDecimal(s));
   } catch (Exception ex) {
   throw new Exception("ANOTHER ERROR MESSAGE");
   }
   break;
   case "M":
   try {
   System.out.println(new BigDecimal(s));
   } catch (Exception ex) {
   throw new Exception("OPS, MORE ONE ERROR MESSAGE");
   }
   break;
   case "D":
   throw new Exception("THIS VALUE CAN NOT BE USED");
   case "L":
   try {
   System.out.println(Boolean.valueOf(s));
   } catch (Exception ex) {
   throw new Exception("THIS VALUE IS NOT A BOOLEAN");
   }
   break;
   }
   }
   }
   
   }
   
   
   ```
   
   3 - Click in Source / Format or type the keyboard shortcut
   
   And then, the code is formatted but, incorrect. the try blocks is not 
aligned, the breaks statements not aligned too.
   
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   macOS 13.1 (22C65), Darwin 22.2.0, MacBookPro18,3, MKGP3LL/A
   
   ### JDK
   
   JDK 18, zulu
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081259499


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   I haven't modified the logic, just converted indexed loop with for-each loop 



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


tbw777 commented on PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#issuecomment-1396970616

   > please make sure that tests are passing locally before pushing into the PR 
on follow ups, thanks
   
   Is this a tests failure ?
   
   
   Download action repository 'actions/setup-java@v3' 
(SHA:1df8dbefe2a8cbc99770194893dd902763bee34b)
   Warning: Failed to download action 
'https://api.github.com/repos/actions/setup-java/tarball/1df8dbefe2a8cbc99770194893dd902763bee34b'.
 Error: Response status code does not indicate success: 502 (Bad Gateway).
   Warning: Back off 21.789 seconds before retry.
   Warning: Failed to download action 
'https://api.github.com/repos/actions/setup-java/tarball/1df8dbefe2a8cbc99770194893dd902763bee[34](https://github.com/apache/netbeans/actions/runs/3954617726/jobs/6772143738#step:1:38)b'.
 Error: Error while copying content to a stream.
   Warning: Back off 13.815 seconds before retry.
   Error: Error while copying content to a stream.
   /home/runner/work/netbeans/netbeans/nbbuild/build.xml:166: Can't get 
https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
 to /home/runner/work/netbeans/netbeans/nbbuild/build/netbeansrelease.json
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081244062


##
harness/o.n.insane/src/org/netbeans/insane/scanner/CountingVisitor.java:
##
@@ -59,22 +61,25 @@ public void visitObject(ObjectMap map, Object obj) {
 size += objSize;
 }
 
+@Override
 public void visitStaticReference(ObjectMap map, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitObjectReference(ObjectMap map, Object from, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitArrayReference(ObjectMap map, Object from, Object to, int 
index) {}  
 
 public Set> getClasses() {
 return Collections.unmodifiableSet(infoMap.keySet());
 }
 
-public int getCountForClass(Class cls) {
+public int getCountForClass(Class cls) {
 Info info = infoMap.get(cls);
 if (info == null) throw new IllegalArgumentException("Unknown class");
 
 return info.count;
 }
 
-public int getSizeForClass(Class cls) {
+public int getSizeForClass(Class cls) {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081241776


##
harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java:
##
@@ -51,23 +52,23 @@ public InsaneEngine(Filter f, Visitor v, boolean 
analyzeStatic) {
 
 public InsaneEngine(ObjectMap backend, Filter f, Visitor v, boolean 
analyzeStatic) {
 objects = backend;
-filter = f == null ? ScannerUtils.noFilter() : f;
+filter = (f != null ? f : ScannerUtils.noFilter());

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081240861


##
harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java:
##
@@ -51,23 +52,23 @@ public InsaneEngine(Filter f, Visitor v, boolean 
analyzeStatic) {
 
 public InsaneEngine(ObjectMap backend, Filter f, Visitor v, boolean 
analyzeStatic) {
 objects = backend;
-filter = f == null ? ScannerUtils.noFilter() : f;
+filter = (f != null ? f : ScannerUtils.noFilter());
 visitor = v;
 analyzeStaticData = analyzeStatic;
 }
 
 
 // normal set is enough, java.lang.Class have identity-based equals()
-private Set knownClasses = new HashSet();
+private final Set> knownClasses = new HashSet<>();
 
 // The queue for BFS scan of the heap.
 // each thing, before added to the queue, is added
 // to the known* structures and reported to the visitor
-private Queue queue = new Queue();
+private final Queue queue = new Queue<>();
 
-public void traverse(Collection roots) throws Exception {
+public void traverse(Collection roots) throws Exception {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081240128


##
harness/o.n.insane/src/org/netbeans/insane/impl/LiveEngine.java:
##
@@ -98,7 +105,8 @@ private void visitRef(Object from, Object to, Field field) {
 addIncommingRef(to, from, field);
 if (rest.containsKey(to)) {
 rest.remove(to);
-if (rest.size() == 0) throw new ObjectFoundException();
+if (rest.isEmpty()) 
+throw new ObjectFoundException();

Review Comment:
   added



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081239466


##
harness/o.n.insane/src/org/netbeans/insane/scanner/CountingVisitor.java:
##
@@ -59,22 +61,25 @@ public void visitObject(ObjectMap map, Object obj) {
 size += objSize;
 }
 
+@Override
 public void visitStaticReference(ObjectMap map, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitObjectReference(ObjectMap map, Object from, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitArrayReference(ObjectMap map, Object from, Object to, int 
index) {}  
 
 public Set> getClasses() {
 return Collections.unmodifiableSet(infoMap.keySet());
 }
 
-public int getCountForClass(Class cls) {
+public int getCountForClass(Class cls) {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081239885


##
harness/o.n.insane/src/org/netbeans/insane/model/ObjectSet.java:
##
@@ -90,7 +90,7 @@ public boolean contains(Object key) {
 return get(key) != null;
 }
 
-public Iterator iterator() {
+public Iterator iterator() {
 return new Iterator() {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081237658


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -169,7 +172,7 @@ public static int sizeOf(Object o) {
  * @return the size of all objects in the filtered transitive closure
  * of the roots collection.
  */
-public static int recursiveSizeOf(Collection roots, Filter f) throws 
Exception {
+public static int recursiveSizeOf(Collection roots, Filter f) throws 
Exception {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081221565


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -210,19 +213,14 @@ public static Set interestingRoots() {
  * @param v a Visitor to be notified on all found objects and references.
  * @param roots a Collection of objects to be evaluated.
  */
-public static void scanExclusivelyInAWT(final Filter f, final Visitor v, 
final Set roots) throws Exception {
+public static void scanExclusivelyInAWT(final Filter f, final Visitor v, 
final Set roots) throws Exception {

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081231463


##
harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java:
##
@@ -61,7 +61,7 @@ public void close() throws IOException {
 
 
 // ignore for this xml format
-public void visitClass(Class cls) {}
+public void visitClass(Class cls) {}

Review Comment:
   reverted



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081221565


##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -210,19 +213,14 @@ public static Set interestingRoots() {
  * @param v a Visitor to be notified on all found objects and references.
  * @param roots a Collection of objects to be evaluated.
  */
-public static void scanExclusivelyInAWT(final Filter f, final Visitor v, 
final Set roots) throws Exception {
+public static void scanExclusivelyInAWT(final Filter f, final Visitor v, 
final Set roots) throws Exception {

Review Comment:
   the package is not listed in 
   also grepping for ScannerUtils.scanExclusivelyInAWT shows no results.
   this function seems unused - maybe should be deleted?



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


mbien commented on PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#issuecomment-1396926899

   please make sure that tests are passing locally before pushing into the PR 
on follow ups, thanks


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] lbownik commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-19 Thread GitBox


lbownik commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1081218008


##
harness/o.n.insane/src/org/netbeans/insane/model/InsaneConverter.java:
##
@@ -351,8 +351,8 @@ private void compute() {
 objsOffset = currentOffset;
 
 // compute offsets of instances
-for (Iterator it = instanceInfo.iterator(); 
it.hasNext(); ) {
-InstanceInfo info = it.next();
+for (Iterator it = instanceInfo.iterator(); it.hasNext(); ) {
+InstanceInfo info = (InstanceInfo)it.next();

Review Comment:
   it fixes compilation error



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on a diff in pull request #5311: Replaced replaceAll() calls to replace()

2023-01-19 Thread GitBox


mbien commented on code in PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#discussion_r1081212416


##
ide/bugtracking.bridge/src/org/netbeans/modules/bugtracking/vcs/HookUtils.java:
##
@@ -43,16 +43,11 @@ public class HookUtils {
  * @return
  */
 public static String prepareFormatString(String formatString, String... 
keys) {
-formatString = formatString.replaceAll("\\{", "'\\{'");
 // NOI18N
-formatString = formatString.replaceAll("\\}", "'\\}'");
 // NOI18N
+formatString = formatString.replace("{", "'{'"); // 
NOI18N
+formatString = formatString.replace("}", "'}'"); // 
NOI18N
 for (int i = 0; i < keys.length; i++) {
 String key = keys[i];
-formatString =
-formatString.replaceAll(
-"'\\{'" + key + "'\\}'",   
 // NOI18N
-"\\{" + i + "\\}"  
 // NOI18N
-);
-
+formatString = formatString.replace("'{'" + key + "'}'", "{" + i + 
"}");

Review Comment:
   how do you know that key is not a regexp?



##
ide/docker.api/src/org/netbeans/modules/docker/IgnorePattern.java:
##
@@ -108,7 +108,7 @@ static String preprocess(String pattern, char separator) {
 }
 
 ret = ret.replaceAll("^(" + Pattern.quote(sep) + "\\.\\.)+(" + 
Pattern.quote(sep) +")?", Matcher.quoteReplacement(sep))
-.replaceAll("/", Matcher.quoteReplacement(sep));
+.replace("/", Matcher.quoteReplacement(sep));

Review Comment:
   this might be wrong since `quoteReplacement` will have a different effect 
when passed to `replace` instead of `replaceAll`



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] closed pull request #52: Bump maven-project from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


dependabot[bot] closed pull request #52: Bump maven-project from 2.0.5 to 2.2.1
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/52


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] commented on pull request #58: Bump maven-filtering from 3.2.0 to 3.3.0

2023-01-19 Thread GitBox


dependabot[bot] commented on PR #58:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/58#issuecomment-1396823066

   Looks like org.apache.maven.shared:maven-filtering is up-to-date now, so 
this is no longer needed.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] closed pull request #58: Bump maven-filtering from 3.2.0 to 3.3.0

2023-01-19 Thread GitBox


dependabot[bot] closed pull request #58: Bump maven-filtering from 3.2.0 to 
3.3.0
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/58


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] commented on pull request #52: Bump maven-project from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


dependabot[bot] commented on PR #52:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/52#issuecomment-1396822944

   Looks like org.apache.maven:maven-project is up-to-date now, so this is no 
longer needed.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] ebarboni commented on pull request #58: Bump maven-filtering from 3.2.0 to 3.3.0

2023-01-19 Thread GitBox


ebarboni commented on PR #58:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/58#issuecomment-1396820931

   @dependabot rebase


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] ebarboni commented on pull request #52: Bump maven-project from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


ebarboni commented on PR #52:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/52#issuecomment-1396820675

   @dependabot rebase


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] commented on pull request #51: Bump maven-profile from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


dependabot[bot] commented on PR #51:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/51#issuecomment-1396816446

   Looks like org.apache.maven:maven-profile is up-to-date now, so this is no 
longer needed.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] dependabot[bot] closed pull request #51: Bump maven-profile from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


dependabot[bot] closed pull request #51: Bump maven-profile from 2.0.5 to 2.2.1
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/51


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] ebarboni commented on pull request #51: Bump maven-profile from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


ebarboni commented on PR #51:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/51#issuecomment-1396813837

   https://github.com/dependabot rebase


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans-mavenutils-nbm-maven-plugin] ebarboni commented on pull request #51: Bump maven-profile from 2.0.5 to 2.2.1

2023-01-19 Thread GitBox


ebarboni commented on PR #51:
URL: 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/51#issuecomment-1396813711

   @rebase


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] sdedic commented on a diff in pull request #5280: Improve Dialog Placement

2023-01-18 Thread GitBox


sdedic commented on code in PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#discussion_r1080908550


##
platform/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java:
##
@@ -1591,6 +1591,18 @@ private void initBounds() {
  */
 private Window findFocusedWindow() {
 Window w = 
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
+if( w == null ) {
+// PR#5280
+LOG.fine( () -> "No focused window, find mainWindow" );
+for( Frame f01 : Frame.getFrames() ) {

Review Comment:
   Nitpick: call `findMainWindow`  ?



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] snowwolf212 opened a new issue, #5321: Freezing program upon apply settings change

2023-01-18 Thread GitBox


snowwolf212 opened a new issue, #5321:
URL: https://github.com/apache/netbeans/issues/5321

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Hello. I came across a software bug with NetBeans. When I go into “Tools” > 
“Options” > “Editor” > and then I make changes from here… once I hit apply the 
whole program freezes and I can’t continue without forcing the program to 
shutdown with the task manager. Does my bug make sense to you? I was hoping you 
guys can fix this glitch. I’m running windows 11.
   
   
   ### How to reproduce
   
   _No response_
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   JKD 19
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] BradWalker commented on pull request #5238: nbbuild dir: removed unessesary old forms of Integer type

2023-01-18 Thread GitBox


BradWalker commented on PR #5238:
URL: https://github.com/apache/netbeans/pull/5238#issuecomment-1396405439

   > > @mbien can i post now one new PR or continue wait? )
   > 
   > Flooding the project with mass change PRs is a good way to be ignored. Let 
the current PRs be drained and then go on. Remember: we are not paid to do this 
and I'm more inclined to look at PRs fixing actual problems and not just 
mechanical cleanups.
   
   Hey @tbw777, let provide some context here.. I started out by cleaning up a 
lot of source code "low hanging" fruit. Stuff that was really easy to review. 
So I understand the excitement.
   
   But, remember people have to review this. And what might seem trivial or 
straight-forward to you is work for others. That's not to say your work doesn't 
have meaning or value. It does have value and people want to include it. So 
just be aware there is work on our end to get this into the system.
   
   So, pace yourself. We want you involved for the long term. Don't burn 
yourself out. Let us catch up to your enthusiasm. 
   
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] BradWalker commented on a diff in pull request #5320: Removed creating of unused objects

2023-01-18 Thread GitBox


BradWalker commented on code in PR #5320:
URL: https://github.com/apache/netbeans/pull/5320#discussion_r1080773912


##
enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/action/HomeMethodGenerator.java:
##
@@ -73,7 +73,7 @@ public void generate(MethodModel methodModel, boolean 
generateLocal, boolean gen
 
 // remote interface
 if (generateRemote && remoteHome != null) {
-List exceptions = exceptions = new 
ArrayList(methodModel.getExceptions());
+List exceptions = new 
ArrayList(methodModel.getExceptions());

Review Comment:
   Since we're here.. I would mkae this into ArrayList<>..



##
profiler/profiler.heapwalker/src/org/netbeans/modules/profiler/heapwalk/ui/ReferencesBrowserControllerUI.java:
##
@@ -354,9 +354,9 @@ public void run() {
 });
 // --- 
 } else {
-Object[] shortPath = new Object[length];
-System.arraycopy(path, 0, shortPath, 0, length);
-final TreePath p = new TreePath(shortPath);
+//Object[] shortPath = new Object[length];
+//System.arraycopy(path, 0, shortPath, 0, length);
+//final TreePath p = new TreePath(shortPath);
 SwingUtilities.invokeLater(new Runnable() {

Review Comment:
   Not used, remove it..



##
nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/CommonLauncher.java:
##
@@ -95,7 +95,7 @@ protected long addData(FileOutputStream fos, File file, 
Progress progress, long
 
 //add rnd data
 protected void addData(FileOutputStream fos) throws IOException {
-double rand = Math.random() * Byte.MAX_VALUE;
+//double rand = Math.random() * Byte.MAX_VALUE;

Review Comment:
   Remove both comments.. Dead code elimination..



##
platform/masterfs/src/org/netbeans/modules/masterfs/ProvidedExtensionsProxy.java:
##
@@ -79,7 +79,7 @@ public ProvidedExtensions.DeleteHandler 
getDeleteHandler(final File f) {
 }
 
 public ProvidedExtensions.IOHandler getRenameHandler(final File from, 
final String newName) {
-final File to = new File(from.getParentFile(), newName);
+//final File to = new File(from.getParentFile(), newName);

Review Comment:
   If it's not used, remove it..



##
platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/nimbus/NimbusLFCustoms.java:
##
@@ -45,7 +45,7 @@ public Object[] createLookAndFeelCustomizationKeysAndValues() 
{
 }
 
 //XXX fetch the custom font size here instead
-Font controlFont = new Font("Dialog", Font.PLAIN, fontsize); //NOI18N
+//Font controlFont = new Font("Dialog", Font.PLAIN, fontsize); //NOI18N

Review Comment:
   If it's not used, remove it..



##
platform/openide.filesystems/src/org/openide/filesystems/AbstractFolder.java:
##
@@ -820,7 +820,7 @@ protected final void refreshFolder(
 fire && (added == null) && (removed == null) && 
!getFileSystem().isReadOnly() &&
 !(this instanceof MultiFileObject)
 ) {
-Set nameFilter = nameFilter = new HashSet();
+Set nameFilter = new HashSet();

Review Comment:
   Change to HastSet<>



##
platform/api.visual/src/org/netbeans/modules/visual/anchor/DefaultAnchorShapeResolver.java:
##
@@ -62,7 +62,7 @@ public int getEndLocation()
 else
 {
 //Rectangle bounds = attachedWidget.getBounds();
-Rectangle bounds = new Rectangle();
+Rectangle bounds;

Review Comment:
   I would split the declaration and assignment into:
   Widget sourceWidget;
   
   And then refactor the code to remove the use of bounds..
   



##
platform/o.n.swing.tabcontrol/demosrc/org/netbeans/swing/tabcontrol/demo/TestFrame.java:
##
@@ -189,7 +189,7 @@ public void actionPerformed(ActionEvent ae) {
 
 jb9.addActionListener(new ActionListener() {
 public void actionPerformed(ActionEvent ae) {
-int[] idxs = new int [] { 1, 3, 6, 8};
+//int[] idxs = new int [] { 1, 3, 6, 8};

Review Comment:
   Not used, remove it..



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 opened a new pull request, #5320: Removed creating of unused objects

2023-01-18 Thread GitBox


tbw777 opened a new pull request, #5320:
URL: https://github.com/apache/netbeans/pull/5320

   To effictive use of memory and for clean code.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 commented on a diff in pull request #5311: Replaced replaceAll() calls to replace()

2023-01-18 Thread GitBox


tbw777 commented on code in PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#discussion_r1080737657


##
ide/bugtracking.bridge/src/org/netbeans/modules/bugtracking/vcs/HookUtils.java:
##
@@ -43,16 +43,10 @@ public class HookUtils {
  * @return
  */
 public static String prepareFormatString(String formatString, String... 
keys) {
-formatString = formatString.replaceAll("\\{", "'\\{'");
 // NOI18N
-formatString = formatString.replaceAll("\\}", "'\\}'");
 // NOI18N
-for (int i = 0; i < keys.length; i++) {
-String key = keys[i];
-formatString =
-formatString.replaceAll(
-"'\\{'" + key + "'\\}'",   
 // NOI18N
-"\\{" + i + "\\}"  
 // NOI18N
-);
-
+formatString = formatString.replace("{", "'{'"); // 
NOI18N
+formatString = formatString.replace("}", "'}'"); // 
NOI18N
+for (String key : keys) {
+formatString = formatString.replace("'{'" + key + "'}'", "{" + key 
+ "}");
 }

Review Comment:
   fixed



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on a diff in pull request #5311: Replaced replaceAll() calls to replace()

2023-01-18 Thread GitBox


mbien commented on code in PR #5311:
URL: https://github.com/apache/netbeans/pull/5311#discussion_r1080731688


##
ide/bugtracking.bridge/src/org/netbeans/modules/bugtracking/vcs/HookUtils.java:
##
@@ -43,16 +43,10 @@ public class HookUtils {
  * @return
  */
 public static String prepareFormatString(String formatString, String... 
keys) {
-formatString = formatString.replaceAll("\\{", "'\\{'");
 // NOI18N
-formatString = formatString.replaceAll("\\}", "'\\}'");
 // NOI18N
-for (int i = 0; i < keys.length; i++) {
-String key = keys[i];
-formatString =
-formatString.replaceAll(
-"'\\{'" + key + "'\\}'",   
 // NOI18N
-"\\{" + i + "\\}"  
 // NOI18N
-);
-
+formatString = formatString.replace("{", "'{'"); // 
NOI18N
+formatString = formatString.replace("}", "'}'"); // 
NOI18N
+for (String key : keys) {
+formatString = formatString.replace("'{'" + key + "'}'", "{" + key 
+ "}");
 }

Review Comment:
   second `key` should be `i` but you removed the index from the loop, so you 
have to revert that too.



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] tbw777 opened a new pull request, #5319: Simplified usage String.substring() method from two arguments to one …

2023-01-18 Thread GitBox


tbw777 opened a new pull request, #5319:
URL: https://github.com/apache/netbeans/pull/5319

   …argument if applicable
   
   One of String.substring() method implementation does require only one arg 
variant with detection of full length of the string inside. Therefore there is 
no needed to set length manually as second parametr.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] mbien commented on issue #4054: Netbeans freezes due to "Organize Imports" on save and "Format" Tool if code contains specific syntax errors

2023-01-18 Thread GitBox


mbien commented on issue #4054:
URL: https://github.com/apache/netbeans/issues/4054#issuecomment-1396288244

   > Hm - I don't think incrementing the pointer when toPhase does not reach 
the expected phase is correct - that would might mean the given file won't be 
run again.
   
   I don't understand this part tbh. Why would anything change if it is ran 
again with the exact same state? Also when stop is set to true, how does it 
ever exit the loop?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] chengthao opened a new issue, #5318: Copy & Paste from NetBeans to external editors doesn't work.

2023-01-18 Thread GitBox


chengthao opened a new issue, #5318:
URL: https://github.com/apache/netbeans/issues/5318

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Copying code from NetBeans IDE and pasting it to a text editor outside of 
NetBeans often do not work.  Once in a while, copy and paste works but not for 
most of the time.  
   
   ### How to reproduce
   
   Under Windows 11, using NetBeans 15, 
   
   - Create a Java project.  
   - Create a Java class.  
   - Write code some.  
   - Copy the code and paste it to Notepad.  
   - Nothing will be pasted into Notepad or any text editor.
   - 
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 12.6 or earlier
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   JDK 19
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] rkeen-siemens commented on issue #5265: Wrong font used for file chooser

2023-01-18 Thread GitBox


rkeen-siemens commented on issue #5265:
URL: https://github.com/apache/netbeans/issues/5265#issuecomment-1396210457

   > did you remove the --fontsize argument in the process?
   
   Good point. Removing the `--fontsize` argument does work around the issue.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #5317: code cleanup - no logic changes

2023-01-18 Thread GitBox


matthiasblaesing commented on code in PR #5317:
URL: https://github.com/apache/netbeans/pull/5317#discussion_r1080572328


##
harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java:
##
@@ -61,7 +61,7 @@ public void close() throws IOException {
 
 
 // ignore for this xml format
-public void visitClass(Class cls) {}
+public void visitClass(Class cls) {}

Review Comment:
   Please don't introduce generics into exported methods in a pure cleanup PR.



##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -169,7 +172,7 @@ public static int sizeOf(Object o) {
  * @return the size of all objects in the filtered transitive closure
  * of the roots collection.
  */
-public static int recursiveSizeOf(Collection roots, Filter f) throws 
Exception {
+public static int recursiveSizeOf(Collection roots, Filter f) throws 
Exception {

Review Comment:
   If this is exported, please don't add generics for general cleanup.



##
harness/o.n.insane/src/org/netbeans/insane/model/ObjectSet.java:
##
@@ -90,7 +90,7 @@ public boolean contains(Object key) {
 return get(key) != null;
 }
 
-public Iterator iterator() {
+public Iterator iterator() {
 return new Iterator() {

Review Comment:
   Isn't this missing the generic here?



##
harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java:
##
@@ -51,23 +52,23 @@ public InsaneEngine(Filter f, Visitor v, boolean 
analyzeStatic) {
 
 public InsaneEngine(ObjectMap backend, Filter f, Visitor v, boolean 
analyzeStatic) {
 objects = backend;
-filter = f == null ? ScannerUtils.noFilter() : f;
+filter = (f != null ? f : ScannerUtils.noFilter());
 visitor = v;
 analyzeStaticData = analyzeStatic;
 }
 
 
 // normal set is enough, java.lang.Class have identity-based equals()
-private Set knownClasses = new HashSet();
+private final Set> knownClasses = new HashSet<>();
 
 // The queue for BFS scan of the heap.
 // each thing, before added to the queue, is added
 // to the known* structures and reported to the visitor
-private Queue queue = new Queue();
+private final Queue queue = new Queue<>();
 
-public void traverse(Collection roots) throws Exception {
+public void traverse(Collection roots) throws Exception {

Review Comment:
   If this is exported, please don't add generics for general cleanup.



##
harness/o.n.insane/src/org/netbeans/insane/scanner/ScannerUtils.java:
##
@@ -233,58 +231,22 @@ public void run() {
 if (ret[0] != null) throw ret[0];
 }
 
-private static Thread[] getAllThreads() {
-ThreadGroup act = Thread.currentThread().getThreadGroup();
-while (act.getParent() != null) act = act.getParent();
-Thread[] all = new Thread[2*act.activeCount()+5];
-int cnt = act.enumerate(all);
-Thread[] ret = new Thread[cnt];
-System.arraycopy(all, 0, ret, 0, cnt);
-return ret;
-}
-
-@SuppressWarnings("deprecation")
-private static void suspendAllThreads(Set except) {
-Thread[] threads = getAllThreads();
-
-for (int i=0; i classInfoRegistry = new 
WeakHashMap();
-private int size;
+private static final Map, ClassInfo> classInfoRegistry = new 
WeakHashMap<>();
+private final int size;
 
-private ClassInfo(Class cls) {
-//this.cls = cls;
+private ClassInfo(Class cls) {
 if (cls.isArray()) {
-Class base = cls.getComponentType();
+Class base = cls.getComponentType();
 size = -getSize(base, true);
 } else {
 // iterate all fields and sum the sizes
 int sum = 0;
-for (Class act = cls; act != null; act = act.getSuperclass()) {
-Field[] flds = act.getDeclaredFields();
-for (int i=0; i act = cls; act != null; act = 
act.getSuperclass()) {
+// count all nonstatic fields

Review Comment:
   this is not correct, the comment in line 281 says it: It created the sum, 
not the count. In this case comment is duplicated and the name of the variable 
`sum` is already a dead give away.



##
harness/o.n.insane/src/org/netbeans/insane/scanner/CountingVisitor.java:
##
@@ -59,22 +61,25 @@ public void visitObject(ObjectMap map, Object obj) {
 size += objSize;
 }
 
+@Override
 public void visitStaticReference(ObjectMap map, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitObjectReference(ObjectMap map, Object from, Object to, 
java.lang.reflect.Field ref) {}
+@Override
 public void visitArrayReference(ObjectMap map, Object from, Object to, int 
index) {}  
 
 public Set> 

[GitHub] [netbeans-website] mbien commented on pull request #636: Update quickstart-gui.adoc: Link and bold typo

2023-01-18 Thread GitBox


mbien commented on PR #636:
URL: https://github.com/apache/netbeans-website/pull/636#issuecomment-1396081579

   @christoph-petzold congrats to your first contribution! :)


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



  1   2   3   4   5   6   7   8   9   10   >