The following issues were found
android/guava-testlib/src/com/google/common/collect/testing/features/ConflictingRequirementsException.java
4 issues
Line: 29
*/
@GwtCompatible
public class ConflictingRequirementsException extends Exception {
private Set<Feature<?>> conflicts;
private Object source;
public ConflictingRequirementsException(
String message, Set<Feature<?>> conflicts, Object source) {
super(message);
Reported by PMD.
Line: 29
*/
@GwtCompatible
public class ConflictingRequirementsException extends Exception {
private Set<Feature<?>> conflicts;
private Object source;
public ConflictingRequirementsException(
String message, Set<Feature<?>> conflicts, Object source) {
super(message);
Reported by PMD.
Line: 30
@GwtCompatible
public class ConflictingRequirementsException extends Exception {
private Set<Feature<?>> conflicts;
private Object source;
public ConflictingRequirementsException(
String message, Set<Feature<?>> conflicts, Object source) {
super(message);
this.conflicts = conflicts;
Reported by PMD.
Line: 30
@GwtCompatible
public class ConflictingRequirementsException extends Exception {
private Set<Feature<?>> conflicts;
private Object source;
public ConflictingRequirementsException(
String message, Set<Feature<?>> conflicts, Object source) {
super(message);
this.conflicts = conflicts;
Reported by PMD.
android/guava-tests/test/com/google/common/graph/StandardImmutableUndirectedGraphTest.java
4 issues
Line: 36
return Arrays.asList(new Object[][] {{false}, {true}});
}
private final boolean allowsSelfLoops;
private ImmutableGraph.Builder<Integer> graphBuilder;
public StandardImmutableUndirectedGraphTest(boolean allowsSelfLoops) {
this.allowsSelfLoops = allowsSelfLoops;
}
Reported by PMD.
Line: 37
}
private final boolean allowsSelfLoops;
private ImmutableGraph.Builder<Integer> graphBuilder;
public StandardImmutableUndirectedGraphTest(boolean allowsSelfLoops) {
this.allowsSelfLoops = allowsSelfLoops;
}
Reported by PMD.
Line: 45
@Override
public Graph<Integer> createGraph() {
graphBuilder = GraphBuilder.undirected().allowsSelfLoops(allowsSelfLoops).immutable();
return graphBuilder.build();
}
@Override
final void addNode(Integer n) {
Reported by PMD.
Line: 45
@Override
public Graph<Integer> createGraph() {
graphBuilder = GraphBuilder.undirected().allowsSelfLoops(allowsSelfLoops).immutable();
return graphBuilder.build();
}
@Override
final void addNode(Integer n) {
Reported by PMD.
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
4 issues
Line: 41
private static final BigInteger[] positive = new BigInteger[ARRAY_SIZE];
@Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"})
RoundingMode mode;
@BeforeExperiment
void setUp() {
for (int i = 0; i < ARRAY_SIZE; i++) {
positive[i] = randomPositiveBigInteger(1024);
Reported by PMD.
Line: 43
@Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"})
RoundingMode mode;
@BeforeExperiment
void setUp() {
for (int i = 0; i < ARRAY_SIZE; i++) {
positive[i] = randomPositiveBigInteger(1024);
nonzero1[i] = randomNonZeroBigInteger(1024);
nonzero2[i] = randomNonZeroBigInteger(1024);
Reported by PMD.
Line: 77
int tmp = 0;
for (int i = 0; i < reps; i++) {
int j = i & ARRAY_MASK;
tmp += BigIntegerMath.sqrt(positive[j], mode).intValue();
}
return tmp;
}
@Benchmark
Reported by PMD.
Line: 87
int tmp = 0;
for (int i = 0; i < reps; i++) {
int j = i & ARRAY_MASK;
tmp += BigIntegerMath.divide(nonzero1[j], nonzero2[j], mode).intValue();
}
return tmp;
}
@Benchmark
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ForwardingTableTest.java
4 issues
Line: 31
*/
public class ForwardingTableTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
Table.class,
new Function<Table, Table>() {
Reported by PMD.
Line: 32
public class ForwardingTableTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
Table.class,
new Function<Table, Table>() {
@Override
Reported by PMD.
Line: 44
});
}
public void testEquals() {
Table<Integer, Integer, String> table1 = ImmutableTable.of(1, 1, "one");
Table<Integer, Integer, String> table2 = ImmutableTable.of(2, 2, "two");
new EqualsTester()
.addEqualityGroup(table1, wrap(table1), wrap(table1))
.addEqualityGroup(table2, wrap(table2))
Reported by PMD.
Line: 44
});
}
public void testEquals() {
Table<Integer, Integer, String> table1 = ImmutableTable.of(1, 1, "one");
Table<Integer, Integer, String> table2 = ImmutableTable.of(2, 2, "two");
new EqualsTester()
.addEqualityGroup(table1, wrap(table1), wrap(table1))
.addEqualityGroup(table2, wrap(table2))
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ForwardingListMultimapTest.java
4 issues
Line: 31
*/
public class ForwardingListMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
ListMultimap.class,
new Function<ListMultimap, ListMultimap>() {
Reported by PMD.
Line: 32
public class ForwardingListMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
ListMultimap.class,
new Function<ListMultimap, ListMultimap>() {
@Override
Reported by PMD.
Line: 44
});
}
public void testEquals() {
ListMultimap<Integer, String> map1 = ImmutableListMultimap.of(1, "one");
ListMultimap<Integer, String> map2 = ImmutableListMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
Line: 44
});
}
public void testEquals() {
ListMultimap<Integer, String> map1 = ImmutableListMultimap.of(1, "one");
ListMultimap<Integer, String> map2 = ImmutableListMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
android/guava-tests/benchmark/com/google/common/cache/MapMakerComparisonBenchmark.java
4 issues
Line: 34
private static final String TEST_VALUE = "test value";
// Non-loading versions:
private final Map<Object, Object> map = new MapMaker().makeMap(); // Returns ConcurrentHashMap
private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build();
private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build();
@BeforeExperiment
void setUp() {
Reported by PMD.
Line: 35
// Non-loading versions:
private final Map<Object, Object> map = new MapMaker().makeMap(); // Returns ConcurrentHashMap
private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build();
private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build();
@BeforeExperiment
void setUp() {
map.put(TEST_KEY, TEST_VALUE);
Reported by PMD.
Line: 36
// Non-loading versions:
private final Map<Object, Object> map = new MapMaker().makeMap(); // Returns ConcurrentHashMap
private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build();
private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build();
@BeforeExperiment
void setUp() {
map.put(TEST_KEY, TEST_VALUE);
cache.put(TEST_KEY, TEST_VALUE);
Reported by PMD.
Line: 38
private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build();
private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build();
@BeforeExperiment
void setUp() {
map.put(TEST_KEY, TEST_VALUE);
cache.put(TEST_KEY, TEST_VALUE);
cacheNoStats.put(TEST_KEY, TEST_VALUE);
}
Reported by PMD.
android/guava-tests/test/com/google/common/graph/StandardImmutableDirectedGraphTest.java
4 issues
Line: 35
return Arrays.asList(new Object[][] {{false}, {true}});
}
private final boolean allowsSelfLoops;
private ImmutableGraph.Builder<Integer> graphBuilder;
public StandardImmutableDirectedGraphTest(boolean allowsSelfLoops) {
this.allowsSelfLoops = allowsSelfLoops;
}
Reported by PMD.
Line: 36
}
private final boolean allowsSelfLoops;
private ImmutableGraph.Builder<Integer> graphBuilder;
public StandardImmutableDirectedGraphTest(boolean allowsSelfLoops) {
this.allowsSelfLoops = allowsSelfLoops;
}
Reported by PMD.
Line: 44
@Override
public Graph<Integer> createGraph() {
graphBuilder = GraphBuilder.directed().allowsSelfLoops(allowsSelfLoops).immutable();
return graphBuilder.build();
}
@Override
final void addNode(Integer n) {
Reported by PMD.
Line: 44
@Override
public Graph<Integer> createGraph() {
graphBuilder = GraphBuilder.directed().allowsSelfLoops(allowsSelfLoops).immutable();
return graphBuilder.build();
}
@Override
final void addNode(Integer n) {
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ForwardingSetMultimapTest.java
4 issues
Line: 31
*/
public class ForwardingSetMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
SetMultimap.class,
new Function<SetMultimap, SetMultimap>() {
Reported by PMD.
Line: 32
public class ForwardingSetMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
SetMultimap.class,
new Function<SetMultimap, SetMultimap>() {
@Override
Reported by PMD.
Line: 44
});
}
public void testEquals() {
SetMultimap<Integer, String> map1 = ImmutableSetMultimap.of(1, "one");
SetMultimap<Integer, String> map2 = ImmutableSetMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
Line: 44
});
}
public void testEquals() {
SetMultimap<Integer, String> map1 = ImmutableSetMultimap.of(1, "one");
SetMultimap<Integer, String> map2 = ImmutableSetMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ForwardingSortedSetMultimapTest.java
4 issues
Line: 31
*/
public class ForwardingSortedSetMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
SortedSetMultimap.class,
new Function<SortedSetMultimap, SortedSetMultimap>() {
Reported by PMD.
Line: 32
public class ForwardingSortedSetMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
SortedSetMultimap.class,
new Function<SortedSetMultimap, SortedSetMultimap>() {
@Override
Reported by PMD.
Line: 44
});
}
public void testEquals() {
SortedSetMultimap<Integer, String> map1 = TreeMultimap.create(ImmutableMultimap.of(1, "one"));
SortedSetMultimap<Integer, String> map2 = TreeMultimap.create(ImmutableMultimap.of(2, "two"));
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
Line: 44
});
}
public void testEquals() {
SortedSetMultimap<Integer, String> map1 = TreeMultimap.create(ImmutableMultimap.of(1, "one"));
SortedSetMultimap<Integer, String> map2 = TreeMultimap.create(ImmutableMultimap.of(2, "two"));
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ForwardingMultimapTest.java
4 issues
Line: 31
*/
public class ForwardingMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
Multimap.class,
new Function<Multimap, Multimap>() {
Reported by PMD.
Line: 32
public class ForwardingMultimapTest extends TestCase {
@SuppressWarnings("rawtypes")
public void testForwarding() {
new ForwardingWrapperTester()
.testForwarding(
Multimap.class,
new Function<Multimap, Multimap>() {
@Override
Reported by PMD.
Line: 44
});
}
public void testEquals() {
Multimap<Integer, String> map1 = ImmutableMultimap.of(1, "one");
Multimap<Integer, String> map2 = ImmutableMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.
Line: 44
});
}
public void testEquals() {
Multimap<Integer, String> map1 = ImmutableMultimap.of(1, "one");
Multimap<Integer, String> map2 = ImmutableMultimap.of(2, "two");
new EqualsTester()
.addEqualityGroup(map1, wrap(map1), wrap(map1))
.addEqualityGroup(map2, wrap(map2))
Reported by PMD.