Hello Jody and others,
I am having trouble understanding the changes that were made about 6
months ago to the ResourceStore's expected behaviour.
In particular, in the class
'org.geoserver.platform.resource.ResourceTheoryTest', the unit test
'theoryRootSlashIsIgnored' was replaced by 'theoryRootIsAbsolute'. I
cannot make sense out of this theory test at all.
This seems to be entirely contradictory to the whole reason that the
ResourceStore API was created, that is to make an abstraction of the
/Data Directory/, so that it can be replaced by something else (such as
jdbc store or other implementations that have been made). There was
already support for absolute file paths in all circumstances by using
"file:" URLs. This will bypass the resource store and call
Files.asResource instead. But resource: URLs are for the data directory
or alternative resource store only. How does it make sense to get
absolute paths from the resource store?
In order to make jdbc-config pass the tests, I will have to turn off
this particular method. But why should the test even be there if the
file resource store is the only one that could ever support it?
Programmers and users will rely on this behaviour and support for all
alternative implementations of ResourceStore will be broken. In this
case we may as well do away with the API and just use the file system
directly again.
Kind Regards
Niels
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel