Remove obsolete pre-Java 1.2 code
This commit is contained in:
parent
f84e48c4d5
commit
1dc530e6fa
|
@ -503,17 +503,6 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
|
||||||
// the value equal to the value returned from the values iterator.
|
// the value equal to the value returned from the values iterator.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* JDK1.2 has bugs in null handling of Maps, especially HashMap.Entry.toString
|
|
||||||
* This avoids nulls for JDK1.2
|
|
||||||
*/
|
|
||||||
private static final boolean JDK12;
|
|
||||||
|
|
||||||
static {
|
|
||||||
final String str = System.getProperty("java.version");
|
|
||||||
JDK12 = str.startsWith("1.2");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Map Entry that is independent of the first and the map.
|
* Creates a new Map Entry that is independent of the first and the map.
|
||||||
*/
|
*/
|
||||||
|
@ -679,7 +668,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public V[] getNewSampleValues() {
|
public V[] getNewSampleValues() {
|
||||||
final Object[] result = {
|
final Object[] result = {
|
||||||
isAllowNullValue() && !JDK12 && isAllowDuplicateValues() ? null : "newnonnullvalue",
|
isAllowNullValue() && isAllowDuplicateValues() ? null : "newnonnullvalue",
|
||||||
"newvalue",
|
"newvalue",
|
||||||
isAllowDuplicateValues() ? "newvalue" : "newvalue2",
|
isAllowDuplicateValues() ? "newvalue" : "newvalue2",
|
||||||
"newblahv", "newfoov", "newbarv", "newbazv", "newtmpv", "newgoshv",
|
"newblahv", "newfoov", "newbarv", "newbazv", "newtmpv", "newgoshv",
|
||||||
|
@ -728,7 +717,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
|
||||||
"hello", "goodbye", "we'll", "see", "you", "all", "again",
|
"hello", "goodbye", "we'll", "see", "you", "all", "again",
|
||||||
"key",
|
"key",
|
||||||
"key2",
|
"key2",
|
||||||
isAllowNullKey() && !JDK12 ? null : "nonnullkey"
|
isAllowNullKey() ? null : "nonnullkey"
|
||||||
};
|
};
|
||||||
return (K[]) result;
|
return (K[]) result;
|
||||||
}
|
}
|
||||||
|
@ -747,7 +736,7 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
|
||||||
final Object[] result = {
|
final Object[] result = {
|
||||||
"blahv", "foov", "barv", "bazv", "tmpv", "goshv", "gollyv", "geev",
|
"blahv", "foov", "barv", "bazv", "tmpv", "goshv", "gollyv", "geev",
|
||||||
"hellov", "goodbyev", "we'llv", "seev", "youv", "allv", "againv",
|
"hellov", "goodbyev", "we'llv", "seev", "youv", "allv", "againv",
|
||||||
isAllowNullValue() && !JDK12 ? null : "nonnullvalue",
|
isAllowNullValue() ? null : "nonnullvalue",
|
||||||
"value",
|
"value",
|
||||||
isAllowDuplicateValues() ? "value" : "value2",
|
isAllowDuplicateValues() ? "value" : "value2",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue