The following issues were found
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
481 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Objects.equal;
import static com.google.common.collect.Platform.reduceExponentIfGwt;
import static com.google.common.collect.Platform.reduceIterationsIfGwt;
import static com.google.common.truth.Truth.assertThat;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Objects.equal;
import static com.google.common.collect.Platform.reduceExponentIfGwt;
import static com.google.common.collect.Platform.reduceIterationsIfGwt;
import static com.google.common.truth.Truth.assertThat;
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 61
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(MinMaxPriorityQueueTest.class);
suite.addTest(
QueueTestSuiteBuilder.using(
Reported by PMD.
Line: 81
// Overkill alert! Test all combinations of 0-2 options during creation.
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
Reported by PMD.
Line: 83
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
public void testCreation_comparator() {
Reported by PMD.
Line: 83
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
public void testCreation_comparator() {
Reported by PMD.
Line: 88
checkNatural(queue);
}
public void testCreation_comparator() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
assertSame(SOME_COMPARATOR, queue.comparator());
}
Reported by PMD.
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
481 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Objects.equal;
import static com.google.common.collect.Platform.reduceExponentIfGwt;
import static com.google.common.collect.Platform.reduceIterationsIfGwt;
import static com.google.common.truth.Truth.assertThat;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Objects.equal;
import static com.google.common.collect.Platform.reduceExponentIfGwt;
import static com.google.common.collect.Platform.reduceIterationsIfGwt;
import static com.google.common.truth.Truth.assertThat;
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Sverre Sundsdal
*/
@GwtCompatible(emulated = true)
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 61
public class MinMaxPriorityQueueTest extends TestCase {
private static final Ordering<Integer> SOME_COMPARATOR = Ordering.natural().reverse();
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(MinMaxPriorityQueueTest.class);
suite.addTest(
QueueTestSuiteBuilder.using(
Reported by PMD.
Line: 81
// Overkill alert! Test all combinations of 0-2 options during creation.
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
Reported by PMD.
Line: 83
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
public void testCreation_comparator() {
Reported by PMD.
Line: 83
public void testCreation_simple() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
checkNatural(queue);
}
public void testCreation_comparator() {
Reported by PMD.
Line: 88
checkNatural(queue);
}
public void testCreation_comparator() {
MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).create();
assertEquals(11, queue.capacity());
checkUnbounded(queue);
assertSame(SOME_COMPARATOR, queue.comparator());
}
Reported by PMD.
guava-tests/test/com/google/common/collect/MultimapsTest.java
479 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Maps.immutableEntry;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.testing.Helpers.mapEntry;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Maps.immutableEntry;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.testing.Helpers.mapEntry;
Reported by PMD.
Line: 73
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
Reported by PMD.
Line: 73
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
Reported by PMD.
Line: 73
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
Reported by PMD.
Line: 78
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
ListMultimap<Integer, String> unused =
Stream.of("foo", "bar", "quux")
.collect(
Multimaps.toMultimap(
String::length, s -> s, MultimapBuilder.treeKeys().arrayListValues()::build));
Reported by PMD.
Line: 78
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
ListMultimap<Integer, String> unused =
Stream.of("foo", "bar", "quux")
.collect(
Multimaps.toMultimap(
String::length, s -> s, MultimapBuilder.treeKeys().arrayListValues()::build));
Reported by PMD.
Line: 79
Ordering.<Integer>natural().reverse().nullsFirst();
public void testMultimapCollectorGenerics() {
ListMultimap<Integer, String> unused =
Stream.of("foo", "bar", "quux")
.collect(
Multimaps.toMultimap(
String::length, s -> s, MultimapBuilder.treeKeys().arrayListValues()::build));
}
Reported by PMD.
Line: 80
public void testMultimapCollectorGenerics() {
ListMultimap<Integer, String> unused =
Stream.of("foo", "bar", "quux")
.collect(
Multimaps.toMultimap(
String::length, s -> s, MultimapBuilder.treeKeys().arrayListValues()::build));
}
Reported by PMD.
Line: 80
public void testMultimapCollectorGenerics() {
ListMultimap<Integer, String> unused =
Stream.of("foo", "bar", "quux")
.collect(
Multimaps.toMultimap(
String::length, s -> s, MultimapBuilder.treeKeys().arrayListValues()::build));
}
Reported by PMD.
android/guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java
454 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.truth.Truth.assertThat;
import static java.util.Arrays.asList;
import com.google.common.annotations.GwtCompatible;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.truth.Truth.assertThat;
import static java.util.Arrays.asList;
import com.google.common.annotations.GwtCompatible;
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 58
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 60
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(
NavigableSetTestSuiteBuilder.using(new ImmutableSortedSetCopyOfGenerator())
Reported by PMD.
Line: 204
return ImmutableSortedSet.of(e1, e2, e3, e4, e5);
}
@SuppressWarnings("unchecked")
@Override
protected <E extends Comparable<? super E>> SortedSet<E> of(
E e1, E e2, E e3, E e4, E e5, E e6, E... rest) {
return ImmutableSortedSet.of(e1, e2, e3, e4, e5, e6, rest);
}
Reported by PMD.
Line: 232
return ImmutableSortedSet.copyOf(elements);
}
@GwtIncompatible // NullPointerTester
public void testNullPointers() {
new NullPointerTester().testAllPublicStaticMethods(ImmutableSortedSet.class);
}
public void testEmpty_comparator() {
Reported by PMD.
Line: 237
new NullPointerTester().testAllPublicStaticMethods(ImmutableSortedSet.class);
}
public void testEmpty_comparator() {
SortedSet<String> set = of();
assertSame(Ordering.natural(), set.comparator());
}
public void testEmpty_headSet() {
Reported by PMD.
android/guava-tests/test/com/google/common/reflect/InvokableTest.java
454 issues
Line: 555
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 578
class LocalWithDefaultConstructor implements Runnable {
@Override
public void run() {
System.out.println(s + i);
}
}
Constructor<?> constructor = LocalWithDefaultConstructor.class.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 596
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 615
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 673
class LocalWithOneParameterConstructor {
@SuppressWarnings("unused") // called by reflection
public LocalWithOneParameterConstructor(String x) {
System.out.println(s + i);
}
}
Constructor<?> constructor =
LocalWithOneParameterConstructor.class.getDeclaredConstructors()[0];
Invokable<?, ?> invokable = Invokable.from(constructor);
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.reflect;
import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.reflect;
import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
Reported by PMD.
Line: 44
* @author Ben Yu
*/
@AndroidIncompatible // lots of failures, possibly some related to bad equals() implementations?
public class InvokableTest extends TestCase {
// Historically Invokable inherited from java.lang.reflect.AccessibleObject. That's no longer the
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)`.
public void testApiCompatibleWithAccessibleObject() {
Reported by PMD.
Line: 44
* @author Ben Yu
*/
@AndroidIncompatible // lots of failures, possibly some related to bad equals() implementations?
public class InvokableTest extends TestCase {
// Historically Invokable inherited from java.lang.reflect.AccessibleObject. That's no longer the
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)`.
public void testApiCompatibleWithAccessibleObject() {
Reported by PMD.
Line: 49
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)`.
public void testApiCompatibleWithAccessibleObject() {
ImmutableSet<String> invokableMethods =
publicMethodSignatures(Invokable.class, ImmutableSet.<String>of());
ImmutableSet<String> accesibleObjectMethods =
publicMethodSignatures(AccessibleObject.class, ImmutableSet.of("canAccess"));
assertThat(invokableMethods).containsAtLeastElementsIn(accesibleObjectMethods);
Reported by PMD.
guava-tests/test/com/google/common/reflect/InvokableTest.java
454 issues
Line: 555
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 578
class LocalWithDefaultConstructor implements Runnable {
@Override
public void run() {
System.out.println(s + i);
}
}
Constructor<?> constructor = LocalWithDefaultConstructor.class.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 596
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 615
new Runnable() {
@Override
public void run() {
System.out.println(s + i);
}
}.getClass();
Constructor<?> constructor = anonymous.getDeclaredConstructors()[0];
assertEquals(0, Invokable.from(constructor).getParameters().size());
}
Reported by PMD.
Line: 673
class LocalWithOneParameterConstructor {
@SuppressWarnings("unused") // called by reflection
public LocalWithOneParameterConstructor(String x) {
System.out.println(s + i);
}
}
Constructor<?> constructor =
LocalWithOneParameterConstructor.class.getDeclaredConstructors()[0];
Invokable<?, ?> invokable = Invokable.from(constructor);
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.reflect;
import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.reflect;
import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
Reported by PMD.
Line: 44
* @author Ben Yu
*/
@AndroidIncompatible // lots of failures, possibly some related to bad equals() implementations?
public class InvokableTest extends TestCase {
// Historically Invokable inherited from java.lang.reflect.AccessibleObject. That's no longer the
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)` and `boolean trySetAccessible()`.
public void testApiCompatibleWithAccessibleObject() {
Reported by PMD.
Line: 44
* @author Ben Yu
*/
@AndroidIncompatible // lots of failures, possibly some related to bad equals() implementations?
public class InvokableTest extends TestCase {
// Historically Invokable inherited from java.lang.reflect.AccessibleObject. That's no longer the
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)` and `boolean trySetAccessible()`.
public void testApiCompatibleWithAccessibleObject() {
Reported by PMD.
Line: 49
// case, but we do check that its API still has the same public methods. We exclude some methods
// that were added in Java 9 and that people probably weren't calling via Invokable, namely
// `boolean canAccess(Object)` and `boolean trySetAccessible()`.
public void testApiCompatibleWithAccessibleObject() {
ImmutableSet<String> invokableMethods =
publicMethodSignatures(Invokable.class, ImmutableSet.<String>of());
ImmutableSet<String> accesibleObjectMethods =
publicMethodSignatures(AccessibleObject.class, ImmutableSet.of("canAccess"));
assertThat(invokableMethods).containsAtLeastElementsIn(accesibleObjectMethods);
Reported by PMD.
guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java
451 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.truth.Truth.assertThat;
import static java.util.Arrays.asList;
import com.google.common.annotations.GwtCompatible;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.truth.Truth.assertThat;
import static java.util.Arrays.asList;
import com.google.common.annotations.GwtCompatible;
Reported by PMD.
Line: 62
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 62
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 62
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 62
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
Reported by PMD.
Line: 64
@GwtCompatible(emulated = true)
public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
@GwtIncompatible // suite
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(
NavigableSetTestSuiteBuilder.using(new ImmutableSortedSetCopyOfGenerator())
Reported by PMD.
Line: 208
return ImmutableSortedSet.of(e1, e2, e3, e4, e5);
}
@SuppressWarnings("unchecked")
@Override
protected <E extends Comparable<? super E>> SortedSet<E> of(
E e1, E e2, E e3, E e4, E e5, E e6, E... rest) {
return ImmutableSortedSet.of(e1, e2, e3, e4, e5, e6, rest);
}
Reported by PMD.
Line: 236
return ImmutableSortedSet.copyOf(elements);
}
@GwtIncompatible // NullPointerTester
public void testNullPointers() {
new NullPointerTester().testAllPublicStaticMethods(ImmutableSortedSet.class);
}
public void testEmpty_comparator() {
Reported by PMD.
Line: 241
new NullPointerTester().testAllPublicStaticMethods(ImmutableSortedSet.class);
}
public void testEmpty_comparator() {
SortedSet<String> set = of();
assertSame(Ordering.natural(), set.comparator());
}
public void testEmpty_headSet() {
Reported by PMD.
android/guava-tests/test/com/google/common/collect/MultimapsTest.java
445 issues
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Maps.immutableEntry;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.testing.Helpers.nefariousMapEntry;
Reported by PMD.
Line: 17
* limitations under the License.
*/
package com.google.common.collect;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Maps.immutableEntry;
import static com.google.common.collect.Sets.newHashSet;
import static com.google.common.collect.testing.Helpers.nefariousMapEntry;
Reported by PMD.
Line: 67
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
@SuppressWarnings("deprecation")
Reported by PMD.
Line: 67
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
@SuppressWarnings("deprecation")
Reported by PMD.
Line: 67
* @author Jared Levy
*/
@GwtCompatible(emulated = true)
public class MultimapsTest extends TestCase {
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
@SuppressWarnings("deprecation")
Reported by PMD.
Line: 72
private static final Comparator<Integer> INT_COMPARATOR =
Ordering.<Integer>natural().reverse().nullsFirst();
@SuppressWarnings("deprecation")
public void testUnmodifiableListMultimapShortCircuit() {
ListMultimap<String, Integer> mod = ArrayListMultimap.create();
ListMultimap<String, Integer> unmod = Multimaps.unmodifiableListMultimap(mod);
assertNotSame(mod, unmod);
assertSame(unmod, Multimaps.unmodifiableListMultimap(unmod));
Reported by PMD.
Line: 73
Ordering.<Integer>natural().reverse().nullsFirst();
@SuppressWarnings("deprecation")
public void testUnmodifiableListMultimapShortCircuit() {
ListMultimap<String, Integer> mod = ArrayListMultimap.create();
ListMultimap<String, Integer> unmod = Multimaps.unmodifiableListMultimap(mod);
assertNotSame(mod, unmod);
assertSame(unmod, Multimaps.unmodifiableListMultimap(unmod));
ImmutableListMultimap<String, Integer> immutable =
Reported by PMD.
Line: 76
public void testUnmodifiableListMultimapShortCircuit() {
ListMultimap<String, Integer> mod = ArrayListMultimap.create();
ListMultimap<String, Integer> unmod = Multimaps.unmodifiableListMultimap(mod);
assertNotSame(mod, unmod);
assertSame(unmod, Multimaps.unmodifiableListMultimap(unmod));
ImmutableListMultimap<String, Integer> immutable =
ImmutableListMultimap.of("a", 1, "b", 2, "a", 3);
assertSame(immutable, Multimaps.unmodifiableListMultimap(immutable));
assertSame(
Reported by PMD.
Line: 77
ListMultimap<String, Integer> mod = ArrayListMultimap.create();
ListMultimap<String, Integer> unmod = Multimaps.unmodifiableListMultimap(mod);
assertNotSame(mod, unmod);
assertSame(unmod, Multimaps.unmodifiableListMultimap(unmod));
ImmutableListMultimap<String, Integer> immutable =
ImmutableListMultimap.of("a", 1, "b", 2, "a", 3);
assertSame(immutable, Multimaps.unmodifiableListMultimap(immutable));
assertSame(
immutable, Multimaps.unmodifiableListMultimap((ListMultimap<String, Integer>) immutable));
Reported by PMD.
Line: 80
assertSame(unmod, Multimaps.unmodifiableListMultimap(unmod));
ImmutableListMultimap<String, Integer> immutable =
ImmutableListMultimap.of("a", 1, "b", 2, "a", 3);
assertSame(immutable, Multimaps.unmodifiableListMultimap(immutable));
assertSame(
immutable, Multimaps.unmodifiableListMultimap((ListMultimap<String, Integer>) immutable));
}
@SuppressWarnings("deprecation")
Reported by PMD.
android/guava-tests/test/com/google/common/net/InetAddressesTest.java
439 issues
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 37
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
}
Reported by PMD.
Line: 37
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
}
Reported by PMD.
Line: 43
tester.testAllPublicStaticMethods(InetAddresses.class);
}
public void testForStringBogusInput() {
ImmutableSet<String> bogusInputs =
ImmutableSet.of(
"",
"016.016.016.016",
"016.016.016",
Reported by PMD.
Line: 47
ImmutableSet<String> bogusInputs =
ImmutableSet.of(
"",
"016.016.016.016",
"016.016.016",
"016.016",
"016",
"000.000.000.000",
"000",
Reported by PMD.
Line: 51
"016.016.016",
"016.016",
"016",
"000.000.000.000",
"000",
"0x0a.0x0a.0x0a.0x0a",
"0x0a.0x0a.0x0a",
"0x0a.0x0a",
"0x0a",
Reported by PMD.
guava-tests/test/com/google/common/net/InetAddressesTest.java
439 issues
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 35
*
* @author Erik Kline
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
Reported by PMD.
Line: 37
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
}
Reported by PMD.
Line: 37
*/
public class InetAddressesTest extends TestCase {
public void testNulls() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(InetAddresses.class);
}
Reported by PMD.
Line: 43
tester.testAllPublicStaticMethods(InetAddresses.class);
}
public void testForStringBogusInput() {
ImmutableSet<String> bogusInputs =
ImmutableSet.of(
"",
"016.016.016.016",
"016.016.016",
Reported by PMD.
Line: 47
ImmutableSet<String> bogusInputs =
ImmutableSet.of(
"",
"016.016.016.016",
"016.016.016",
"016.016",
"016",
"000.000.000.000",
"000",
Reported by PMD.
Line: 51
"016.016.016",
"016.016",
"016",
"000.000.000.000",
"000",
"0x0a.0x0a.0x0a.0x0a",
"0x0a.0x0a.0x0a",
"0x0a.0x0a",
"0x0a",
Reported by PMD.