The following issues were found
android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java
390 issues
Line: 48
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableListMultimapTest extends TestCase {
public static class ImmutableListMultimapGenerator extends TestStringListMultimapGenerator {
@Override
protected ListMultimap<String, String> create(Entry<String, String>[] entries) {
ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
for (Entry<String, String> entry : entries) {
Reported by PMD.
Line: 48
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableListMultimapTest extends TestCase {
public static class ImmutableListMultimapGenerator extends TestStringListMultimapGenerator {
@Override
protected ListMultimap<String, String> create(Entry<String, String>[] entries) {
ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
for (Entry<String, String> entry : entries) {
Reported by PMD.
Line: 68
}
}
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(
ListMultimapTestSuiteBuilder.using(new ImmutableListMultimapGenerator())
.named("ImmutableListMultimap")
Reported by PMD.
Line: 85
return suite;
}
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
Reported by PMD.
Line: 87
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
Reported by PMD.
Line: 88
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
try {
Reported by PMD.
Line: 91
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
Reported by PMD.
Line: 95
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
Reported by PMD.
Line: 95
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
Reported by PMD.
Line: 96
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
} catch (NullPointerException expected) {
Reported by PMD.
android/guava-tests/test/com/google/common/graph/GraphsTest.java
386 issues
Line: 38
* the missing nodes to the graph, then adds the edge between them.
*/
@RunWith(JUnit4.class)
public class GraphsTest {
private static final Integer N1 = 1;
private static final Integer N2 = 2;
private static final Integer N3 = 3;
private static final Integer N4 = 4;
private static final String E11 = "1-1";
Reported by PMD.
Line: 47
private static final String E11_A = "1-1a";
private static final String E12 = "1-2";
private static final String E12_A = "1-2a";
private static final String E12_B = "1-2b";
private static final String E21 = "2-1";
private static final String E13 = "1-3";
private static final String E31 = "3-1";
private static final String E34 = "3-4";
private static final String E44 = "4-4";
Reported by PMD.
Line: 66
static final String ERROR_SELF_LOOP = "self-loops are not allowed";
@Test
public void transitiveClosure_directedGraph() {
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
Reported by PMD.
Line: 67
@Test
public void transitiveClosure_directedGraph() {
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
Reported by PMD.
Line: 67
@Test
public void transitiveClosure_directedGraph() {
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
Reported by PMD.
Line: 68
@Test
public void transitiveClosure_directedGraph() {
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
MutableGraph<Integer> expectedClosure = GraphBuilder.directed().allowsSelfLoops(true).build();
Reported by PMD.
Line: 69
public void transitiveClosure_directedGraph() {
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
MutableGraph<Integer> expectedClosure = GraphBuilder.directed().allowsSelfLoops(true).build();
expectedClosure.putEdge(N1, N1);
Reported by PMD.
Line: 70
MutableGraph<Integer> directedGraph = GraphBuilder.directed().allowsSelfLoops(false).build();
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
MutableGraph<Integer> expectedClosure = GraphBuilder.directed().allowsSelfLoops(true).build();
expectedClosure.putEdge(N1, N1);
expectedClosure.putEdge(N1, N2);
Reported by PMD.
Line: 71
directedGraph.putEdge(N1, N2);
directedGraph.putEdge(N1, N3);
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
MutableGraph<Integer> expectedClosure = GraphBuilder.directed().allowsSelfLoops(true).build();
expectedClosure.putEdge(N1, N1);
expectedClosure.putEdge(N1, N2);
expectedClosure.putEdge(N1, N3);
Reported by PMD.
Line: 73
directedGraph.putEdge(N2, N3);
directedGraph.addNode(N4);
MutableGraph<Integer> expectedClosure = GraphBuilder.directed().allowsSelfLoops(true).build();
expectedClosure.putEdge(N1, N1);
expectedClosure.putEdge(N1, N2);
expectedClosure.putEdge(N1, N3);
expectedClosure.putEdge(N2, N2);
expectedClosure.putEdge(N2, N3);
Reported by PMD.
guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java
385 issues
Line: 53
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableListMultimapTest extends TestCase {
public static class ImmutableListMultimapGenerator extends TestStringListMultimapGenerator {
@Override
protected ListMultimap<String, String> create(Entry<String, String>[] entries) {
ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
for (Entry<String, String> entry : entries) {
Reported by PMD.
Line: 53
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableListMultimapTest extends TestCase {
public static class ImmutableListMultimapGenerator extends TestStringListMultimapGenerator {
@Override
protected ListMultimap<String, String> create(Entry<String, String>[] entries) {
ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
for (Entry<String, String> entry : entries) {
Reported by PMD.
Line: 73
}
}
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(
ListMultimapTestSuiteBuilder.using(new ImmutableListMultimapGenerator())
.named("ImmutableListMultimap")
Reported by PMD.
Line: 90
return suite;
}
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
Reported by PMD.
Line: 92
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
Reported by PMD.
Line: 93
public void testBuilder_withImmutableEntry() {
ImmutableListMultimap<String, Integer> multimap =
new Builder<String, Integer>().put(Maps.immutableEntry("one", 1)).build();
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
try {
Reported by PMD.
Line: 96
assertEquals(Arrays.asList(1), multimap.get("one"));
}
public void testBuilder_withImmutableEntryAndNullContents() {
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
Reported by PMD.
Line: 100
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
Reported by PMD.
Line: 100
Builder<String, Integer> builder = new Builder<>();
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
Reported by PMD.
Line: 101
try {
builder.put(Maps.immutableEntry("one", (Integer) null));
fail();
} catch (NullPointerException expected) {
}
try {
builder.put(Maps.immutableEntry((String) null, 1));
fail();
} catch (NullPointerException expected) {
Reported by PMD.
guava-tests/test/com/google/common/collect/SetsTest.java
384 issues
Line: 571
public void testNewIdentityHashSet() {
Set<Integer> set = Sets.newIdentityHashSet();
Integer value1 = new Integer(12357);
Integer value2 = new Integer(12357);
assertTrue(set.add(value1));
assertFalse(set.contains(value2));
assertTrue(set.contains(value1));
assertTrue(set.add(value2));
Reported by PMD.
Line: 572
public void testNewIdentityHashSet() {
Set<Integer> set = Sets.newIdentityHashSet();
Integer value1 = new Integer(12357);
Integer value2 = new Integer(12357);
assertTrue(set.add(value1));
assertFalse(set.contains(value2));
assertTrue(set.contains(value1));
assertTrue(set.add(value2));
assertEquals(2, set.size());
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.unmodifiableIterable;
import static com.google.common.collect.Sets.newEnumSet;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.Sets.newLinkedHashSet;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.unmodifiableIterable;
import static com.google.common.collect.Sets.newEnumSet;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.Sets.newLinkedHashSet;
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 89
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
381 issues
Line: 17
* limitations under the License.
*/
package com.google.common.math;
import static com.google.common.math.StatsTesting.ALLOWED_ERROR;
import static com.google.common.math.StatsTesting.ALL_MANY_VALUES;
import static com.google.common.math.StatsTesting.INTEGER_MANY_VALUES;
import static com.google.common.math.StatsTesting.INTEGER_MANY_VALUES_COUNT;
Reported by PMD.
Line: 71
*
* @author Pete Gillin
*/
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
Reported by PMD.
Line: 71
*
* @author Pete Gillin
*/
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
Reported by PMD.
Line: 71
*
* @author Pete Gillin
*/
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
Reported by PMD.
Line: 71
*
* @author Pete Gillin
*/
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
Reported by PMD.
Line: 73
*/
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
private StatsAccumulator oneValueAccumulatorByAddAllEmptyStats;
private StatsAccumulator twoValuesAccumulator;
Reported by PMD.
Line: 74
public class StatsAccumulatorTest extends TestCase {
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
private StatsAccumulator oneValueAccumulatorByAddAllEmptyStats;
private StatsAccumulator twoValuesAccumulator;
private StatsAccumulator twoValuesAccumulatorByAddAllStats;
Reported by PMD.
Line: 75
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
private StatsAccumulator oneValueAccumulatorByAddAllEmptyStats;
private StatsAccumulator twoValuesAccumulator;
private StatsAccumulator twoValuesAccumulatorByAddAllStats;
private StatsAccumulator manyValuesAccumulatorByAddAllIterable;
Reported by PMD.
Line: 76
private StatsAccumulator emptyAccumulator;
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
private StatsAccumulator oneValueAccumulatorByAddAllEmptyStats;
private StatsAccumulator twoValuesAccumulator;
private StatsAccumulator twoValuesAccumulatorByAddAllStats;
private StatsAccumulator manyValuesAccumulatorByAddAllIterable;
private StatsAccumulator manyValuesAccumulatorByAddAllIterator;
Reported by PMD.
Line: 77
private StatsAccumulator emptyAccumulatorByAddAllEmptyIterable;
private StatsAccumulator emptyAccumulatorByAddAllEmptyStats;
private StatsAccumulator oneValueAccumulator;
private StatsAccumulator oneValueAccumulatorByAddAllEmptyStats;
private StatsAccumulator twoValuesAccumulator;
private StatsAccumulator twoValuesAccumulatorByAddAllStats;
private StatsAccumulator manyValuesAccumulatorByAddAllIterable;
private StatsAccumulator manyValuesAccumulatorByAddAllIterator;
private StatsAccumulator manyValuesAccumulatorByAddAllVarargs;
Reported by PMD.
android/guava-tests/test/com/google/common/collect/SetsTest.java
375 issues
Line: 559
public void testNewIdentityHashSet() {
Set<Integer> set = Sets.newIdentityHashSet();
Integer value1 = new Integer(12357);
Integer value2 = new Integer(12357);
assertTrue(set.add(value1));
assertFalse(set.contains(value2));
assertTrue(set.contains(value1));
assertTrue(set.add(value2));
Reported by PMD.
Line: 560
public void testNewIdentityHashSet() {
Set<Integer> set = Sets.newIdentityHashSet();
Integer value1 = new Integer(12357);
Integer value2 = new Integer(12357);
assertTrue(set.add(value1));
assertFalse(set.contains(value2));
assertTrue(set.contains(value1));
assertTrue(set.add(value2));
assertEquals(2, set.size());
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.unmodifiableIterable;
import static com.google.common.collect.Sets.newEnumSet;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.Sets.newLinkedHashSet;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.collect.Iterables.unmodifiableIterable;
import static com.google.common.collect.Sets.newEnumSet;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.Sets.newLinkedHashSet;
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
Line: 88
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class SetsTest extends TestCase {
private static final IteratorTester.KnownOrder KNOWN_ORDER =
IteratorTester.KnownOrder.KNOWN_ORDER;
private static final Collection<Integer> EMPTY_COLLECTION = Arrays.<Integer>asList();
Reported by PMD.
guava-tests/test/com/google/common/base/CharMatcherTest.java
371 issues
Line: 46
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
Reported by PMD.
Line: 46
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
Reported by PMD.
Line: 48
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
tester.testAllPublicInstanceMethods(CharMatcher.any());
tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
Reported by PMD.
Line: 49
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
tester.testAllPublicInstanceMethods(CharMatcher.any());
tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
}
Reported by PMD.
Line: 64
}
};
public void testAnyAndNone_logicalOps() throws Exception {
// These are testing behavior that's never promised by the API, but since
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
Reported by PMD.
Line: 64
}
};
public void testAnyAndNone_logicalOps() throws Exception {
// These are testing behavior that's never promised by the API, but since
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
Reported by PMD.
Line: 69
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
Reported by PMD.
Line: 69
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
Reported by PMD.
Line: 70
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
assertSame(CharMatcher.none(), CharMatcher.none().and(WHATEVER));
Reported by PMD.
Line: 70
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
assertSame(CharMatcher.none(), CharMatcher.none().and(WHATEVER));
Reported by PMD.
android/guava-tests/test/com/google/common/base/CharMatcherTest.java
371 issues
Line: 46
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
Reported by PMD.
Line: 46
* @author Kevin Bourrillion
*/
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
Reported by PMD.
Line: 48
@GwtCompatible(emulated = true)
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
tester.testAllPublicInstanceMethods(CharMatcher.any());
tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
Reported by PMD.
Line: 49
public class CharMatcherTest extends TestCase {
@GwtIncompatible // NullPointerTester
public void testStaticNullPointers() throws Exception {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(CharMatcher.class);
tester.testAllPublicInstanceMethods(CharMatcher.any());
tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
}
Reported by PMD.
Line: 64
}
};
public void testAnyAndNone_logicalOps() throws Exception {
// These are testing behavior that's never promised by the API, but since
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
Reported by PMD.
Line: 64
}
};
public void testAnyAndNone_logicalOps() throws Exception {
// These are testing behavior that's never promised by the API, but since
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
Reported by PMD.
Line: 69
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
Reported by PMD.
Line: 69
// we're lucky enough that these do pass, it saves us from having to write
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
Reported by PMD.
Line: 70
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
assertSame(CharMatcher.none(), CharMatcher.none().and(WHATEVER));
Reported by PMD.
Line: 70
// more excruciating tests! Hooray!
assertSame(CharMatcher.any(), CharMatcher.none().negate());
assertSame(CharMatcher.none(), CharMatcher.any().negate());
assertSame(WHATEVER, CharMatcher.any().and(WHATEVER));
assertSame(CharMatcher.any(), CharMatcher.any().or(WHATEVER));
assertSame(CharMatcher.none(), CharMatcher.none().and(WHATEVER));
Reported by PMD.
android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
356 issues
Line: 41
* @author Jon Donovan
*/
@GwtCompatible
public class CacheBuilderGwtTest extends TestCase {
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
Reported by PMD.
Line: 43
@GwtCompatible
public class CacheBuilderGwtTest extends TestCase {
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
super.setUp();
Reported by PMD.
Line: 45
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
super.setUp();
fakeTicker = new FakeTicker();
}
Reported by PMD.
Line: 52
fakeTicker = new FakeTicker();
}
public void testLoader() throws ExecutionException {
final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
Callable<Integer> loader =
new Callable<Integer>() {
Reported by PMD.
Line: 52
fakeTicker = new FakeTicker();
}
public void testLoader() throws ExecutionException {
final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
Callable<Integer> loader =
new Callable<Integer>() {
Reported by PMD.
Line: 58
Callable<Integer> loader =
new Callable<Integer>() {
private int i = 0;
@Override
public Integer call() throws Exception {
return ++i;
}
Reported by PMD.
Line: 66
}
};
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
Reported by PMD.
Line: 68
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.
Line: 68
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.
Line: 69
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
356 issues
Line: 41
* @author Jon Donovan
*/
@GwtCompatible
public class CacheBuilderGwtTest extends TestCase {
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
Reported by PMD.
Line: 43
@GwtCompatible
public class CacheBuilderGwtTest extends TestCase {
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
super.setUp();
Reported by PMD.
Line: 45
private FakeTicker fakeTicker;
@Override
protected void setUp() throws Exception {
super.setUp();
fakeTicker = new FakeTicker();
}
Reported by PMD.
Line: 52
fakeTicker = new FakeTicker();
}
public void testLoader() throws ExecutionException {
final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
Callable<Integer> loader =
new Callable<Integer>() {
Reported by PMD.
Line: 52
fakeTicker = new FakeTicker();
}
public void testLoader() throws ExecutionException {
final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
Callable<Integer> loader =
new Callable<Integer>() {
Reported by PMD.
Line: 58
Callable<Integer> loader =
new Callable<Integer>() {
private int i = 0;
@Override
public Integer call() throws Exception {
return ++i;
}
Reported by PMD.
Line: 66
}
};
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
Reported by PMD.
Line: 68
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.
Line: 68
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.
Line: 69
cache.put(0, 10);
assertEquals(Integer.valueOf(10), cache.get(0, loader));
assertEquals(Integer.valueOf(1), cache.get(20, loader));
assertEquals(Integer.valueOf(2), cache.get(34, loader));
cache.invalidate(0);
assertEquals(Integer.valueOf(3), cache.get(0, loader));
Reported by PMD.