Move DataUtilities URL methods to new URLs class in gt-metadata

Description

gt-main DataUtilities URL methods are duplicated in gt-referencing because the latter has no access to methods in gt-main as it depends on gt-referencing. The methods in gt-referencing have no unit test coverage.

To fix this situation, permit gt-referencing access to these methods, and clean up this catch-all class into something more specific, this improvement will move DataUtilities URL methods to a new class org.geotools.util.Urls in gt-metadata. This improvement will remove all duplication and improve test coverage. fileToURL will be renamed fileToUrl for consistency.

Existing DataUtilities URL methods will be retained, @deprecated, and implemented using Urls, so this change is fully backwards compatible. The solitary unit test for a URL method will be moved to org.geotools.util.UrlsTest in gt-metadata.

Environment

None

Assignee

Ben Caradoc-Davies

Reporter

Ben Caradoc-Davies

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure