logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501200 - in /logging/log4j/log4j2/trunk: api/src/main/java/org/apache/logging/log4j/spi/ core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ core/src/main/java/org/apache/logging/log4j/core/async/ core/src/test/java/org/apa...
Date Tue, 09 Jul 2013 11:24:37 GMT
Author: ggregory
Date: Tue Jul  9 11:24:36 2013
New Revision: 1501200

URL: http://svn.apache.org/r1501200
Log:
Add missing '@Override' annotations.
Add missing '@Override' annotations to implementations of interface methods.
Add missing '@Deprecated' annotations.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
    logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/DefaultThreadContextStack.java
Tue Jul  9 11:24:36 2013
@@ -41,6 +41,7 @@ public class DefaultThreadContextStack i
         this.useStack = useStack;
     }
 
+    @Override
     public String pop() {
         if (!useStack) {
             return "";
@@ -56,6 +57,7 @@ public class DefaultThreadContextStack i
         return result;
     }
 
+    @Override
     public String peek() {
         final List<String> list = stack.get();
         if (list == null || list.size() == 0) {
@@ -65,6 +67,7 @@ public class DefaultThreadContextStack i
         return list.get(last);
     }
 
+    @Override
     public void push(final String message) {
         if (!useStack) {
             return;
@@ -72,11 +75,13 @@ public class DefaultThreadContextStack i
         add(message);
     }
 
+    @Override
     public int getDepth() {
         final List<String> list = stack.get();
         return list == null ? 0 : list.size();
     }
 
+    @Override
     public List<String> asList() {
         final List<String> list = stack.get();
         if (list == null) {
@@ -85,6 +90,7 @@ public class DefaultThreadContextStack i
         return list;
     }
 
+    @Override
     public void trim(final int depth) {
         if (depth < 0) {
             throw new IllegalArgumentException(
@@ -102,6 +108,7 @@ public class DefaultThreadContextStack i
         stack.set(copy);
     }
 
+    @Override
     public ThreadContextStack copy() {
         List<String> result = null;
         if (!useStack || (result = stack.get()) == null) {
@@ -110,25 +117,30 @@ public class DefaultThreadContextStack i
         return new MutableThreadContextStack(result);
     }
 
+    @Override
     public void clear() {
         stack.remove();
     }
 
+    @Override
     public int size() {
         final List<String> result = stack.get();
         return result == null ? 0 : result.size();
     }
 
+    @Override
     public boolean isEmpty() {
         final List<String> result = stack.get();
         return result == null || result.isEmpty();
     }
 
+    @Override
     public boolean contains(final Object o) {
         final List<String> result = stack.get();
         return result != null && result.contains(o);
     }
 
+    @Override
     public Iterator<String> iterator() {
         final List<String> immutable = stack.get();
         if (immutable == null) {
@@ -138,6 +150,7 @@ public class DefaultThreadContextStack i
         return immutable.iterator();
     }
 
+    @Override
     public Object[] toArray() {
         final List<String> result = stack.get();
         if (result == null) {
@@ -146,6 +159,7 @@ public class DefaultThreadContextStack i
         return result.toArray(new Object[result.size()]);
     }
 
+    @Override
     public <T> T[] toArray(final T[] ts) {
         final List<String> result = stack.get();
         if (result == null) {
@@ -157,6 +171,7 @@ public class DefaultThreadContextStack i
         return result.toArray(ts);
     }
 
+    @Override
     public boolean add(final String s) {
         if (!useStack) {
             return false;
@@ -169,6 +184,7 @@ public class DefaultThreadContextStack i
         return true;
     }
 
+    @Override
     public boolean remove(final Object o) {
         if (!useStack) {
             return false;
@@ -183,6 +199,7 @@ public class DefaultThreadContextStack i
         return result;
     }
 
+    @Override
     public boolean containsAll(final Collection<?> objects) {
         if (objects.isEmpty()) { // quick check before accessing the ThreadLocal
             return true; // looks counter-intuitive, but see
@@ -192,6 +209,7 @@ public class DefaultThreadContextStack i
         return list != null && list.containsAll(objects);
     }
 
+    @Override
     public boolean addAll(final Collection<? extends String> strings) {
         if (!useStack || strings.isEmpty()) {
             return false;
@@ -204,6 +222,7 @@ public class DefaultThreadContextStack i
         return true;
     }
 
+    @Override
     public boolean removeAll(final Collection<?> objects) {
         if (!useStack || objects.isEmpty()) {
             return false;
@@ -218,6 +237,7 @@ public class DefaultThreadContextStack i
         return result;
     }
 
+    @Override
     public boolean retainAll(final Collection<?> objects) {
         if (!useStack || objects.isEmpty()) {
             return false;

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/MutableThreadContextStack.java
Tue Jul  9 11:24:36 2013
@@ -41,6 +41,7 @@ public class MutableThreadContextStack i
         this.list = new ArrayList<String>(stack.list);
     }
 
+    @Override
     public String pop() {
         if (list.isEmpty()) {
             return null;
@@ -50,6 +51,7 @@ public class MutableThreadContextStack i
         return result;
     }
 
+    @Override
     public String peek() {
         if (list.isEmpty()) {
             return null;
@@ -58,18 +60,22 @@ public class MutableThreadContextStack i
         return list.get(last);
     }
 
+    @Override
     public void push(final String message) {
         list.add(message);
     }
 
+    @Override
     public int getDepth() {
         return list.size();
     }
 
+    @Override
     public List<String> asList() {
         return list;
     }
 
+    @Override
     public void trim(final int depth) {
         if (depth < 0) {
             throw new IllegalArgumentException("Maximum stack depth cannot be negative");
@@ -86,58 +92,72 @@ public class MutableThreadContextStack i
         list.addAll(copy);
     }
 
+    @Override
     public ThreadContextStack copy() {
         return new MutableThreadContextStack(this);
     }
 
+    @Override
     public void clear() {
         list.clear();
     }
 
+    @Override
     public int size() {
         return list.size();
     }
 
+    @Override
     public boolean isEmpty() {
         return list.isEmpty();
     }
 
+    @Override
     public boolean contains(final Object o) {
         return list.contains(o);
     }
 
+    @Override
     public Iterator<String> iterator() {
         return list.iterator();
     }
 
+    @Override
     public Object[] toArray() {
         return list.toArray();
     }
 
+    @Override
     public <T> T[] toArray(final T[] ts) {
         return list.toArray(ts);
     }
 
+    @Override
     public boolean add(final String s) {
         return list.add(s);
     }
 
+    @Override
     public boolean remove(final Object o) {
         return list.remove(o);
     }
 
+    @Override
     public boolean containsAll(final Collection<?> objects) {
         return list.containsAll(objects);
     }
 
+    @Override
     public boolean addAll(final Collection<? extends String> strings) {
         return list.addAll(strings);
     }
 
+    @Override
     public boolean removeAll(final Collection<?> objects) {
         return list.removeAll(objects);
     }
 
+    @Override
     public boolean retainAll(final Collection<?> objects) {
         return list.retainAll(objects);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
Tue Jul  9 11:24:36 2013
@@ -120,6 +120,7 @@ public final class FactoryMethodConnecti
                 }
 
                 // method must be present to compile on Java 7, @Override must be absent
to compile on Java 6
+                @Override
                 @SuppressWarnings("unused")
                 public java.util.logging.Logger getParentLogger() {
                     throw new UnsupportedOperationException();

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/async/DaemonThreadFactory.java
Tue Jul  9 11:24:36 2013
@@ -35,6 +35,7 @@ public class DaemonThreadFactory impleme
                 : Thread.currentThread().getThreadGroup();
     }
 
+    @Override
     public Thread newThread(final Runnable runnable) {
         final Thread thread = new Thread(group, runnable, threadNamePrefix
                 + threadNumber.getAndIncrement(), 0);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/LogEventFactoryTest.java
Tue Jul  9 11:24:36 2013
@@ -93,6 +93,7 @@ public class LogEventFactoryTest {
 
     public static class TestLogEventFactory implements LogEventFactory {
 
+        @Override
         public LogEvent createEvent(final String loggerName, final Marker marker,
                                     final String fqcn, final Level level, final Message data,
                                     final List<Property> properties, final Throwable
t) {

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Tue Jul  9 11:24:36 2013
@@ -612,7 +612,8 @@ public class FlumePersistentManager exte
             namePrefix = "DaemonPool-" + POOL_NUMBER.getAndIncrement() + "-thread-";
         }
 
-        public Thread newThread(final Runnable r) {
+        @Override
+		public Thread newThread(final Runnable r) {
             final Thread thread = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(),
0);
             thread.setDaemon(true);
             if (thread.getPriority() != Thread.NORM_PRIORITY) {

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
(original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LogEventFactory.java
Tue Jul  9 11:24:36 2013
@@ -51,7 +51,8 @@ public class LogEventFactory {
             this.intrface = intrface;
         }
 
-        public Object invoke(final Object o, final Method method, final Object[] objects)
+        @Override
+		public Object invoke(final Object o, final Method method, final Object[] objects)
             throws Throwable {
             if (method.getName().equals("logEvent")) {
 

Modified: logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java?rev=1501200&r1=1501199&r2=1501200&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
(original)
+++ logging/log4j/log4j2/trunk/samples/flume-common/src/main/java/org/apache/logging/log4j/samples/app/LoggingApp.java
Tue Jul  9 11:24:36 2013
@@ -94,7 +94,8 @@ public class LoggingApp {
             this.member = member;
         }
 
-        public void run() {
+        @Override
+		public void run() {
             System.out.println("STARTING..................");
 
             while (!shutdown) {



Mime
View raw message