RecordingLogger
.
*/
@@ -78,171 +75,166 @@ public RecordingLogger(String name) {
this.name = name;
}
- /** {@inheritDoc} */
@Override
- public Logger getLogger(@SuppressWarnings("hiding") String name) {
- return new RecordingLogger(name);
+ public boolean isTraceEnabled() {
+ // Ignore (not relevant to test failures)
+ return false;
}
- /** {@inheritDoc} */
@Override
- public String getName() {
- return name;
+ public void trace(String msg) {
+ // Ignore (not relevant to test failures)
}
- /**
- * Warning
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void warn(String msg, Object arg0, Object arg1) {
- synchronized (warnings) {
- warnings.add(new Warning(MessageFormat.format(msg, arg0, arg1)));
- }
- }
-
- /** {@inheritDoc} */
@Override
- public void warn(String msg, Throwable th) {
- synchronized (warnings) {
- warnings.add(new Warning(msg, th));
- }
+ public void trace(String format, Object arg) {
+ // Ignore (not relevant to test failures)
}
- /**
- * Warning
- *
- * @param msg
- * warning message
- */
+ @Override
+ public void trace(String format, Object arg1, Object arg2) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void trace(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void trace(String msg, Throwable t) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public boolean isDebugEnabled() {
+ return false;
+ }
+
+ @Override
+ public void debug(String msg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void debug(String format, Object arg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void debug(String format, Object arg1, Object arg2) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void debug(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void debug(String msg, Throwable t) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public boolean isInfoEnabled() {
+ return false;
+ }
+
+ @Override
+ public void info(String msg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object arg) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object arg1, Object arg2) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String format, Object... arguments) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public void info(String msg, Throwable t) {
+ // Ignore (not relevant to test failures)
+ }
+
+ @Override
+ public boolean isWarnEnabled() {
+ return true;
+ }
+
+ @Override
public void warn(String msg) {
synchronized (warnings) {
warnings.add(new Warning(msg));
}
}
- /**
- * Debug log
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void debug(String msg, Object arg0, Object arg1) {
- // Ignore (not relevant to test failures)
- }
-
- /** {@inheritDoc} */
@Override
- public void debug(String msg, Throwable th) {
- // Ignore (not relevant to test failures)
+ public void warn(String format, Object arg) {
+ warn(format, Collections.singleton(arg));
}
- /**
- * Debug log
- *
- * @param msg
- * debug message
- */
- public void debug(String msg) {
- // Ignore (not relevant to test failures)
- }
-
- /**
- * Info
- *
- * @param msg
- * @param arg0
- * @param arg1
- */
- public void info(String msg, Object arg0, Object arg1) {
- // Ignore (not relevant to test failures)
- }
-
- /**
- * Info
- *
- * @param msg
- */
- public void info(String msg) {
- // Ignore (not relevant to test failures)
- }
-
- /** {@inheritDoc} */
@Override
- public boolean isDebugEnabled() {
+ public void warn(String format, Object... arguments) {
+ synchronized (warnings) {
+ int i = 0;
+ int index = format.indexOf("{}");
+ while (index >= 0) {
+ format = format.replaceFirst("\\{\\}", "{" + i++ + "}");
+ index = format.indexOf("{}");
+ }
+ warnings.add(new Warning(MessageFormat.format(format, arguments)));
+ }
+ }
+
+ @Override
+ public void warn(String format, Object arg1, Object arg2) {
+ warn(format, new Object[] { arg1, arg2 });
+ }
+
+ @Override
+ public void warn(String msg, Throwable t) {
+ synchronized (warnings) {
+ warnings.add(new Warning(msg, t));
+ }
+ }
+
+ @Override
+ public boolean isErrorEnabled() {
return false;
}
- /** {@inheritDoc} */
@Override
- public void setDebugEnabled(boolean enabled) {
+ public void error(String msg) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void warn(String msg, Object... args) {
- synchronized (warnings) {
- int i = 0;
- int index = msg.indexOf("{}");
- while (index >= 0) {
- msg = msg.replaceFirst("\\{\\}", "{" + i++ + "}");
- index = msg.indexOf("{}");
- }
- warnings.add(new Warning(MessageFormat.format(msg, args)));
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public void warn(Throwable thrown) {
- synchronized (warnings) {
- warnings.add(new Warning(thrown));
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public void info(String msg, Object... args) {
+ public void error(String format, Object arg) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void info(Throwable thrown) {
+ public void error(String format, Object arg1, Object arg2) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void info(String msg, Throwable thrown) {
+ public void error(String format, Object... arguments) {
// Ignore (not relevant to test failures)
}
- /** {@inheritDoc} */
@Override
- public void debug(String msg, Object... args) {
- // Ignore (not relevant to test failures)
- }
-
- /** {@inheritDoc} */
- @Override
- public void debug(Throwable thrown) {
- // Ignore (not relevant to test failures)
- }
-
- /** {@inheritDoc} */
- @Override
- public void ignore(Throwable arg0) {
- // Ignore (not relevant to test failures)
- }
-
- /** {@inheritDoc} */
- @Override
- public void debug(String msg, long value) {
+ public void error(String msg, Throwable t) {
// Ignore (not relevant to test failures)
}
}
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
index 06fddc29d..7c6cf4290 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
@@ -55,21 +55,21 @@ public void testWithoutParentsFlag() throws Exception {
assertEquals(expect, result);
}
- private List
* When a repository borrows objects from another repository, it can
* advertise that it safely has that other repository's references, without
- * exposing any other details about the other repository. This may help
- * a client trying to push changes avoid pushing more than it needs to.
+ * exposing any other details about the other repository. This may help a
+ * client trying to push changes avoid pushing more than it needs to.
*
* @return unmodifiable collection of other known objects.
+ * @throws IOException
*/
@NonNull
- public Set