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

Incorrect logic for additional resource name check #40

Closed
Towdium opened this issue Dec 17, 2019 · 2 comments
Closed

Incorrect logic for additional resource name check #40

Towdium opened this issue Dec 17, 2019 · 2 comments

Comments

@Towdium
Copy link

Towdium commented Dec 17, 2019

In document of method additionalResourcesLocator it says:

Rules:
The Strings in the set must not end with ".class". Conflicts with other ITransformationServices will result in an immediate crash.

But inside TransformationServiceDecorator, it checks the name with this logic:

final Set<String> badResourceNames = resNames.stream().
                    filter(s -> !s.endsWith(".class") || resourceNames.contains(s)).
                    collect(Collectors.toSet());

It seems inverted to me. Am I getting something wrong?

@cpw
Copy link
Member

cpw commented Jul 26, 2020

Yes, I believe you are.

@cpw cpw closed this as completed Jul 26, 2020
@ichttt
Copy link
Member

ichttt commented Jul 27, 2020

No he is right, this check is the wrong way around, this crashes if a resource does not end with .class

cpw added a commit that referenced this issue Sep 6, 2020
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
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

No branches or pull requests

3 participants