Remove method from interface ILayer and update all places accordingly#619
Remove method from interface ILayer and update all places accordingly#619sschulz92 wants to merge 3 commits intolocationtech:masterfrom
Conversation
|
I had a look at the Implementations of ILayer and isType and hasResource were not implemented the same way: WMSLaser: whereas layerImpl is fine in my option: 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) |
fgdrf
left a comment
There was a problem hiding this comment.
as stated in previous comment, at least WMSLayer might raise some issues because implementations of isType and hasResource aret different.
| try { | ||
| if (layer.isType(Layer.class)) { | ||
| if (layer.hasResource(Layer.class)) { | ||
| writeLayer(layer, out); |
There was a problem hiding this comment.
wondering what would happen here, since WMSLayer.hasResource() is always false whereas isType was true ..
There was a problem hiding this comment.
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()