Change of a singleton value to a collection. This change has been forced by a GeoAPI change. Reverting this change result in compilation error, and fixing the error give us back identical result since the method signature is imposed by the GeoAPI interface.
Action: all contributions forced by changes in GeoAPI interfaces
(mostly import
statements and method signatures) have been rewritten from scratch
by creating an empty Java class implementing the interface,
clicking on the "Implement all abstract methods" contextual menu in NetBeans,
removing the <? extends>
part in parameterized type of collections,
adding the synchronized
keyword (for now)
and finally adding the corresponding private fields.
This action has been committed in the Apache SIS JDK7 branch at revision 1458238.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r24924:24925 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/metadata/iso/constraint/LegalConstraintsImpl.java
Revision 24924 | Revision 24925 |
---|---|
// J2SE direct dependencies import java.util.Collection; // OpenGIS dependencies import org.opengis.metadata.constraint.Restriction; |
// J2SE direct dependencies
import java.util.Collection;
import java.util.Collections;
// OpenGIS dependencies
import org.opengis.metadata.constraint.Restriction; |
* access constraints} or {@linkplain #getUseConstraints use constraints} declares * {@linkplain Restriction#OTHER_RESTRICTIONS other restrictions}. */ public InternationalString getOtherConstraints() { return otherConstraints; } /** |
* access constraints} or {@linkplain #getUseConstraints use constraints} declares * {@linkplain Restriction#OTHER_RESTRICTIONS other restrictions}. */ public Collection getOtherConstraints() { return Collections.singleton( otherConstraints ); } /** |