`_` is not considered a keyword
See original GitHub issueCFR version
0.149-SNAPSHOT (commit da9725ba)
Compiler
javac 11.0.5
Description
_
(underscore) is not considered a keyword even though it is one since Java 9 (JLS 3.9).
Renaming types, methods or fields should probably only be done when explicitly enabled. However local variable names (when compiled with -g:vars
) should possibly always be renamed. Or both should be done based on the class file version?
Here (remove suffix .txt
) is a class file which claims to be Java 11 (major 55, minor 0) but uses _
for a field and a local variable. Neither of them are renamed regardless of the --renameillegalidents
value.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
C# - Ch. 1 Quiz Flashcards - Quizlet
What is NOT considered a keyword by the C# language? a) implicit b)global c)catch d)static. d. When writing C# code, how do you...
Read more >What Are Keywords and How Do You Use Them? - Semrush
Important note: any term used in a search engine, whether a single word or a long phrase, is considered a keyword.
Read more >List of Java keywords - Wikipedia
In the Java programming language, a keyword is any one of 67 reserved words that have a predefined meaning in the language. Because...
Read more >Java Keywords - W3Schools
Java Reserved Keywords ... Note: true , false , and null are not keywords, but they are literals and reserved words that cannot...
Read more >C Keywords and Identifiers - Programiz
Keywords are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are part of the syntax and they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh that’s hilarious, I never pushed that. Whoops. Pushed now. Basically, acts as a easier way to override all the class file dependent options. (but will of course produce weird output if you try to be silly, like switch expressions in constructors, or take j10 string concatenation back to j6).
(and if you try to force v1 on a new class file, table sizes have changed, so BANG)
java org.benf.cfr.reader.Main SwitchTest30.class
vs
java org.benf.cfr.reader.Main SwitchTest30.class --forceclassfilever j6
Is that an option / feature already (sorry if I overlooked that) or are you planning to add that?