The following issues were found
android/guava-testlib/src/com/google/common/collect/testing/testers/MapSerializationTester.java
1 issues
Line: 37
@GwtCompatible
@Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
public class MapSerializationTester<K, V> extends AbstractMapTester<K, V> {
@CollectionFeature.Require(SERIALIZABLE)
public void testReserializeMap() {
Map<K, V> deserialized = SerializableTester.reserialize(getMap());
new EqualsTester().addEqualityGroup(getMap(), deserialized).testEquals();
}
}
Reported by PMD.
android/guava-tests/test/com/google/common/io/TestReader.java
1 issues
Line: 30
/** @author Colin Decker */
public class TestReader extends FilterReader {
private final TestInputStream in;
public TestReader(TestOption... options) throws IOException {
this(new TestInputStream(new ByteArrayInputStream(new byte[10]), options));
}
Reported by PMD.
android/guava-tests/test/com/google/common/io/TestWriter.java
1 issues
Line: 29
/** @author Colin Decker */
public class TestWriter extends FilterWriter {
private final TestOutputStream out;
public TestWriter(TestOption... options) throws IOException {
this(new TestOutputStream(ByteStreams.nullOutputStream(), options));
}
Reported by PMD.
android/guava-testlib/src/com/google/common/collect/testing/ConcurrentMapTestSuiteBuilder.java
1 issues
Line: 49
@Override
protected List<Class<? extends AbstractTester>> getTesters() {
List<Class<? extends AbstractTester>> testers = Helpers.copyToList(super.getTesters());
testers.addAll(TESTERS);
return testers;
}
}
Reported by PMD.
android/guava-testlib/src/com/google/common/collect/testing/BaseComparable.java
1 issues
Line: 29
*/
@GwtCompatible
public class BaseComparable implements Comparable<BaseComparable>, Serializable {
private final String s;
public BaseComparable(String s) {
this.s = s;
}
Reported by PMD.
android/guava-testlib/src/com/google/common/testing/SerializableTester.java
1 issues
Line: 90
public static <T> T reserializeAndAssert(T object) {
T copy = reserialize(object);
new EqualsTester().addEqualityGroup(object, copy).testEquals();
Assert.assertEquals(object.getClass(), copy.getClass());
return copy;
}
}
Reported by PMD.
android/guava-testlib/src/com/google/common/testing/Platform.java
1 issues
Line: 46
ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
return (T) in.readObject();
} catch (IOException | ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
private Platform() {}
}
Reported by PMD.
android/guava-testlib/src/com/google/common/collect/testing/Platform.java
1 issues
Line: 31
*/
@GwtCompatible
final class Platform {
static <T> T[] clone(T[] array) {
return array.clone();
}
// Class.cast is not supported in GWT. This method is a no-op in GWT.
static void checkCast(Class<?> clazz, Object obj) {
Reported by PMD.
guava-tests/test/com/google/common/util/concurrent/TestPlatform.java
1 issues
Line: 60
}
static void verifyThreadWasNotInterrupted() {
assertFalse(Thread.currentThread().isInterrupted());
}
static void clearInterrupt() {
Thread.interrupted();
}
Reported by PMD.
guava/src/com/google/common/collect/ImmutableBiMapFauxverideShim.java
1 issues
Line: 35
*/
@GwtIncompatible
@ElementTypesAreNonnullByDefault
abstract class ImmutableBiMapFauxverideShim<K, V> extends ImmutableMap<K, V> {
/**
* Not supported. Use {@link ImmutableBiMap#toImmutableBiMap} instead. This method exists only to
* hide {@link ImmutableMap#toImmutableMap(Function, Function)} from consumers of {@code
* ImmutableBiMap}.
*
Reported by PMD.