Community
Participate
Working Groups
This is a follow up from bug 353553. The fix for bug 353553 directly changed a generated file. This will bring back the bug anytime the parser related files are regenerated. We need to adjust the relevant classes in org.eclipse.jdt.core.tools project so that the generated files will continue to have the fix.
The right way here would be to change the file extension to something like .props. It doesn't really need translation. For this, apart from changing the extension we need to find an alternative to using Resource.getBundle(..) in org.eclipse.jdt.internal.compiler.parser.Parser.readReadableNameTable(String), so that a .properties file is not expected there anymore.
Created attachment 213878 [details] proposed fix This patch changes the extension of readableNames to .props. It also now reads it as an input stream and then generates the readable names table.
Created attachment 213879 [details] patch for ParserUpdater Updates the tools which generate the parser files.
Satyam, can you please review? Thanks!
Ayush, I think you should read the file as a properties file rather than a resource file. Sorry, I didn't realize when we talked about it :(. One major approach with this issue is the call to fileContents.indexOf() could go bad. It could just give the index of another string which starts with the same name :). Moreover, I could also see that the file contents is sorted badly for this particular case also. Please explore the properties file approach.
(In reply to comment #3) > Created attachment 213879 [details] > patch for ParserUpdater > > Updates the tools which generate the parser files. This change looks good.
Created attachment 213965 [details] proposed fix v2 This patch uses java.util.Properties. Thanks Satyam for pointing me to it. All tests pass.
Changes look good. +1
Released to master via commit e8c9a8ad63c042540bdf2089eae8eda8857cd19d
Verified for 3.8 M7