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

[UDIG-1897] avoid cast exception guessing a CRS #186

merged 1 commit into from Feb 10, 2015


Copy link

@fgdrf fgdrf commented Feb 9, 2015

IdentifiedObject identifiedObject = factory.createObject(code);
if (identifiedObject instanceof CoordinateReferenceSystem) {
return (CoordinateReferenceSystem) factory.createObject(code);
} catch (FactoryException e2) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about a better way, I tend to use the CRS.decode( string ) method. I think the internals of that method would be a good way to see how these factories are used.

However this instance of sanity check seems fine...

jodygarnett added a commit that referenced this pull request Feb 10, 2015
[UDIG-1897] avoid cast exception guessing a CRS
@jodygarnett jodygarnett merged commit e240cf0 into locationtech:master Feb 10, 2015
@fgdrf fgdrf deleted the UDIG-1897 branch March 21, 2017 20:40
@fgdrf fgdrf added this to the uDig-2.0.0 milestone Sep 13, 2017
@fgdrf fgdrf added the bug label Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants