Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve malformed identifiers handling in -ren=1 mode #709

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

Maccimo
Copy link
Contributor

@Maccimo Maccimo commented Jan 14, 2018

This patch propose following improvements to the default renaming functionality:

  1. All identifiers should be compliant to the JLS9 section 3.8 and SHOULD NOT contains so-called "ignorable" characters.
    Ignorable characters are silently removed by javac during the compilation and thus may appear only in specially crafted obfuscated classes.
    For more information about "ignorable" characters see JDK-7144981.

  2. Add dedicated unit tests for org.jetbrains.java.decompiler.modules.renamer.ConverterHelper class.

@trespasserw
Copy link
Member

@Maccimo thank you.

Could you please update the PR so that it doesn't change formatting in toBeRenamed() method? And I'm not sure the new method deserves such a thorough test :)

@trespasserw trespasserw self-assigned this Jan 23, 2018
@trespasserw trespasserw removed their request for review January 23, 2018 17:28
@Maccimo Maccimo force-pushed the java-decompiler-ignorable-chars branch from c1f2257 to 5ea28c3 Compare January 23, 2018 20:18
@Maccimo
Copy link
Contributor Author

Maccimo commented Jan 23, 2018

@trespasserw I've updated PR, please review.
Tests attempt to cover original toBeRenamed() behaviour as well as changes made by this PR.
IMHO better to have test coverage than not to have.

@SergeyZh SergeyZh merged commit 5ea28c3 into JetBrains:master Jan 31, 2018
SergeyZh pushed a commit that referenced this pull request Jan 31, 2018
Actuarius pushed a commit to MinecraftForge/FernFlower that referenced this pull request Jan 31, 2018
Actuarius pushed a commit to MinecraftForge/FernFlower that referenced this pull request Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants