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

Activity

Thanks, everyone. Opinion was evenly divided. After much discussion,
including on Gitter <https://gitter.im/geoserver/geoserver>, the new
class is called "URLs". Pull request
<https://github.com/geotools/geotools/pull/1604> updated and merged on
master.
Kind regards,
Ben.
–
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Renamed Urls
to URLs
throughout.
In this case Ben is trying to remove duplicate code that is currently in
gt-referencing and gt-main into a common class. (So this is being done for
code maintenance rather than change for changes sake).
–
Jody Garnett
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

I would prefer Urls, think it reads nicer. $0.02
On Tue, May 30, 2017 at 1:38 AM Andrea Aime <andrea.aime@geo-solutions.it>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Developers,
Do you want "Urls" or "URLs"?
Jody writes: "Please follow java naming conventions Urls renames to URLs"
And I responded: "@jodygarnett we might need to put Urls vs URLs to a
vote on the mailing list. Looking through the dependencies we have
(visible from GeoServer gs-web-app Start) we have a huge mix of URL
versus Url prefixes. There is at least one other Urls class out there. I
think we ask the developers what they want. There is a modern style that
three-letter acronyms get lowercase tail letters when forming
CamelCase/PascalCase. Does this rule apply when adding an "s" in the
style of "Lists", "Collections", and "Streams"? I thought yes, but happy
to change it to match majority preference."
Wiremock has an Urls class for its static URL helper methods.
You say tomayto, I say tomahto, ...
Kind regards,
Ben.
–
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Details
Details
Assignee

Reporter

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 classorg.geotools.util.Urls
in gt-metadata. This improvement will remove all duplication and improve test coverage.fileToURL
will be renamedfileToUrl
for consistency.Existing
DataUtilities
URL methods will be retained,@deprecated
, and implemented usingUrls
, so this change is fully backwards compatible. The solitary unit test for a URL method will be moved toorg.geotools.util.UrlsTest
in gt-metadata.