sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1704729 - in /sis/branches/JDK8/core: sis-feature/src/main/java/org/apache/sis/feature/ sis-metadata/src/main/java/org/apache/sis/io/wkt/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-metadata/src/main/java/org/apache/sis/met...
Date Tue, 22 Sep 2015 21:29:41 GMT
Author: desruisseaux
Date: Tue Sep 22 21:29:38 2015
New Revision: 1704729

URL: http://svn.apache.org/viewvc?rev=1704729&view=rev
Log:
Post-release cleanup: remove some deprecated methods.

Removed:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultOperation.java
Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedName.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/test/AssertTest.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -1478,21 +1478,6 @@ public class Formatter implements Locali
     }
 
     /**
-     * Removes the unit previously added by a call to {@code addContextualUnit(unit)}.
-     * If the given unit is null, then this method does nothing.
-     *
-     * @param unit The contextual unit to remove, or {@code null} if none.
-     *
-     * @deprecated Replaced by {@link #restoreContextualUnit(Unit, Unit)}.
-     */
-    @Deprecated
-    public void removeContextualUnit(final Unit<?> unit) {
-        if (unit != null) {
-            units.remove(unit.toSI());
-        }
-    }
-
-    /**
      * Returns the unit to use instead than the given one, or {@code unit} if there is no
replacement.
      * This method searches for a unit specified by {@link #addContextualUnit(Unit)}
      * which {@linkplain Unit#isCompatible(Unit) is compatible} with the given unit.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -425,6 +425,7 @@ final class GeodeticObjectParser extends
      * @return A properties map with the parent name and the optional authority code.
      * @throws ParseException if an element can not be parsed.
      */
+    @SuppressWarnings("ReturnOfCollectionOrArrayField")
     private Map<String,Object> parseMetadataAndClose(final Element parent, final String
name,
             final IdentifiedObject fallback) throws ParseException
     {

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -354,40 +354,6 @@ public class WKTFormat extends CompoundF
     }
 
     /**
-     * Returns whether non-ASCII characters are preserved. The default value is {@code false},
-     * which causes replacements like "é" → "e" in all elements except {@link ElementKind#REMARKS}.
-     *
-     * <p>This value is always {@code true} when the WKT {@linkplain #getConvention()
convention}
-     * is set to {@link Convention#INTERNAL}.</p>
-     *
-     * @return Whether non-ASCII characters are preserved.
-     *
-     * @since 0.5
-     *
-     * @deprecated Replaced by {@link #getTransliterator()}.
-     */
-    @Deprecated
-    public boolean isNonAsciiAllowed() {
-        return getTransliterator() == Transliterator.IDENTITY;
-    }
-
-    /**
-     * Sets whether non-ASCII characters shall be preserved. The default value is {@code
false},
-     * which causes replacements like "é" → "e" in all elements except {@link ElementKind#REMARKS}.
-     * Setting this property to {@code true} will disable such replacements.
-     *
-     * @param allowed Whether non-ASCII characters shall be preserved.
-     *
-     * @since 0.5
-     *
-     * @deprecated Replaced by {@link #setTransliterator(Transliterator)}.
-     */
-    @Deprecated
-    public void setNonAsciiAllowed(final boolean allowed) {
-        setTransliterator(allowed ? Transliterator.IDENTITY : Transliterator.DEFAULT);
-    }
-
-    /**
      * Returns whether WKT keywords should be written with upper cases or camel cases.
      *
      * @return The case to use for formatting keywords.
@@ -875,20 +841,6 @@ public class WKTFormat extends CompoundF
     }
 
     /**
-     * If a warning occurred during the last WKT {@linkplain #parse(CharSequence, ParsePosition)
parsing} or
-     * {@linkplain #format(Object, Appendable) formatting}, returns the warning. Otherwise
returns {@code null}.
-     * The warning is cleared every time a new object is parsed or formatted.
-     *
-     * @return The last warning, or {@code null} if none.
-     *
-     * @deprecated Replaced by {@link #getWarnings()}.
-     */
-    @Deprecated
-    public String getWarning() {
-        return (warnings != null) ? warnings.toString() : null;
-    }
-
-    /**
      * Returns a clone of this format.
      *
      * @return A clone of this format.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -17,7 +17,6 @@
 package org.apache.sis.metadata.iso;
 
 import java.util.Collection;
-import java.util.logging.Logger;
 import java.io.Serializable;
 import javax.xml.bind.annotation.XmlID;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -31,10 +30,8 @@ import org.apache.sis.xml.IdentifiedObje
 import org.apache.sis.metadata.MetadataStandard;
 import org.apache.sis.metadata.ModifiableMetadata;
 import org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases;
-import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.Utilities;
 import org.apache.sis.util.collection.Containers;
-import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.CharSequences;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
@@ -66,17 +63,6 @@ public class ISOMetadata extends Modifia
     private static final long serialVersionUID = -4997239501383133209L;
 
     /**
-     * The logger for warnings emitted by any class in the {@code org.apache.sis.metadata.iso.*}
packages.
-     * Warnings are emitted when an action causes the lost of data. For example the {@code
"distance"} and
-     * {@code "equivalentScale"} properties in {@link org.apache.sis.metadata.iso.identification.DefaultResolution}
-     * are mutually exclusive: setting one discards the other. In such case, a warning is
logged.
-     *
-     * @deprecated Messages related to XML (un)marshalling are now logged to the {@code "org.apache.sis.xml"}
logger.
-     */
-    @Deprecated
-    public static final Logger LOGGER = Logging.getLogger(Loggers.ISO_19115);
-
-    /**
      * All identifiers associated with this metadata, or {@code null} if none.
      * This field is initialized to a non-null value when first needed.
      */

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -448,39 +448,6 @@ public class ImmutableIdentifier extends
     }
 
     /**
-     * Comments on or information about this identifier, or {@code null} if none.
-     *
-     * <div class="note"><b>Example:</b> "superseded by code XYZ".</div>
-     *
-     * @return Optional comments about this identifier, or {@code null} if none.
-     *
-     * @deprecated Replaced by {@link #getDescription()} for non-deprecated identifiers,
or by
-     *             {@link org.apache.sis.util.Deprecable#getRemarks()} for identifiers that
may be deprecated.
-     */
-    @Deprecated
-    public InternationalString getRemarks() {
-        return description;
-    }
-
-    /**
-     * Returns {@code true} if the object represented by this identifier is deprecated. In
such
-     * case, the {@linkplain #getRemarks() remarks} may contains the new identifier to use.
-     *
-     * <p>The default implementation returns {@code false} in all cases.</p>
-     *
-     * @see org.apache.sis.referencing.AbstractIdentifiedObject#isDeprecated()
-     *
-     * @return {@code true} if this code is deprecated.
-     *
-     * @deprecated Moved to {@link org.apache.sis.util.Deprecable#isDeprecated()} if this
-     *             {@code ImmutableIdentifier} instance implements {@code Deprecable}.
-     */
-    @Deprecated
-    public boolean isDeprecated() {
-        return false;
-    }
-
-    /**
      * Returns a hash code value for this object.
      */
     @Override

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -75,14 +75,6 @@ import static org.apache.sis.internal.ut
  */
 public final class Citations extends Static {
     /**
-     * The <a href="http://www.iso.org/">International Organization for Standardization</a>.
-     *
-     * @deprecated No replacement since ISO is an {@linkplain DefaultOrganisation organisation}
rather than a citation.
-     */
-    @Deprecated
-    public static final Citation ISO = new SimpleCitation("ISO");
-
-    /**
      * The <cite>Geographic Information — Metadata</cite> standards defined
by ISO 19115.
      * This list contains two standards published by the
      * <a href="http://www.iso.org/">International Organization for Standardization</a>:
@@ -119,16 +111,15 @@ public final class Citations extends Sta
     });
 
     /**
-     * The <a href="http://www.ogp.org.uk">International Association of Oil &amp;
Gas Producers</a> organization.
+     * The <a href="http://www.iogp.org">International Association of Oil &amp;
Gas producers</a> (IOGP) organization.
      * This organization is responsible for maintainance of {@link #EPSG} database.
      *
-     * @since 0.4
+     * <p>We do not expose this citation in public API because it is an organization
rather than a reference
+     * to a document or a database (see SIS-200). However we need it as the authority of
{@link #EPSG}.</p>
      *
-     * @deprecated The OGP organization is now known as IOGP. This citation will be removed
in SIS 0.7
-     *             because of this name change and for avoiding confusion with {@link #EPSG}
citation.
+     * @see <a href="http://issues.apache.org/jira/browse/SIS-200">SIS-200</a>
      */
-    @Deprecated
-    public static final Citation OGP = new SimpleCitation("OGP");
+    static final Citation IOGP = new SimpleCitation("IOGP");
 
     /**
      * The authority for identifiers of objects defined by the
@@ -266,17 +257,6 @@ public final class Citations extends Sta
     public static final IdentifierSpace<String> ESRI = new CitationConstant.Authority<>("ESRI");
 
     /**
-     * The <a href="http://www.oracle.com">Oracle</a> organization.
-     *
-     * @deprecated No replacement since Oracle is an {@linkplain DefaultOrganisation organisation}
rather
-     *             than a citation, and we do not have Oracle-specific objects.
-     *
-     * @since 0.4
-     */
-    @Deprecated
-    public static final Citation ORACLE = new CitationConstant("Oracle");
-
-    /**
      * The authority for identifiers of objects defined by the
      * <a href="http://www.unidata.ucar.edu/software/netcdf-java">NetCDF</a>
specification.
      * The {@linkplain IdentifierSpace#getName() name} of this identifier space is fixed
to {@code "NetCDF"}.
@@ -424,9 +404,7 @@ public final class Citations extends Sta
         (SimpleCitation) SIS,
         (SimpleCitation) ISO_19115.get(0),
         (SimpleCitation) ISO_19115.get(1),
-        (SimpleCitation) OGP,
-        (SimpleCitation) ISO,
-        (SimpleCitation) ORACLE
+        (SimpleCitation) IOGP
     };
 
     static {  // Must be after CITATIONS array construction.
@@ -476,11 +454,8 @@ public final class Citations extends Sta
                 return citation;
             }
         }
-        /*
-         * Temporary check to be removed after we deleted the deprecated citation.
-         */
-        if (equalsFiltered(identifier, Constants.IOGP)) {
-            return OGP;
+        if (equalsFiltered(identifier, "OGP")) {    // Old name of "IOGP" organization.
+            return IOGP;
         }
         /*
          * If we found no match, org.apache.sis.internal.metadata.ServicesForUtility expects
the default citation

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -27,12 +27,10 @@ import org.opengis.metadata.citation.Cit
 import org.opengis.metadata.citation.OnlineResource;
 import org.opengis.metadata.citation.PresentationForm;
 import org.opengis.metadata.citation.Responsibility;
-import org.opengis.metadata.citation.ResponsibleParty;
 import org.opengis.metadata.citation.Series;
 import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.Types;
-import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.xml.IdentifierSpace;
@@ -177,36 +175,6 @@ public class DefaultCitation extends ISO
     }
 
     /**
-     * Constructs a citation with the specified responsible party.
-     * This convenience constructor initializes the citation title
-     * to the first non-null of the following properties:
-     * {@linkplain DefaultResponsibleParty#getOrganisationName() organization name},
-     * {@linkplain DefaultResponsibleParty#getPositionName() position name} or
-     * {@linkplain DefaultResponsibleParty#getIndividualName() individual name}.
-     *
-     * @param party The name and position information for an individual or organization that
is
-     *              responsible for the resource, or {@code null} if none.
-     *
-     * @deprecated As of ISO 19115:2014, {@link ResponsibleParty} has been replaced by {@link
Responsibility}.
-     */
-    @Deprecated
-    public DefaultCitation(final ResponsibleParty party) {
-        if (party != null) {
-            citedResponsibleParties = singleton(party, Responsibility.class);
-            title = party.getOrganisationName();
-            if (title == null) {
-                title = party.getPositionName();
-                if (title == null) {
-                    String name = party.getIndividualName();
-                    if (name != null) {
-                        title = new SimpleInternationalString(name);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
      * Constructs a new instance initialized with the values from the specified metadata
object.
      * This is a <cite>shallow</cite> copy constructor, since the other metadata
contained in the
      * given object are not recursively copied.

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -50,10 +50,9 @@ public final strictfp class CitationsTes
         assertSame(SIS,              fromName(Constants.SIS));
         assertSame(OGC,              fromName(Constants.OGC));   // Success of this test
is important for remaining of SIS.
         assertSame(EPSG,             fromName(Constants.EPSG));  // Success of this test
is important for remaining of SIS.
-        assertSame(OGP,              fromName(Constants.IOGP));  // TODO: return EPSG after
we removed deprecated constant.
-        assertSame(OGP,              fromName("OGP"));           // TODO: return EPSG after
we removed deprecated constant.
+        assertSame(IOGP,             fromName(Constants.IOGP));
+        assertSame(IOGP,             fromName("OGP"));
         assertSame(ESRI,             fromName("ESRI"));          // Handled in a way very
similar to "OGC".
-        assertSame(ORACLE,           fromName("Oracle"));
         assertSame(NETCDF,           fromName("NetCDF"));
         assertSame(GEOTIFF,          fromName("GeoTIFF"));
         assertSame(PROJ4,            fromName("Proj.4"));
@@ -63,7 +62,6 @@ public final strictfp class CitationsTes
         assertSame(S57,              fromName("S57"));
         assertSame(ISBN,             fromName("ISBN"));
         assertSame(ISSN,             fromName("ISSN"));
-        assertSame(ISO,              fromName("ISO"));
         assertSame(ISO_19115.get(0), fromName("ISO 19115-1"));
         assertSame(ISO_19115.get(1), fromName("ISO 19115-2"));
         /*
@@ -87,9 +85,7 @@ public final strictfp class CitationsTes
         assertEquals("SIS",         getIdentifier(SIS));
         assertEquals("OGC",         getIdentifier(OGC));
         assertEquals("EPSG",        getIdentifier(EPSG));
-        assertEquals("OGP",         getIdentifier(OGP));
         assertEquals("ESRI",        getIdentifier(ESRI));
-        assertEquals("Oracle",      getIdentifier(ORACLE));
         assertEquals("NetCDF",      getIdentifier(NETCDF));
         assertEquals("GeoTIFF",     getIdentifier(GEOTIFF));
         assertEquals("MapInfo",     getIdentifier(MAP_INFO));
@@ -97,7 +93,6 @@ public final strictfp class CitationsTes
         assertEquals("ISSN",        getIdentifier(ISSN));
         assertEquals("Proj.4",      getIdentifier(PROJ4));  // Not a valid Unicode identifier.
         assertEquals("S-57",        getIdentifier(S57));    // Not a valid Unicode identifier.
-        assertEquals("ISO",         getIdentifier(ISO));
         assertEquals("ISO:19115-1", getIdentifier(ISO_19115.get(0)));  // The ':' separator
is not usual in ISO references
         assertEquals("ISO:19115-2", getIdentifier(ISO_19115.get(1)));  // and could be changed
in future SIS versions.
     }
@@ -112,9 +107,7 @@ public final strictfp class CitationsTes
         assertEquals("SIS",         getUnicodeIdentifier(SIS));
         assertEquals("OGC",         getUnicodeIdentifier(OGC));
         assertEquals("EPSG",        getUnicodeIdentifier(EPSG));
-        assertEquals("OGP",         getUnicodeIdentifier(OGP));
         assertEquals("ESRI",        getUnicodeIdentifier(ESRI));
-        assertEquals("Oracle",      getUnicodeIdentifier(ORACLE));
         assertEquals("NetCDF",      getUnicodeIdentifier(NETCDF));
         assertEquals("GeoTIFF",     getUnicodeIdentifier(GEOTIFF));
         assertEquals("MapInfo",     getUnicodeIdentifier(MAP_INFO));
@@ -122,7 +115,6 @@ public final strictfp class CitationsTes
         assertEquals("ISSN",        getUnicodeIdentifier(ISSN));
         assertNull  ("Proj4",       getUnicodeIdentifier(PROJ4));      // Not yet publicly
declared as an identifier.
         assertNull  ("S57",         getUnicodeIdentifier(S57));        // Not yet publicly
declared as an identifier.
-        assertEquals("ISO",         getUnicodeIdentifier(ISO));
         assertNull  ("ISO_19115-1", getUnicodeIdentifier(ISO_19115.get(0)));  // Not a valid
Unicode identifier.
         assertNull  ("ISO_19115-2", getUnicodeIdentifier(ISO_19115.get(1)));
     }
@@ -137,9 +129,7 @@ public final strictfp class CitationsTes
         assertEquals("SIS",         org.apache.sis.internal.util.Citations.getCodeSpace(SIS));
         assertEquals("OGC",         org.apache.sis.internal.util.Citations.getCodeSpace(OGC));
         assertEquals("EPSG",        org.apache.sis.internal.util.Citations.getCodeSpace(EPSG));
-        assertEquals("OGP",         org.apache.sis.internal.util.Citations.getCodeSpace(OGP));
         assertEquals("ESRI",        org.apache.sis.internal.util.Citations.getCodeSpace(ESRI));
-        assertEquals("Oracle",      org.apache.sis.internal.util.Citations.getCodeSpace(ORACLE));
         assertEquals("NetCDF",      org.apache.sis.internal.util.Citations.getCodeSpace(NETCDF));
         assertEquals("GeoTIFF",     org.apache.sis.internal.util.Citations.getCodeSpace(GEOTIFF));
         assertEquals("MapInfo",     org.apache.sis.internal.util.Citations.getCodeSpace(MAP_INFO));
@@ -147,7 +137,6 @@ public final strictfp class CitationsTes
         assertEquals("ISSN",        org.apache.sis.internal.util.Citations.getCodeSpace(ISSN));
         assertEquals("Proj4",       org.apache.sis.internal.util.Citations.getCodeSpace(PROJ4));
         assertEquals("S57",         org.apache.sis.internal.util.Citations.getCodeSpace(S57));
-        assertEquals("ISO",         org.apache.sis.internal.util.Citations.getCodeSpace(ISO));
         assertNull  ("ISO_19115-1", org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(0)));
         assertNull  ("ISO_19115-2", org.apache.sis.internal.util.Citations.getCodeSpace(ISO_19115.get(1)));
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedName.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedName.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedName.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/DeprecatedName.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -18,6 +18,7 @@ package org.apache.sis.referencing;
 
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
+import org.apache.sis.util.Deprecable;
 
 
 /**
@@ -29,7 +30,7 @@ import org.opengis.metadata.citation.Cit
  * @version 0.6
  * @module
  */
-final class DeprecatedName extends NamedIdentifier {
+final class DeprecatedName extends NamedIdentifier implements Deprecable {
     /**
      * For cross-version compatibility.
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -81,7 +81,7 @@ public final strictfp class NamedIdentif
         // ImmutableIdentifier properties
         assertEquals("code",      "4326", identifier.getCode());
         assertEquals("codeSpace", "EPSG", identifier.getCodeSpace());
-        assertEquals("authority", "OGP",  Citations.getIdentifier(identifier.getAuthority()));
 // May change after resolution of SIS-200.
+        assertEquals("authority", "IOGP", Citations.getIdentifier(identifier.getAuthority()));
         assertNull  ("version",           identifier.getVersion());
         assertNull  ("description",       identifier.getDescription());
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -28,8 +28,8 @@ import org.apache.sis.util.Classes;
 
 
 /**
- * A set of utilities method for configuring loggings in SIS. Library implementors shall
fetch
- * their loggers using the {@link #getLogger(Class)} static method defined in this {@code
Logging}
+ * A set of utilities method for configuring loggings in SIS. Library implementors should
fetch
+ * their loggers using the {@link #getLogger(String)} static method defined in this {@code
Logging}
  * class rather than the one defined in the standard {@link Logger} class, in order to give
SIS a
  * chance to redirect the logs to an other framework like
  * <a href="http://commons.apache.org/logging/">Commons-logging</a> or
@@ -41,13 +41,13 @@ import org.apache.sis.util.Classes;
  *       the logger name}, {@linkplain LogRecord#setSourceClassName(String) source class
name} and
  *       {@linkplain LogRecord#setSourceMethodName(String) source method name} of the given
record
  *       before to log it.</li>
- *   <li>{@link #unexpectedException(Class, String, Throwable)} for reporting an anomalous
but
+ *   <li>{@link #unexpectedException(Logger, Class, String, Throwable)} for reporting
an anomalous but
  *       nevertheless non-fatal exception.</li>
  * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.6
  * @module
  */
 public final class Logging extends Static {
@@ -134,12 +134,12 @@ public final class Logging extends Stati
     }
 
     /**
-     * Returns a logger for the specified name. If a {@linkplain LoggerFactory logger factory}
has
-     * been set, then this method first {@linkplain LoggerFactory#getLogger asks to the factory}.
+     * Returns a logger for the specified name. If a {@linkplain LoggerFactory logger factory}
has been set,
+     * then this method first {@linkplain LoggerFactory#getLogger(String) asks to the factory}.
      * This rule gives SIS a chance to redirect logging events to
      * <a href="http://commons.apache.org/logging/">commons-logging</a> or some
equivalent framework.
      * Only if no factory was found or if the factory choose to not redirect the loggings,
then this
-     * method delegate to <code>{@linkplain Logger#getLogger Logger.getLogger}(name)</code>.
+     * method delegate to <code>{@linkplain Logger#getLogger(String) Logger.getLogger}(name)</code>.
      *
      * @param  name The logger name.
      * @return A logger for the specified name.
@@ -161,11 +161,8 @@ public final class Logging extends Stati
      *
      * @param  classe The class for which to obtain a logger.
      * @return A logger for the specified class.
-     *
-     * @deprecated Use {@link #getLogger(String)}, because the class name is sometime too
close to implementation details.
      */
-    @Deprecated   // Make package-private (do not delete) after we removed from public API.
-    public static Logger getLogger(Class<?> classe) {
+    static Logger getLogger(Class<?> classe) {
         Class<?> outer;
         while ((outer = classe.getEnclosingClass()) != null) {
             classe = outer;
@@ -267,26 +264,6 @@ public final class Logging extends Stati
     }
 
     /**
-     * Invoked when an unexpected error occurs. This method logs a message at the
-     * {@link Level#WARNING WARNING} level to a logger inferred from the given class.
-     *
-     * @param classe  The class where the error occurred.
-     * @param method  The method where the error occurred, or {@code null}.
-     * @param error   The error.
-     * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#WARNING}.
-     *
-     * @see #recoverableException(Class, String, Throwable)
-     *
-     * @deprecated A logger should be specified explicitely with
-     * {@link #unexpectedException(Logger, Class, String, Throwable)}.
-     */
-    @Deprecated
-    public static boolean unexpectedException(Class<?> classe, String method, Throwable
error) {
-        return unexpectedException((Logger) null, classe, method, error);
-    }
-
-    /**
      * Implementation of {@link #unexpectedException(Logger, Class, String, Throwable)}.
      *
      * @param logger  Where to log the error, or {@code null}.
@@ -295,7 +272,7 @@ public final class Logging extends Stati
      * @param error   The error.
      * @param level   The logging level.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at the specified level.
+     *         does not log anything at the specified level.
      */
     private static boolean unexpectedException(Logger logger, String classe, String method,
                                                final Throwable error, final Level level)
@@ -426,9 +403,9 @@ public final class Logging extends Stati
      * @param method  The method name where the error occurred.
      * @param error   The error.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#CONFIG}.
+     *         does not log anything at {@link Level#CONFIG}.
      *
-     * @see #unexpectedException(Class, String, Throwable)
+     * @see #unexpectedException(Logger, Class, String, Throwable)
      */
     static boolean configurationException(final Logger logger, final Class<?> classe,
final String method, final Throwable error) {
         final String classname = (classe != null) ? classe.getName() : null;
@@ -437,27 +414,6 @@ public final class Logging extends Stati
 
     /**
      * Invoked when a recoverable error occurs. This method is similar to
-     * {@link #unexpectedException(Class,String,Throwable) unexpectedException}
-     * except that it doesn't log the stack trace and uses a lower logging level.
-     *
-     * @param classe  The class where the error occurred.
-     * @param method  The method name where the error occurred.
-     * @param error   The error.
-     * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#FINE}.
-     *
-     * @see #unexpectedException(Class, String, Throwable)
-     *
-     * @deprecated A logger should be specified explicitely with
-     * {@link #recoverableException(Logger, Class, String, Throwable)}.
-     */
-    @Deprecated
-    public static boolean recoverableException(final Class<?> classe, final String
method, final Throwable error) {
-        return recoverableException(null, classe, method, error);
-    }
-
-    /**
-     * Invoked when a recoverable error occurs. This method is similar to
      * {@link #unexpectedException(Logger,Class,String,Throwable) unexpectedException(…)}
      * except that it does not log the stack trace and uses a lower logging level.
      *
@@ -488,7 +444,7 @@ public final class Logging extends Stati
      * @param method  The method name where the error occurred.
      * @param error   The error.
      * @return {@code true} if the error has been logged, or {@code false} if the logger
-     *         doesn't log anything at {@link Level#SEVERE}.
+     *         does not log anything at {@link Level#SEVERE}.
      *
      * @see #unexpectedException(Logger, Class, String, Throwable)
      * @see #recoverableException(Logger, Class, String, Throwable)

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/test/AssertTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/test/AssertTest.java?rev=1704729&r1=1704728&r2=1704729&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/test/AssertTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/internal/test/AssertTest.java
[UTF-8] Tue Sep 22 21:29:38 2015
@@ -27,7 +27,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.6
  * @module
  */
 public final strictfp class AssertTest extends TestCase {
@@ -58,7 +58,7 @@ public final strictfp class AssertTest e
      * Tests the {@link Assert#assertSerializedEquals(Object)} method.
      */
     @Test
-    public void testSerialize() {
+    public void testAssertSerializedEquals() {
         final String local = "Le silence éternel de ces espaces infinis m'effraie";
         assertNotSame(local, assertSerializedEquals(local));
     }



Mime
View raw message