sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1690027 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/ma...
Date Thu, 09 Jul 2015 08:41:05 GMT
Author: desruisseaux
Date: Thu Jul  9 08:41:05 2015
New Revision: 1690027

URL: http://svn.apache.org/r1690027
Log:
Consolidation in the use of loggers, especially regarding warnings during XML (un)marshalling.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.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/citation/DefaultContact.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescriptionTest.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectifiedTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -182,7 +182,7 @@ public abstract class LegacyPropertyAdap
     public static void warnIgnoredExtraneous(final Class<?> valueClass,
             final Class<?> callerClass, final String callerMethod)
     {
-        Context.warningOccured(Context.current(), ISOMetadata.LOGGER, callerClass, callerMethod,
+        Context.warningOccured(Context.current(), callerClass, callerMethod,
                 Messages.class, Messages.Keys.IgnoredPropertiesAfterFirst_1, valueClass);
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -166,7 +166,7 @@ public final class MetadataUtilities ext
         } else {
             final StringBuilder buffer = new StringBuilder(property.length() + 3).append("set").append(property);
             buffer.setCharAt(3, Character.toUpperCase(buffer.charAt(3)));
-            Context.warningOccured(context, ISOMetadata.LOGGER, classe, buffer.toString(),
Errors.class, key, arguments);
+            Context.warningOccured(context, classe, buffer.toString(), Errors.class, key,
arguments);
             return null;
         }
     }

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=1690027&r1=1690026&r2=1690027&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] Thu Jul  9 08:41:05 2015
@@ -69,7 +69,10 @@ public class ISOMetadata extends Modifia
      * 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);
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -232,7 +232,7 @@ public class DefaultContact extends ISOM
                 }
             }
             if (ignored != null) {
-                Context.warningOccured(Context.current(), LOGGER, DefaultContact.class, "getPhone",
+                Context.warningOccured(Context.current(), DefaultContact.class, "getPhone",
                         Messages.class, Messages.Keys.IgnoredPropertyAssociatedTo_1, ignored.toString());
             }
         }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultResolution.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -211,7 +211,7 @@ public class DefaultResolution extends I
             if (newValue == null) {
                 return; // Do not erase the other property.
             }
-            Context.warningOccured(Context.current(), LOGGER, DefaultResolution.class, SETTERS[code-1],
+            Context.warningOccured(Context.current(), DefaultResolution.class, SETTERS[code-1],
                     Messages.class, Messages.Keys.DiscardedExclusiveProperty_2, NAMES[property-1],
NAMES[code-1]);
         }
         value = newValue;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescription.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -250,7 +250,7 @@ public class DefaultScopeDescription ext
      */
     private void warningOnOverwrite(final byte code) {
         if (value != null && property != code) {
-            Context.warningOccured(Context.current(), LOGGER, DefaultScopeDescription.class,
SETTERS[code-1],
+            Context.warningOccured(Context.current(), DefaultScopeDescription.class, SETTERS[code-1],
                     Messages.class, Messages.Keys.DiscardedExclusiveProperty_2, NAMES[property-1],
NAMES[code-1]);
         }
     }

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -211,7 +211,7 @@ public class DefaultGeorectified extends
             booleans |= CHECK_POINT_MASK;
         } else {
             if (checkPointDescription != null && (booleans & CHECK_POINT_MASK)
!= 0) {
-                Context.warningOccured(Context.current(), LOGGER, DefaultGeorectified.class,
"setCheckPointAvailable",
+                Context.warningOccured(Context.current(), DefaultGeorectified.class, "setCheckPointAvailable",
                         Messages.class, Messages.Keys.PropertyHiddenBy_2, "checkPointDescription",
"checkPointAvailability");
             }
             booleans &= ~CHECK_POINT_MASK;

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -21,6 +21,7 @@ import java.lang.reflect.Modifier;
 import org.opengis.util.Enumerated;
 import org.opengis.annotation.UML;
 import org.opengis.annotation.Specification;
+import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.metadata.MetadataStandard;
 import org.apache.sis.metadata.MetadataTestCase;
 import org.apache.sis.test.LoggingWatcher;
@@ -48,7 +49,7 @@ public final strictfp class AllMetadataT
      * details (it should have been a private field).
      */
     @Rule
-    public final LoggingWatcher listener = new LoggingWatcher(ISOMetadata.LOGGER);
+    public final LoggingWatcher listener = new LoggingWatcher(Context.LOGGER);
 
     /**
      * Creates a new test case with all GeoAPI interfaces and code lists to test.

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -20,6 +20,7 @@ import javax.xml.bind.JAXBException;
 import org.opengis.metadata.identification.RepresentativeFraction;
 import org.apache.sis.xml.XML;
 import org.apache.sis.xml.Namespaces;
+import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.Schemas;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.DependsOn;
@@ -46,7 +47,7 @@ public final strictfp class DefaultResol
      * details (it should have been a private field).
      */
     @Rule
-    public final LoggingWatcher listener = new LoggingWatcher(DefaultResolution.LOGGER) {
+    public final LoggingWatcher listener = new LoggingWatcher(Context.LOGGER) {
         /**
          * Ensures that the logging message contains the name of the exclusive properties.
          */

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescriptionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescriptionTest.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescriptionTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/maintenance/DefaultScopeDescriptionTest.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -17,6 +17,7 @@
 package org.apache.sis.metadata.iso.maintenance;
 
 import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.TestCase;
 import org.junit.Rule;
@@ -40,7 +41,7 @@ public final strictfp class DefaultScope
      * details (it should have been a private field).
      */
     @Rule
-    public final LoggingWatcher listener = new LoggingWatcher(DefaultScopeDescription.LOGGER)
{
+    public final LoggingWatcher listener = new LoggingWatcher(Context.LOGGER) {
         /**
          * Ensures that the logging message contains the name of the exclusive properties.
          */

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectifiedTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectifiedTest.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectifiedTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectifiedTest.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -18,6 +18,7 @@ package org.apache.sis.metadata.iso.spat
 
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.TestCase;
 import org.junit.Rule;
@@ -41,7 +42,7 @@ public final strictfp class DefaultGeore
      * details (it should have been a private field).
      */
     @Rule
-    public final LoggingWatcher listener = new LoggingWatcher(DefaultGeorectified.LOGGER)
{
+    public final LoggingWatcher listener = new LoggingWatcher(Context.LOGGER) {
         /**
          * Ensures that the logging message contains the name of the exclusive properties.
          */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -23,7 +23,6 @@ import org.opengis.referencing.datum.Ell
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.gco.Measure;
-import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -132,8 +131,7 @@ public final class SecondDefiningParamet
      */
     public void setInverseFlattening(final Measure measure) {
         if (measure.setUnit(Unit.ONE)) {
-            Context.warningOccured(Context.current(), ReferencingUtilities.LOGGER,
-                    SecondDefiningParameter.class, "setInverseFlattening",
+            Context.warningOccured(Context.current(), SecondDefiningParameter.class, "setInverseFlattening",
                     Errors.class, Errors.Keys.IncompatiblePropertyValue_1, "uom");
         }
         this.measure = measure;

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -17,7 +17,6 @@
 package org.apache.sis.internal.referencing;
 
 import java.util.Collection;
-import java.util.logging.Logger;
 import javax.measure.unit.Unit;
 import javax.measure.quantity.Angle;
 import org.opengis.annotation.UML;
@@ -28,11 +27,9 @@ import org.opengis.referencing.datum.Ell
 import org.opengis.referencing.datum.PrimeMeridian;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Utilities;
-import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.system.Modules;
 import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.referencing.datum.DefaultPrimeMeridian;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
@@ -56,11 +53,6 @@ import static org.apache.sis.internal.ut
  */
 public final class ReferencingUtilities extends Static {
     /**
-     * The logger to use for messages related to the {@code sis-referencing} module.
-     */
-    public static final Logger LOGGER = Logging.getLogger(Modules.REFERENCING);
-
-    /**
      * Do not allow instantiation of this class.
      */
     private ReferencingUtilities() {
@@ -323,7 +315,7 @@ public final class ReferencingUtilities
         }
         final Context context = Context.current();
         if (context != null) {
-            Context.warningOccured(context, LOGGER, classe, method, Errors.class, Errors.Keys.ElementAlreadyPresent_1,
name);
+            Context.warningOccured(context, classe, method, Errors.class, Errors.Keys.ElementAlreadyPresent_1,
name);
             return false;
         } else {
             throw new IllegalStateException(Errors.format(Errors.Keys.ElementAlreadyPresent_1,
name));

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -523,7 +523,7 @@ public class DefaultCoordinateSystemAxis
      * @param value The invalid value.
      */
     private static void outOfRange(final String name, final Double value) {
-        Context.warningOccured(Context.current(), ReferencingUtilities.LOGGER, DefaultCoordinateSystemAxis.class,
name,
+        Context.warningOccured(Context.current(), DefaultCoordinateSystemAxis.class, name,
                 Errors.class, Errors.Keys.InconsistentAttribute_2, name, value);
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -33,7 +33,6 @@ import org.apache.sis.internal.util.Nume
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.gco.Measure;
 import org.apache.sis.internal.jaxb.referencing.SecondDefiningParameter;
-import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.referencing.IdentifiedObjects;
@@ -581,7 +580,7 @@ public class DefaultEllipsoid extends Ab
      */
     private static void warnDuplicated(final String element) {
          // We cheat a bit for the "unmarshal" method name since there is not such method...
-        Context.warningOccured(Context.current(), ReferencingUtilities.LOGGER, DefaultEllipsoid.class,
"unmarshal",
+        Context.warningOccured(Context.current(), DefaultEllipsoid.class, "unmarshal",
                 Errors.class, Errors.Keys.DuplicatedElement_1, element);
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -391,7 +391,6 @@ public final class Context extends Marsh
      * message from the {@code exception}.</p>
      *
      * @param context   The current context, or {@code null} if none.
-     * @param logger    The logger where to send the warning.
      * @param level     The logging level.
      * @param classe    The class to declare as the warning source.
      * @param method    The name of the method to declare as the warning source.
@@ -402,7 +401,7 @@ public final class Context extends Marsh
      *
      * @since 0.5
      */
-    public static void warningOccured(final Context context, final Logger logger,
+    public static void warningOccured(final Context context,
             final Level level, final Class<?> classe, final String method, final Throwable
exception,
             final Class<? extends IndexedResourceBundle> resources, final short key,
final Object... arguments)
     {
@@ -423,7 +422,7 @@ public final class Context extends Marsh
         }
         record.setSourceClassName(classe.getCanonicalName());
         record.setSourceMethodName(method);
-        record.setLoggerName(logger.getName());
+        record.setLoggerName(Loggers.XML);
         if (context != null) {
             final WarningListener<?> warningListener = context.warningListener;
             if (warningListener != null) {
@@ -436,7 +435,7 @@ public final class Context extends Marsh
          * Log the warning without stack-trace, since this method shall be used
          * only for non-fatal warnings and we want to avoid polluting the logs.
          */
-        logger.log(record);
+        LOGGER.log(record);
     }
 
     /**
@@ -444,7 +443,6 @@ public final class Context extends Marsh
      * resources. The message will be logged at {@link Level#WARNING}.
      *
      * @param context   The current context, or {@code null} if none.
-     * @param logger    The logger where to send the warning.
      * @param classe    The class to declare as the warning source.
      * @param method    The name of the method to declare as the warning source.
      * @param resources Either {@code Errors.class} or {@code Messages.class}.
@@ -453,11 +451,10 @@ public final class Context extends Marsh
      *
      * @since 0.5
      */
-    public static void warningOccured(final Context context, final Logger logger,
-            final Class<?> classe, final String method,
+    public static void warningOccured(final Context context, final Class<?> classe,
final String method,
             final Class<? extends IndexedResourceBundle> resources, final short key,
final Object... arguments)
     {
-        warningOccured(context, logger, Level.WARNING, classe, method, null, resources, key,
arguments);
+        warningOccured(context, Level.WARNING, classe, method, null, resources, key, arguments);
     }
 
     /**
@@ -473,7 +470,7 @@ public final class Context extends Marsh
     public static void warningOccured(final Context context, final Class<?> classe,
             final String method, final Exception cause, final boolean warning)
     {
-        warningOccured(context, LOGGER, warning ? Level.WARNING : Level.FINE, classe, method,
cause,
+        warningOccured(context, warning ? Level.WARNING : Level.FINE, classe, method, cause,
                 null, (short) 0, (Object[]) null);
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -151,7 +151,7 @@ public final class SpecializedIdentifier
      * @param cause   The exception that occurred during the parsing process.
      */
     static void parseFailure(final Context context, final String value, final Class<?>
type, final Exception cause) {
-        Context.warningOccured(context, Context.LOGGER, Level.WARNING, IdentifierMap.class,
"put", cause,
+        Context.warningOccured(context, Level.WARNING, IdentifierMap.class, "put", cause,
                 Messages.class, Messages.Keys.UnparsableValueStoredAsText_2, type, value);
     }
 

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -139,7 +139,7 @@ public class GO_CharacterString {
                 property  = type;
                 noset     = true;
             }
-            Context.warningOccured(Context.current(), Context.LOGGER, getClass(), "setText",
Messages.class,
+            Context.warningOccured(Context.current(), getClass(), "setText", Messages.class,
                     Messages.Keys.DiscardedExclusiveProperty_2, nameOf(discarded), nameOf(property));
             if (noset) {
                 return;

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/Measure.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -206,7 +206,7 @@ public final class Measure {
      * @param methodName The name of the method invoking this method.
      */
     public static void missingUOM(final Class<?> caller, final String methodName) {
-        Context.warningOccured(Context.current(), Context.LOGGER, caller, methodName,
+        Context.warningOccured(Context.current(), caller, methodName,
                 Errors.class, Errors.Keys.MandatoryAttribute_2, "uom", "Measure");
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -148,7 +148,7 @@ final class ObjectReference {
         if (value != null) {
             final T previous = map.putSpecialized(authority, value);
             if (previous != null && !previous.equals(value)) {
-                Context.warningOccured(context, Context.LOGGER, IdentifierMap.class, "putSpecialized",
+                Context.warningOccured(context, IdentifierMap.class, "putSpecialized",
                         Errors.class, Errors.Keys.InconsistentAttribute_2, authority.getName(),
value);
                 map.putSpecialized(authority, previous);
             }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmd/Country.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -148,7 +148,7 @@ public final class Country extends GO_Ch
                     if (++i == code.length() || code.charAt(i) == '_') {
                         code = new StringBuilder().append(code, 0, i).append(c).append(code,
i, length).toString();
                     } else if (!c.equals(CharSequences.token(code, i))) {
-                        Context.warningOccured(context, Context.LOGGER, caller, "unmarshal",
Errors.class,
+                        Context.warningOccured(context, caller, "unmarshal", Errors.class,
                                 Errors.Keys.IncompatiblePropertyValue_1, "country");
                     }
                 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -116,7 +116,7 @@ public class SC_VerticalCRS extends Prop
      */
     @XmlAnyElement(lax = true)
     public Object getElement() {
-        Context.warningOccured(Context.current(), Context.LOGGER, SC_VerticalCRS.class, "getElement",
+        Context.warningOccured(Context.current(), SC_VerticalCRS.class, "getElement",
                 Errors.class, Errors.Keys.MissingRequiredModule_1, "sis-referencing");
         return null;
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -119,7 +119,7 @@ public final class TM_Primitive extends
                      * TemporalPrimitive as the source class, since it is the closest we
can get
                      * to a public API.
                      */
-                    Context.warningOccured(context, Context.LOGGER, TemporalPrimitive.class,
+                    Context.warningOccured(context, TemporalPrimitive.class,
                             "setTimePeriod", Errors.class, Errors.Keys.IllegalRange_2, begin,
end);
                 } else try {
                     metadata = TemporalUtilities.createPeriod(begin, end);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java?rev=1690027&r1=1690026&r2=1690027&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
[UTF-8] Thu Jul  9 08:41:05 2015
@@ -160,7 +160,7 @@ public final class CheckedArrayList<E> e
         }
         final Context context = Context.current();
         if (context != null) {
-            Context.warningOccured(context, Context.LOGGER, collection.getClass(), "add",
Errors.class, key, arguments);
+            Context.warningOccured(context, collection.getClass(), "add", Errors.class, key,
arguments);
             return null;
         } else {
             return Errors.format(key, arguments);



Mime
View raw message