logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1587121 - in /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j: Marker.java MarkerManager.java
Date Sun, 13 Apr 2014 23:29:59 GMT
Author: rgoers
Date: Sun Apr 13 23:29:58 2014
New Revision: 1587121

URL: http://svn.apache.org/r1587121
Log:
LOG4J2-585 - rename set to setParents. Use Arrays.copy

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Marker.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Marker.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Marker.java?rev=1587121&r1=1587120&r2=1587121&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Marker.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/Marker.java
Sun Apr 13 23:29:58 2014
@@ -78,7 +78,7 @@ public interface Marker extends Serializ
      * @param markers The new set of parent Markers or null.
      * @return The current Marker object.
      */
-    Marker set(Marker... markers);
+    Marker setParents(Marker... markers);
 
     /**
      * Removes the specified Marker as a parent of this Marker.

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java?rev=1587121&r1=1587120&r2=1587121&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
Sun Apr 13 23:29:58 2014
@@ -16,6 +16,7 @@
  */
 package org.apache.logging.log4j;
 
+import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -139,7 +140,7 @@ public final class MarkerManager {
         }
 
         @Override
-        public Marker set(Marker... markers) {
+        public Marker setParents(Marker... markers) {
             if (markers == null || markers.length == 0) {
                 this.parents = null;
             } else {
@@ -165,9 +166,7 @@ public final class MarkerManager {
             if (this.parents == null) {
                 return null;
             }
-            Marker[] markers = new Marker[this.parents.length];
-            System.arraycopy(this.parents, 0, markers, 0, this.parents.length);
-            return markers;
+            return Arrays.copyOf(this.parents, this.parents.length);
         }
 
         @Override



Mime
View raw message