Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.locationtech.udig.catalog.IService;
import org.locationtech.udig.catalog.IServiceInfo;
import org.locationtech.udig.catalog.ServiceExtension;
import org.locationtech.udig.catalog.URLUtils;
import org.locationtech.udig.catalog.URLUtilsTest;

public class LessInterestingService implements ServiceExtension {
Expand Down Expand Up @@ -79,11 +80,10 @@ public IService createService(URL id, Map<String, Serializable> params) {
} catch (Exception e) {
}
Serializable paramId = params.get("id"); //$NON-NLS-1$
if (paramId == null || !paramId.equals(testURL)) {
return null;
if (paramId instanceof URL && URLUtils.urlEquals(testURL, (URL) paramId, false)) {
return new LessInterestingServiceImpl((URL) params.get("id")); //$NON-NLS-1$
}

return new LessInterestingServiceImpl((URL) params.get("id")); //$NON-NLS-1$
return null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.locationtech.udig.catalog.IService;
import org.locationtech.udig.catalog.IServiceInfo;
import org.locationtech.udig.catalog.ServiceExtension;
import org.locationtech.udig.catalog.URLUtils;
import org.locationtech.udig.catalog.URLUtilsTest;

public class MoreInterestingService implements ServiceExtension {
Expand Down Expand Up @@ -79,11 +80,11 @@ public IService createService(URL id, Map<String, Serializable> params) {
} catch (Exception e) {
}
Serializable paramId = params.get("id"); //$NON-NLS-1$
if (paramId == null || !paramId.equals(testURL)) {
return null;
if (paramId instanceof URL && URLUtils.urlEquals(testURL, (URL) paramId, false)) {
return new MoreInterestingServiceImpl((URL) params.get("id")); //$NON-NLS-1$
}
return null;

return new MoreInterestingServiceImpl((URL) params.get("id")); //$NON-NLS-1$
}

@Override
Expand Down
Loading