-
Notifications
You must be signed in to change notification settings - Fork 133
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
Remove method from interface ILayer and update all places accordingly #619
base: master
Are you sure you want to change the base?
Remove method from interface ILayer and update all places accordingly #619
Conversation
I had a look at the Implementations of ILayer and isType and hasResource were not implemented the same way: WMSLaser: Lines 229 to 235 in 4468dd6
Lines 274 to 277 in 4468dd6
whereas layerImpl is fine in my option: Lines 992 to 1008 in bfd630e
and LayerDecorator just delegates to the wrapped Layer which is fine to. So I guess we at least WMSLayer should be adapted and I'd prefer to add a hint to release-notes for 2.3 as well (https://github.com/locationtech/udig-platform/blob/dca5ae79fdf5f90f343e80ef10c627e03b7cb076/docs/user/en/what_is_new/What%20is%20new%202.3.rst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as stated in previous comment, at least WMSLayer might raise some issues because implementations of isType and hasResource aret different.
@@ -91,9 +91,9 @@ static void writeContext(IMap map, BufferedWriter out) throws IOException { | |||
append(2, out, "<ResourceList>"); //$NON-NLS-1$ | |||
for (ILayer layer : map.getMapLayers()) { | |||
try { | |||
if (layer.isType(Layer.class)) { | |||
if (layer.hasResource(Layer.class)) { | |||
writeLayer(layer, out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering what would happen here, since WMSLayer.hasResource() is always false whereas isType was true ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically WMSLayer.java is located into the module "org.locationtech.udig.info.tests" - so it's a test class. Does it really that matter? From my perspective we may even think about removing this class (should not belong to a test bundle).
Within this PR I removed
isType()
from interface ILayer.java which is deprecated. I updated all remaining places accordingly :)"New" way to go:
hasResource()