mbien commented on PR #7928: URL: https://github.com/apache/netbeans/pull/7928#issuecomment-2450760981
> I know about 4 ways to trigger System.exit/Runtime.exit/Runtime.halt in current NetBeans: a NetBeans module, an annotation processor/javac Plugin running for an open project, a Jackpot rule and profiler query language. (I don't want to put too much details here, as they can be sensitive.) JFR will write events for both, halt and exit. the java.lang.Runtime logger unfortunately only logs exit. I [asked](https://mail.openjdk.org/pipermail/jdk-dev/2024-October/thread.html#9469) on the JDK list a few weeks ago, there was also a proposal to [log on halt too](https://www.mail-archive.com/core-libs-dev@openjdk.org/msg19309.html) - but it was decided to not implement it there specifically due to the risk of the callback into application code (logger) which could fail for whatever reason. While debugging, `-Xlog:safepoint+stats=info` could be also used to figure out the exit cause - however this isn't ideal for runtime. (JFR and the `java.lang.Runtime` is intended for runtime though, see [note in javadoc](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Runtime.html#exit(int))) IMO: an annotation processor calling halt, would be as broken as a annotation processor trying figure out your system password. Malicious or not - dependencies like that are filtered out by the java ecosystem, library supply chain reviews etc. You should not blindly use libraries you don't know - only protecting against exit/halt gives only a false sense of safety - a disappearing JVM is the smallest problem if you truly don't trust the code you execute. >for the clipboard, there's "Paste from History" (Ctrl-Shift-D), which I believe depends on the ability to listen on the clipboard, and the standard Swing clipboard is not firing events, so the history may be missing some entries. (Although I suspect there's a check and event on Window activated, so this mostly affects stuff copied inside the IDE.) I feared the same. However, it seems to work fine with one slight change in behavior: Copy from the editor will only appear in the list after focus loss or after the next copy event (paste works correctly though), everywhere else it appears right away. So there seems to be a special case for copy from editor specifically - this might be also connected to the bug, see comment https://github.com/apache/netbeans/discussions/7051#discussioncomment-11115211 -- 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