This is an automated email from the ASF dual-hosted git repository. sjaranowski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 20a12abc [MDEP-923] Remove plexus logger from DependencySilentLog 20a12abc is described below commit 20a12abcb7c63714f95eebeb681227e46a7b1400 Author: Slawomir Jaranowski <s.jaranow...@gmail.com> AuthorDate: Tue Apr 23 23:44:55 2024 +0200 [MDEP-923] Remove plexus logger from DependencySilentLog --- .../dependency/utils/DependencySilentLog.java | 147 +-------------------- .../plugins/dependency/utils/TestSilentLog.java | 32 +---- 2 files changed, 4 insertions(+), 175 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/dependency/utils/DependencySilentLog.java b/src/main/java/org/apache/maven/plugins/dependency/utils/DependencySilentLog.java index 165a327d..7e2106a2 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/utils/DependencySilentLog.java +++ b/src/main/java/org/apache/maven/plugins/dependency/utils/DependencySilentLog.java @@ -19,14 +19,13 @@ package org.apache.maven.plugins.dependency.utils; import org.apache.maven.plugin.logging.Log; -import org.codehaus.plexus.logging.Logger; /** * This logger implements both types of logs currently in use and turns off logs. * * @author <a href="mailto:bri...@apache.org">Brian Fox</a> */ -public class DependencySilentLog implements Log, Logger { +public class DependencySilentLog implements Log { /** * @return <code>false</code> * @see org.apache.maven.plugin.logging.Log#isDebugEnabled() @@ -184,148 +183,4 @@ public class DependencySilentLog implements Log, Logger { public void error(Throwable error) { // nop } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String) - */ - @Override - public void debug(String message) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String, java.lang.Throwable) - */ - @Override - public void debug(String message, Throwable throwable) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#info(java.lang.String) - */ - @Override - public void info(String message) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#info(java.lang.String, java.lang.Throwable) - */ - @Override - public void info(String message, Throwable throwable) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String) - */ - @Override - public void warn(String message) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String, java.lang.Throwable) - */ - @Override - public void warn(String message, Throwable throwable) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#error(java.lang.String) - */ - @Override - public void error(String message) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#error(java.lang.String, java.lang.Throwable) - */ - @Override - public void error(String message, Throwable throwable) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String) - */ - @Override - public void fatalError(String message) { - // nop - } - - /** - * By default, do nothing. - * - * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String, java.lang.Throwable) - */ - @Override - public void fatalError(String message, Throwable throwable) { - // nop - } - - /** - * @return <code>false</code> - * @see org.codehaus.plexus.logging.Logger#isFatalErrorEnabled() - */ - @Override - public boolean isFatalErrorEnabled() { - return false; - } - - /** - * @return <code>null</code> - * @see org.codehaus.plexus.logging.Logger#getChildLogger(java.lang.String) - */ - @Override - public Logger getChildLogger(String name) { - return null; - } - - /** - * @return <code>0</code> - * @see org.codehaus.plexus.logging.Logger#getThreshold() - */ - @Override - public int getThreshold() { - return 0; - } - - /** - * By default, do nothing - */ - @Override - public void setThreshold(int threshold) { - // nop - } - - /** - * @return <code>null</code> - * @see org.codehaus.plexus.logging.Logger#getName() - */ - @Override - public String getName() { - return null; - } } diff --git a/src/test/java/org/apache/maven/plugins/dependency/utils/TestSilentLog.java b/src/test/java/org/apache/maven/plugins/dependency/utils/TestSilentLog.java index 231419ea..b6cd7e43 100644 --- a/src/test/java/org/apache/maven/plugins/dependency/utils/TestSilentLog.java +++ b/src/test/java/org/apache/maven/plugins/dependency/utils/TestSilentLog.java @@ -18,12 +18,12 @@ */ package org.apache.maven.plugins.dependency.utils; -import junit.framework.TestCase; import org.apache.maven.plugin.logging.Log; -import org.codehaus.plexus.logging.Logger; +import org.junit.Test; -public class TestSilentLog extends TestCase { +public class TestSilentLog { + @Test public void testLog() { Log log = new DependencySilentLog(); String text = "Text"; @@ -45,30 +45,4 @@ public class TestSilentLog extends TestCase { log.isWarnEnabled(); log.isInfoEnabled(); } - - public void testLogger() { - Logger log = new DependencySilentLog(); - String text = "Text"; - Throwable e = new RuntimeException(); - - log.debug(text); - log.debug(text, e); - log.error(text); - log.error(text, e); - log.warn(text); - log.warn(text, e); - log.info(text); - log.info(text, e); - - log.fatalError(text); - log.fatalError(text, e); - log.getChildLogger(text); - log.getName(); - log.getThreshold(); - log.isDebugEnabled(); - log.isErrorEnabled(); - log.isFatalErrorEnabled(); - log.isInfoEnabled(); - log.isWarnEnabled(); - } }