1
0

Bump Java from 6 to 8.

This commit is contained in:
Gary Gregory
2022-05-24 17:02:14 -04:00
parent 0b2794136a
commit 0dc8dfac82
2 changed files with 6 additions and 9 deletions

View File

@@ -17,6 +17,8 @@
package org.apache.commons.logging.impl;
import java.util.Objects;
import org.apache.avalon.framework.logger.Logger;
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
*/
public AvalonLogger(final String name) {
if (defaultLogger == null) {
throw new NullPointerException("default logger has to be specified if this constructor is used!");
}
Objects.requireNonNull(defaultLogger, "default logger has to be specified if this constructor is used!");
this.logger = defaultLogger.getChildLogger(name);
}

View File

@@ -26,6 +26,7 @@ import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/**
@@ -228,12 +229,8 @@ public final class WeakHashtable extends Hashtable {
@Override
public synchronized Object put(final Object key, final Object value) {
// check for nulls, ensuring semantics match superclass
if (key == null) {
throw new NullPointerException("Null keys are not allowed");
}
if (value == null) {
throw new NullPointerException("Null values are not allowed");
}
Objects.requireNonNull(key, "key");
Objects.requireNonNull(value, "value");
// for performance reasons, only purge every
// MAX_CHANGES_BEFORE_PURGE times