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

CreateStartScripts task generates classpath in wrong order #2513

Closed
thhalm-talkwalker opened this issue Jul 19, 2017 · 2 comments
Closed

CreateStartScripts task generates classpath in wrong order #2513

thhalm-talkwalker opened this issue Jul 19, 2017 · 2 comments

Comments

@thhalm-talkwalker
Copy link

The transformation of the startscripts' classpath property to the relative classpath used inside the start scripts does not maintain the classpath order.

Expected Behavior

Relative classpath must have the same order as the configured classpath

Current Behavior

getRelativeClasspath() uses

public static <R, I> Set<R> collect(Set<? extends I> set, Transformer<? extends R, ? super I> transformer) {
        return collect(set, new HashSet<R>(), transformer);
}

which uses a new HashSet instance to create the transformed Iterable and therefore the order is undefined.

CreateStartScripts.java

Steps to Reproduce (for bugs)

Bug is still on master, discovered in version 4.0.1

@big-guy
Copy link
Member

big-guy commented Jul 19, 2017

Good find @thhalm. Would you be interested in contributing a fix?

@thhalm-talkwalker
Copy link
Author

Sure, I will create a pull request.

btw: I think only version >= 4.0 are affected. (in 3.5. it was still correct as com.google.common.collect.Iterables#transform was used)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants