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

Skip access method when lambda body method can be promoted. #86

Conversation

JakeWharton
Copy link
Contributor

Refs #81 point 2.

@@ -37,4 +37,12 @@ public static boolean isPlatformFactoryMethod(int access, String name, String de
&& desc.equals(targetDesc)
&& Flags.hasFlag(access, ACC_PRIVATE | ACC_STATIC);
}

public static boolean isBodyMethodName(String name) {
return name.startsWith("lambda\\$");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javac format is "lambda$methodname$number" and ECJ is "lambda$number". I don't think this is ideal, but the name is highly unlikely to change without a major version bump in the JDK which could just as well bring classfile changes that break everything else about this tool.

@JakeWharton JakeWharton force-pushed the jw/skip-accessors-and-promote-body-methods branch from c0d2e45 to 5d5a87c Compare January 16, 2016 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants