antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
17.14k stars 3.28k forks source link

Warning "WARNING: Secure coding is automatically enabled for restorable state!" when running "Hello.g4" from book on macOS 14 #4495

Open corneliusroemer opened 10 months ago

corneliusroemer commented 10 months ago

I'm following the ANTLR4 Reference and have set up antlr with brew install antlr and a classpath of:

export CLASSPATH=".:/opt/homebrew/Cellar/antlr/4.13.1/antlr-4.13.1-complete.jar"

When running TestRig with the grun -gui option: grun Hello r -gui as suggested on page 7, I get a GUI, but I also get a warning on the command line:

$ grun Hello r -gui 
hello parrt
2023-12-19 00:58:56.847 java[45676:1875683] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
^C% 

I don't think this warning: WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:. is due to anything I have done given I'm following the basic hello world. It would be good if the warning was resolved so as not to distract the user.

I'm on macOS 14.2 (ARM), using javac 21.0.1.

pwagland commented 8 months ago

See this answer: https://stackoverflow.com/a/77320845/97627

The "developer" in this case is Java, so you'll need an updated version of Java that does this.