Skip to content
This repository has been archived by the owner. It is now read-only.

#1164 Added Mapping Conflict Check to Spring WebMvc Configuration #1165

Open
wants to merge 2 commits into
base: master
from

Conversation

@andersonkyle
Copy link

@andersonkyle andersonkyle commented Dec 9, 2016

This PR fixes #1164 by adding a method that checks whether any Mappings defined by the User conflict with those that Stormpath wants to create. If a conflict is found, an IllegalStateException is thrown which adheres to the standard Spring behavior.

/**
* Fix for https://github.com/stormpath/stormpath-sdk-java/issues/1164
*
* @since 1.2.3

This comment has been minimized.

@mraible

mraible Jan 4, 2017
Contributor

Can you please change this to 1.3.0?

*
* @since 1.2.3
*/
private <T extends AbstractController> void assertUniqueMethodMapping(T c) {

This comment has been minimized.

@mraible

mraible Jan 4, 2017
Contributor

Please reformat with IntelliJ's default settings (e.g. space after for, space after if, before brace, etc). Thanks!

throw new IllegalStateException("Mapping conflict. Stormpath cannot map '" + c.getUri() + "'. " +
"There is already '" + handlerMethod.getBean() +
"' bean method\n" + handlerMethod + " mapped.");
}

This comment has been minimized.

@mraible

mraible Jan 4, 2017
Contributor

I would change this to read: `Mapping confict: Stormpath cannot map '" + c.getUri() + "'. " + handlerMethod.getBean() + "#" + handlerMethod + " is already mapped to this URI."

Kyle Anderson
@andersonkyle
Copy link
Author

@andersonkyle andersonkyle commented Jan 4, 2017

@mraible The changes you've requested are done. Thanks.

@mraible
Copy link
Contributor

@mraible mraible commented Jan 4, 2017

@kanderson450 Cool - thanks! LGTM 👍

Will merge after CI passes.

@mrioan mrioan changed the base branch from 1.2.x to master Feb 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.