logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1391676 - in /logging/log4j/log4j2/trunk/log4j12-api/src: main/java/org/apache/log4j/ test/java/org/apache/log4j/
Date Fri, 28 Sep 2012 22:01:34 GMT
Author: ggregory
Date: Fri Sep 28 22:01:33 2012
New Revision: 1391676

URL: http://svn.apache.org/viewvc?rev=1391676&view=rev
Log:
Add missing '@Override' annotations (Java 5 level).
Add missing '@Deprecated' annotations.

Modified:
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java
    logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Priority.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java?rev=1391676&r1=1391675&r2=1391676&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/MDC.java Fri Sep
28 22:01:33 2012
@@ -31,10 +31,12 @@ public final class MDC {
 
     private static ThreadLocal<Map<String, Object>> localMap =
         new InheritableThreadLocal<Map<String, Object>>() {
+            @Override
             protected Map<String, Object> initialValue() {
                 return new HashMap<String, Object>();
             }
 
+            @Override
             protected Map<String, Object> childValue(Map<String, Object> parentValue)
{
                 return parentValue == null ? new HashMap<String, Object>() : new HashMap<String,
Object>(parentValue);
             }

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Priority.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Priority.java?rev=1391676&r1=1391675&r2=1391676&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Priority.java (original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/main/java/org/apache/log4j/Priority.java Fri
Sep 28 22:01:33 2012
@@ -63,26 +63,31 @@ public class Priority {
     /**
      * @deprecated Use {@link Level#FATAL} instead.
      */
+    @Deprecated
     public static final Priority FATAL = new Level(FATAL_INT, "FATAL", 0);
 
     /**
      * @deprecated Use {@link Level#ERROR} instead.
      */
+    @Deprecated
     public static final Priority ERROR = new Level(ERROR_INT, "ERROR", 3);
 
     /**
      * @deprecated Use {@link Level#WARN} instead.
      */
+    @Deprecated
     public static final Priority WARN = new Level(WARN_INT, "WARN", 4);
 
     /**
      * @deprecated Use {@link Level#INFO} instead.
      */
+    @Deprecated
     public static final Priority INFO = new Level(INFO_INT, "INFO", 6);
 
     /**
      * @deprecated Use {@link Level#DEBUG} instead.
      */
+    @Deprecated
     public static final Priority DEBUG = new Level(DEBUG_INT, "DEBUG", 7);
 
     /*
@@ -120,6 +125,7 @@ public class Priority {
      *
      * @since 1.2
      */
+    @Override
     public boolean equals(Object o) {
         if (o instanceof Priority) {
             Priority r = (Priority) o;
@@ -160,6 +166,7 @@ public class Priority {
      *
      * @deprecated This method will be removed with no replacement.
      */
+    @Deprecated
     public static Priority[] getAllPossiblePriorities() {
         return new Priority[]{Priority.FATAL, Priority.ERROR, Level.WARN,
             Priority.INFO, Priority.DEBUG};
@@ -170,6 +177,7 @@ public class Priority {
      * Returns the string representation of this priority.
      * @return The name of the Priority.
      */
+    @Override
     public final String toString() {
         return levelStr;
     }
@@ -187,6 +195,7 @@ public class Priority {
      * @return The Priority matching the name.
      * @deprecated Please use the {@link Level#toLevel(String)} method instead.
      */
+    @Deprecated
     public static Priority toPriority(String sArg) {
         return Level.toLevel(sArg);
     }
@@ -196,6 +205,7 @@ public class Priority {
      * @return The Priority matching the value.
      * @deprecated Please use the {@link Level#toLevel(int)} method instead.
      */
+    @Deprecated
     public static Priority toPriority(int val) {
         return toPriority(val, Priority.DEBUG);
     }
@@ -206,6 +216,7 @@ public class Priority {
      * @return The Priority matching the value or the default Priority if no match is found.
      * @deprecated Please use the {@link Level#toLevel(int, Level)} method instead.
      */
+    @Deprecated
     public static Priority toPriority(int val, Priority defaultPriority) {
         return Level.toLevel(val, (Level) defaultPriority);
     }
@@ -216,6 +227,7 @@ public class Priority {
      * @return The Priority matching the name or the default Priority if no match is found.
      * @deprecated Please use the {@link Level#toLevel(String, Level)} method instead.
      */
+    @Deprecated
     public static Priority toPriority(String sArg, Priority defaultPriority) {
         return Level.toLevel(sArg, (Level) defaultPriority);
     }

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java?rev=1391676&r1=1391675&r2=1391676&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/CategoryTest.java
Fri Sep 28 22:01:33 2012
@@ -134,6 +134,7 @@ public class CategoryTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testSetPriority() {
         Logger logger = Logger.getLogger("org.example.foo");

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java?rev=1391676&r1=1391675&r2=1391676&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
Fri Sep 28 22:01:33 2012
@@ -474,6 +474,7 @@ public class LoggerTest {
             counter = 0;
         }
 
+        @Override
         public void close() {
         }
 

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java?rev=1391676&r1=1391675&r2=1391676&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/PriorityTest.java
Fri Sep 28 22:01:33 2012
@@ -98,6 +98,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testFatal() {
         assertTrue(Priority.FATAL instanceof Level);
@@ -108,6 +109,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testERROR() {
         assertTrue(Priority.ERROR instanceof Level);
@@ -118,6 +120,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testWARN() {
         assertTrue(Priority.WARN instanceof Level);
@@ -128,6 +131,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testINFO() {
         assertTrue(Priority.INFO instanceof Level);
@@ -138,6 +142,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testDEBUG() {
         assertTrue(Priority.DEBUG instanceof Level);
@@ -148,6 +153,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testEqualsNull() {
         assertFalse(Priority.DEBUG.equals(null));
@@ -158,6 +164,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testEqualsLevel() {
         //
@@ -171,6 +178,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testGetAllPossiblePriorities() {
         Priority[] priorities = Priority.getAllPossiblePriorities();
@@ -182,6 +190,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testToPriorityString() {
         assertTrue(Priority.toPriority("DEBUG") == Level.DEBUG);
@@ -192,6 +201,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testToPriorityInt() {
         assertTrue(Priority.toPriority(Priority.DEBUG_INT) == Level.DEBUG);
@@ -202,6 +212,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testToPriorityStringPriority() {
         assertTrue(Priority.toPriority("foo", Priority.DEBUG) == Priority.DEBUG);
@@ -212,6 +223,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testToPriorityIntPriority() {
         assertTrue(Priority.toPriority(17, Priority.DEBUG) == Priority.DEBUG);
@@ -222,6 +234,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testDotlessLowerI() {
         Priority level = Priority.toPriority("\u0131nfo");
@@ -234,6 +247,7 @@ public class PriorityTest {
      *
      * @deprecated
      */
+    @Deprecated
     @Test
     public void testDottedLowerI() {
         Locale defaultLocale = Locale.getDefault();



Mime
View raw message