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

Namespace potential collisions #646

Closed
TWiStErRob opened this issue Feb 11, 2017 · 2 comments
Closed

Namespace potential collisions #646

TWiStErRob opened this issue Feb 11, 2017 · 2 comments
Assignees
Milestone

Comments

@TWiStErRob
Copy link

ExtensionContext.Namespace is implemented via a Set/HashSet. This allows for two namespaces to easily collide:

@Test void test() {
	assertNotEquals(Namespace.create("a", "b"), Namespace.create("b", "a"));
}

Intuitively namespaces should nest, meaning the above two are expected to be different. This can be easily fixed by using a List in the impl.

I'm using https://oss.sonatype.org/content/repositories/snapshots/org/junit/jupiter/junit-jupiter-api/5.0.0-SNAPSHOT/junit-jupiter-api-5.0.0-20170207.113945-373.jar

@marcphilipp
Copy link
Member

Hmm, I must admit that I'm a bit surprised by this, too. However, the Javadoc states "The order of the parts is not significant.".

@junit-team/junit-lambda Do you remember why this was implemented this way?

@marcphilipp
Copy link
Member

Team decision: Change implementation to use List instead of Set.

gaganis added a commit to gaganis/junit5 that referenced this issue Feb 27, 2017
Not taking into account the order of parts made namespace behavior
non-intuitive.

Closes: junit-team#646
gaganis added a commit to gaganis/junit5 that referenced this issue Feb 27, 2017
Not taking into account the order of parts made namespace behavior
non-intuitive.

Closes: junit-team#646
gaganis added a commit to gaganis/junit5 that referenced this issue Feb 27, 2017
Not taking into account the order of parts made namespace behavior
non-intuitive.

Closes: junit-team#646
gaganis added a commit to gaganis/junit5 that referenced this issue Feb 27, 2017
Not taking into account the order of parts made namespace behavior
non-intuitive.

Closes: junit-team#646
marcphilipp pushed a commit that referenced this issue Feb 28, 2017
Not taking into account the order of parts made namespace behavior
non-intuitive.

Fixes #646.
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

3 participants