-
Notifications
You must be signed in to change notification settings - Fork 332
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
Fix prefix formatting on IsEmptyCallOnCollections #1112
Comments
notes on parsing error when in the context of lambdas: J.Binary is an Expression and thus doesn't currently have In lieu of being able to replace the J.Binary using the J.Binary coordinates directly, we'll manually set the prefix. We could include J.Binary Coordinates, or expand Coordinates to include Coordinates for Expressions, but at the time of writing this that is a bigger scope than manually setting the prefix here. This leads to a parsing issue when replacing the result within a lambda, b/c the end result is expected to be an Expression. Something close to this stub is generated, which is not a statement / doesn't appear to be compileable in a way to get extracted. Checking class Test {
static <T> Stream<List<T>> method(Stream<List<T>> stream) {
if (true) {
s -> {
if (true) {
Object o =
/*__TEMPLATE__*/__P__.<java.util.Collection>/*__p1__*/p().isEmpty()
}
return null;
};
}
return null;
}
} |
Moving other content to #1120 |
Problem
see diff
Expected behavior
see diff
Example diff
Recipes in example diff:
References:
OHafc
Collections#isEmpty()
instead of comparingsize()
"The text was updated successfully, but these errors were encountered: