Google core libraries for Java
105 matches across 5 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 440 | com.google.common.base.Optional.absent(), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 443 | com.google.common.base.Optional.of("2"), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 449 | com.google.common.base.Optional.absent(), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 453 | com.google.common.base.Optional.of(OneConstantEnum.CONSTANT1), |
| CRITICAL | …src/com/google/common/testing/FreshValueGenerator.java | 555 | return com.google.common.base.Optional.absent(); |
| CRITICAL | …src/com/google/common/testing/FreshValueGenerator.java | 560 | return com.google.common.base.Optional.of(value); |
| CRITICAL | …/src/com/google/common/testing/ArbitraryInstances.java | 232 | .put(com.google.common.base.Optional.class, com.google.common.base.Optional.absent()) |
| CRITICAL | …-tests/test/com/google/common/collect/StreamsTest.java | 79 | assertThat(stream(com.google.common.base.Optional.absent())).isEmpty(); |
| CRITICAL | …-tests/test/com/google/common/collect/StreamsTest.java | 80 | assertThat(stream(com.google.common.base.Optional.of("a"))).containsExactly("a"); |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 436 | com.google.common.base.Optional.absent(), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 439 | com.google.common.base.Optional.of("2"), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 445 | com.google.common.base.Optional.absent(), |
| CRITICAL | …com/google/common/testing/FreshValueGeneratorTest.java | 449 | com.google.common.base.Optional.of(OneConstantEnum.CONSTANT1), |
| CRITICAL | …src/com/google/common/testing/FreshValueGenerator.java | 526 | return com.google.common.base.Optional.absent(); |
| CRITICAL | …src/com/google/common/testing/FreshValueGenerator.java | 531 | return com.google.common.base.Optional.of(value); |
| CRITICAL | …/src/com/google/common/testing/ArbitraryInstances.java | 223 | .put(com.google.common.base.Optional.class, com.google.common.base.Optional.absent()) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …tlib/src/com/google/common/testing/GcFinalization.java | 121 | public final class GcFinalization { |
| LOW | …ava-tests/test/com/google/common/collect/MapsTest.java | 1301 | // Map<Number, Number> looseValued1 = transformEntries(map5, transformer); |
| LOW | …com/google/common/util/concurrent/MonitorTestCase.java | 241 | // TODO: Test hasQueuedThreads(). |
| LOW | …FinalizableReferenceQueueClassLoaderUnloadingTest.java | 81 | ClassLoader myLoader = getClass().getClassLoader(); |
| LOW | util/gradle_integration_tests.sh | 21 | ./mvnw \ |
| LOW | …com/google/common/escape/ArrayBasedUnicodeEscaper.java | 101 | this.replacements = escaperMap.getReplacementArray(); |
| LOW | guava/src/com/google/common/collect/Iterables.java | 681 | // Predicate<? super T> predicate, |
| LOW | guava/src/com/google/common/collect/Maps.java | 281 | } |
| LOW | guava/src/com/google/common/collect/CompactHashMap.java | 141 | // seen as fields of an imaginary `Entry` object like this: |
| LOW | guava/src/com/google/common/collect/CompactHashMap.java | 441 | |
| LOW | guava/src/com/google/common/eventbus/Dispatcher.java | 141 | // 1. Subscribers to events posted on different threads can be interleaved with each other |
| LOW | …e/common/util/concurrent/AbstractScheduledService.java | 621 | } catch (Throwable e) { |
| LOW | …google/common/util/concurrent/AbstractFutureState.java | 101 | |
| LOW | …ava/src/com/google/common/util/concurrent/Futures.java | 81 | */ |
| LOW | …ava/src/com/google/common/util/concurrent/Futures.java | 101 | // |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 201 | * @author Martin Buchholz |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 221 | // up strongly favoring the current interface. |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 241 | // |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 221 | // oldFuture completes. |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 241 | // |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 421 | * above)) |
| LOW | guava/src/com/google/common/hash/BloomFilter.java | 541 | Funnel<? super T> funnel, long expectedInsertions) { |
| LOW | guava/src/com/google/common/reflect/TypeToken.java | 1281 | private Type resolveTypeArgsForSubclass(Class<?> subclass) { |
| LOW | guava/src/com/google/common/io/MoreFiles.java | 421 | // canonical (absolute, normalized, symlinks resolved, etc.) form of a path to a nonexistent |
| LOW | guava/src/com/google/common/io/MoreFiles.java | 721 | // "/foo" ("/") |
| LOW | …src/com/google/common/math/PairedStatsAccumulator.java | 41 | private final StatsAccumulator xStats = new StatsAccumulator(); |
| LOW | guava/src/com/google/common/primitives/Ints.java | 561 | // There are several well-known algorithms for rotating part of an array (or, equivalently, |
| LOW | …tlib/src/com/google/common/testing/GcFinalization.java | 121 | public final class GcFinalization { |
| LOW | …ava-tests/test/com/google/common/collect/MapsTest.java | 1281 | Map<? extends Number, Double> wildcarded = transformEntries(map0, transformer); |
| LOW | …com/google/common/util/concurrent/MonitorTestCase.java | 241 | // TODO: Test automatic signaling before leave, waitFor, and reentrant enterWhen. |
| LOW | …FinalizableReferenceQueueClassLoaderUnloadingTest.java | 81 | ClassLoader myLoader = getClass().getClassLoader(); |
| LOW | …com/google/common/escape/ArrayBasedUnicodeEscaper.java | 101 | this.replacements = escaperMap.getReplacementArray(); |
| LOW | …oid/guava/src/com/google/common/collect/Iterables.java | 701 | // Predicate<? super T> predicate, |
| LOW | android/guava/src/com/google/common/collect/Maps.java | 281 | // ends up being used to compute a "threshold" size, beyond which the internal table |
| LOW | …uava/src/com/google/common/collect/CompactHashMap.java | 121 | |
| LOW | …uava/src/com/google/common/collect/CompactHashMap.java | 141 | // Entry next; |
| LOW | …uava/src/com/google/common/collect/CompactHashMap.java | 441 | // Loop over `oldTable` to construct its replacement, ``newTable`. The entries do not move, so |
| LOW | …d/guava/src/com/google/common/eventbus/Dispatcher.java | 141 | // 1. Subscribers to events posted on different threads can be interleaved with each other |
| LOW | …e/common/util/concurrent/AbstractScheduledService.java | 601 | // correct order. |
| LOW | …google/common/util/concurrent/AbstractFutureState.java | 101 | // * We want to be responsive to small timeouts, unpark() has non trivial latency overheads (I |
| LOW | …ava/src/com/google/common/util/concurrent/Futures.java | 81 | */ |
| LOW | …ava/src/com/google/common/util/concurrent/Futures.java | 101 | // |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 201 | * @author Martin Buchholz |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 221 | // up strongly favoring the current interface. |
| LOW | …ava/src/com/google/common/util/concurrent/Monitor.java | 241 | // |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 221 | // oldFuture completes. |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 241 | // |
| LOW | …/google/common/util/concurrent/ExecutionSequencer.java | 421 | * above)) |
| LOW | …oid/guava/src/com/google/common/reflect/TypeToken.java | 1281 | private Type resolveTypeArgsForSubclass(Class<?> subclass) { |
| LOW | android/guava/src/com/google/common/io/MoreFiles.java | 421 | public static void createParentDirectories(Path path, FileAttribute<?>... attrs) |
| LOW | android/guava/src/com/google/common/io/MoreFiles.java | 721 | |
| LOW | …src/com/google/common/math/PairedStatsAccumulator.java | 41 | private final StatsAccumulator xStats = new StatsAccumulator(); |
| LOW | …droid/guava/src/com/google/common/primitives/Ints.java | 561 | // There are several well-known algorithms for rotating part of an array (or, equivalently, |
| LOW | .github/dependabot.yml | 1 | version: 2 |
| LOW | .github/workflows/scorecard.yml | 41 | with: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …/com/google/common/util/concurrent/JSR166TestCase.java | 39 | * <li>If you override {@link #tearDown}, make sure to invoke {@code super.tearDown} within it. |
| MEDIUM | …om/google/common/util/concurrent/ListenableFuture.java | 111 | * nullness annotations in particular will outweigh the costs. (And it's worth noting that we have |
| MEDIUM | guava/src/com/google/common/collect/StandardTable.java | 297 | * then) or rowEntry would have been initialized by next() (as discussed above). |
| MEDIUM | …/com/google/common/util/concurrent/ServiceManager.java | 83 | * <p>Here is a simple example of how to use a {@code ServiceManager} to start a server. |
| MEDIUM | …om/google/common/util/concurrent/ListenableFuture.java | 111 | * nullness annotations in particular will outweigh the costs. (And it's worth noting that we have |
| MEDIUM | …/google/common/util/concurrent/ExecutionSequencer.java | 435 | // requireNonNull is safe, as discussed above. |
| MEDIUM | guava/src/com/google/common/math/LongMath.java | 1310 | // correct for Long.MAX_VALUE as discussed above: roundCeilingAsDouble must be 2^63, but |
| MEDIUM | guava/src/com/google/common/base/Joiner.java | 226 | // We might not have seen the expected number of elements, as discussed above. |
| MEDIUM | guava/src/com/google/common/base/Functions.java | 59 | * <p>As discussed above, prefer to use the method reference {@code Object::toString} instead, |
| LOW | …/com/google/common/util/concurrent/JSR166TestCase.java | 39 | * <li>If you override {@link #tearDown}, make sure to invoke {@code super.tearDown} within it. |
| MEDIUM | …guava/src/com/google/common/collect/StandardTable.java | 295 | * then) or rowEntry would have been initialized by next() (as discussed above). |
| MEDIUM | …/com/google/common/util/concurrent/ServiceManager.java | 83 | * <p>Here is a simple example of how to use a {@code ServiceManager} to start a server. |
| MEDIUM | …om/google/common/util/concurrent/ListenableFuture.java | 111 | * nullness annotations in particular will outweigh the costs. (And it's worth noting that we have |
| MEDIUM | …/google/common/util/concurrent/ExecutionSequencer.java | 435 | // requireNonNull is safe, as discussed above. |
| MEDIUM | android/guava/src/com/google/common/math/LongMath.java | 1310 | // correct for Long.MAX_VALUE as discussed above: roundCeilingAsDouble must be 2^63, but |
| MEDIUM | android/guava/src/com/google/common/base/Functions.java | 59 | * <p>As discussed above, prefer to use the method reference {@code Object::toString} instead, |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …tlib/src/com/google/common/testing/GcFinalization.java | 130 | // we try hard to make them robust in practice. We could additionally try to add in a system |
| MEDIUM | …/google/common/util/concurrent/AbstractFutureTest.java | 363 | // and the approximate actual delay, to be robust to variance in thread scheduling. |
| MEDIUM | guava/src/com/google/common/collect/CompactHashMap.java | 158 | // Essentially, then, `table[h]` gives us the start of a linked list in `entries`, where every |
| MEDIUM | guava/src/com/google/common/base/Splitter.java | 257 | * <p><b>Note:</b> if {@link #fixedLength} is used in conjunction with {@link #limit}, the final |
| MEDIUM | …tlib/src/com/google/common/testing/GcFinalization.java | 130 | // we try hard to make them robust in practice. We could additionally try to add in a system |
| MEDIUM | …/google/common/util/concurrent/AbstractFutureTest.java | 363 | // and the approximate actual delay, to be robust to variance in thread scheduling. |
| MEDIUM | …uava/src/com/google/common/collect/CompactHashMap.java | 154 | // Essentially, then, `table[h]` gives us the start of a linked list in `entries`, where every |
| MEDIUM | android/guava/src/com/google/common/base/Splitter.java | 257 | * <p><b>Note:</b> if {@link #fixedLength} is used in conjunction with {@link #limit}, the final |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | …ests/test/com/google/common/net/UrlEscaperTesting.java | 102 | assertThat(e.escape("foo@bar.com")).isEqualTo("foo@bar.com"); |
| LOW | …-tests/test/com/google/common/net/UrlEscapersTest.java | 63 | assertThat(e.escape("foo@bar.com")).isEqualTo("foo%40bar.com"); |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 44 | "Lorem ipsum dolor sit amet, consectetur adipiscing " |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 44 | "Lorem ipsum dolor sit amet, consectetur adipiscing " |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 73 | .put("lorem ipsum", LOREM_IPSUM) |
| LOW | …ests/test/com/google/common/net/UrlEscaperTesting.java | 102 | assertThat(e.escape("foo@bar.com")).isEqualTo("foo@bar.com"); |
| LOW | …-tests/test/com/google/common/net/UrlEscapersTest.java | 63 | assertThat(e.escape("foo@bar.com")).isEqualTo("foo%40bar.com"); |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 44 | "Lorem ipsum dolor sit amet, consectetur adipiscing " |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 44 | "Lorem ipsum dolor sit amet, consectetur adipiscing " |
| LOW | …-tests/test/com/google/common/io/SourceSinkTester.java | 73 | .put("lorem ipsum", LOREM_IPSUM) |