Bump Java from 6 to 8.
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
package org.apache.commons.logging.impl;
|
package org.apache.commons.logging.impl;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.apache.avalon.framework.logger.Logger;
|
import org.apache.avalon.framework.logger.Logger;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
@@ -73,9 +75,7 @@ public class AvalonLogger implements Log {
|
|||||||
* @param name the name of the avalon logger implementation to delegate to
|
* @param name the name of the avalon logger implementation to delegate to
|
||||||
*/
|
*/
|
||||||
public AvalonLogger(final String name) {
|
public AvalonLogger(final String name) {
|
||||||
if (defaultLogger == null) {
|
Objects.requireNonNull(defaultLogger, "default logger has to be specified if this constructor is used!");
|
||||||
throw new NullPointerException("default logger has to be specified if this constructor is used!");
|
|
||||||
}
|
|
||||||
this.logger = defaultLogger.getChildLogger(name);
|
this.logger = defaultLogger.getChildLogger(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -228,12 +229,8 @@ public final class WeakHashtable extends Hashtable {
|
|||||||
@Override
|
@Override
|
||||||
public synchronized Object put(final Object key, final Object value) {
|
public synchronized Object put(final Object key, final Object value) {
|
||||||
// check for nulls, ensuring semantics match superclass
|
// check for nulls, ensuring semantics match superclass
|
||||||
if (key == null) {
|
Objects.requireNonNull(key, "key");
|
||||||
throw new NullPointerException("Null keys are not allowed");
|
Objects.requireNonNull(value, "value");
|
||||||
}
|
|
||||||
if (value == null) {
|
|
||||||
throw new NullPointerException("Null values are not allowed");
|
|
||||||
}
|
|
||||||
|
|
||||||
// for performance reasons, only purge every
|
// for performance reasons, only purge every
|
||||||
// MAX_CHANGES_BEFORE_PURGE times
|
// MAX_CHANGES_BEFORE_PURGE times
|
||||||
|
|||||||
Reference in New Issue
Block a user