Skip to content

History

Revisions

  • Use `@NullMarked` instead of our custom `@ElementTypesAreNonnullByDefault` annotations. This is the next step toward [using JSpecify in Guava](https://github.com/jspecify/jspecify/issues/239#issuecomment-2204318808). At the end of that path, we'll be able to [remove our dependency on JSR-305](https://github.com/google/guava/issues/2960) (and on the Checker Framework's annotations), and we'll have one less blocker to [providing a `module-info`](https://github.com/google/guava/issues/2970). `@NullMarked` allows tools like kotlinc to produce errors for code like `ImmutableList<String?>`. (Before releasing this change, I'll conduct some further testing to more fully characterize the effects, both under Kotlin 2.1 and prior.) As we make further changes, it will allow kotlinc to detect even more nullness problems. We will make these changes in a series of incremental releases so that users can pick them up gradually, as we did inside Google. In simple cases, users may wish to pick up all the changes at once instead by upgrading straight from Guava 33.4.0 (or an earlier version) to Guava 33.4.4 (or whatever the version to make the final changes ends up being). RELNOTES=Replaced our custom `@ElementTypesAreNonnullByDefault` annotations with the JSpecify `@NullMarked` annotation. PiperOrigin-RevId: 708598410

    @cpovirk cpovirk committed Dec 21, 2024
    61559d4
  • New subsubheader "Unmodifiable is not immutable" that we can link to.

    @eamonnmcmanus eamonnmcmanus committed Oct 22, 2024
    6aa1a1e
  • Add an anchor to reference `Collections.unmodifiableXXX`.

    @eamonnmcmanus eamonnmcmanus committed Oct 22, 2024
    52cb63f
  • Migrate off our `Charsets` constants, and further discourage usage. Guava has required Java 8 for a while now. [`StandardCharsets`](https://developer.android.com/reference/java/nio/charset/StandardCharsets) has been available since API Level 19, and we currently [test for compatibility with 21](https://guava.dev/#important-warnings). RELNOTES=n/a PiperOrigin-RevId: 655152755

    @cpovirk cpovirk committed Jul 23, 2024
    0434ef4
  • Reimplement our `compare` methods in terms of JDK equivalents. And migrate our own calls off our methods. Guava has required Java 8 for a while now. Note also that the APIs in question are available even under Android [even without opt-in library desugaring](https://r8.googlesource.com/r8/+/refs/heads/main/src/main/java/com/android/tools/r8/ir/desugar/BackportedMethodRewriter.java). Further notes: - I did not touch `UnsignedInteger`, `UnsignedInts`, `UnsignedLong`, or `UnsignedLongs` because the JDK equivalents aren't available under GWT or J2CL. - I did not touch `UnsignedBytes.compare` because `Bytes.compareUnsigned`, while available under any version of Android, is not available on the JVM until Java 9. - I did touch an _assertion_ about `UnsignedBytes.compare` because I noticed that it had its actual and expected values reversed. RELNOTES=n/a PiperOrigin-RevId: 655152611

    @cpovirk cpovirk committed Jul 23, 2024
    788c5b3
  • Update some comments / docs about JDK 7. RELNOTES=n/a PiperOrigin-RevId: 654907100

    @cpovirk cpovirk committed Jul 22, 2024
    44e3403
  • Remove some references to Java 7. Guava has required Java 8 for a while now. Note also that the APIs in question are available even under Android [even without opt-in library desugaring](https://r8.googlesource.com/r8/+/refs/heads/main/src/main/java/com/android/tools/r8/ir/desugar/BackportedMethodRewriter.java). RELNOTES=n/a PiperOrigin-RevId: 654844953

    @cpovirk cpovirk committed Jul 22, 2024
    70f614a
  • Standardize on `Java N+` in documentation. RELNOTES=n/a PiperOrigin-RevId: 607336969

    @kluever kluever committed Feb 15, 2024
    036bc7a
  • change behavior of views returned by graph accessor methods that take a graph element as input: they now throw IllegalStateException when that element is removed from the graph RELNOTES=change behavior of views returned by graph accessor methods that take a graph element as input: they now throw IllegalStateException when that element is removed from the graph PiperOrigin-RevId: 600480069

    @java-team-github-bot java-team-github-bot committed Jan 22, 2024
    7210e8f
  • change behavior of views retu... PiperOrigin-RevId: 591886365

    @java-team-github-bot java-team-github-bot committed Dec 18, 2023
    b5425b4
  • change behavior of views returned by graph accessor methods that take a graph element as input: they now throw IllegalStateException when that element is removed from the graph RELNOTES=change behavior of views returned by graph accessor methods that take a graph element as input: they now throw IllegalStateException when that element is removed from the graph PiperOrigin-RevId: 591404913

    @java-team-github-bot java-team-github-bot committed Dec 16, 2023
    bd9cdd6
  • GraphsExplained: Add section about utility functions. PiperOrigin-RevId: 585690009

    @java-team-github-bot java-team-github-bot committed Nov 27, 2023
    b613a29
  • GraphsExplained: Add section about graph traversal. PiperOrigin-RevId: 585688807

    @java-team-github-bot java-team-github-bot committed Nov 27, 2023
    dd00cb8
  • GraphsExplained: Add example images for the three different types of graphs. PiperOrigin-RevId: 585687222

    @java-team-github-bot java-team-github-bot committed Nov 27, 2023
    c8031d5
  • GraphsExplained: Fix uncompilable code (cast to mutable type to be able to mutate it later) PiperOrigin-RevId: 585634445

    @java-team-github-bot java-team-github-bot committed Nov 27, 2023
    88aa34e
  • GraphsExplained: Replace integer by Distance type. This improves the readability by using an appropriate type and fixes a minor disadvantage that flight times are dependent on more than only the two airports (e.g. weather) PiperOrigin-RevId: 585338517

    @java-team-github-bot java-team-github-bot committed Nov 26, 2023
    cdfec2e
  • Update http:// links to https:// if available. Also update some links that have been migrated. Context: #6839. RELNOTES=n/a PiperOrigin-RevId: 583431708

    @chaoren chaoren committed Nov 17, 2023
    005f24b
  • Add some issue and PR templates for Guava. RELNOTES=n/a PiperOrigin-RevId: 577280351

    @chaoren chaoren committed Oct 27, 2023
    79b3142
  • Begin using Maven Wrapper. I set this up with: ``` mvn org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper -Dtype=-script -Dmaven=3.9.5 ``` It's not obvious to me whether we'll notice many differences among the 3 non-binary types (`source`, `script`, and `only-script`). I initially went with `only-script`, which is newest, given that it sounded theoretically like it would involve the fewest steps. But I got [an error](https://github.com/google/guava/actions/runs/6536542346/job/17748480689?pr=6783) from the Windows CI: ``` distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip ' ``` I assume that this is a newline-related issue. That error message comes from the `only-script` shell script, and there is no such line in the `script` shell script, so I'm now trying `script`. (It's possible that we should be using `mvnw.cmd` under Windows, so maybe nothing will work until I change our CI to do that.... (We got a recommendation for the Maven Wrapper [from Ben Manes](https://groups.google.com/g/guava-discuss/c/e5UVvuM9CP8/m/w2H3CjZ7AQAJ).) There does not yet appear to be a way to [make Dependabot automatically update the version of Maven we use](https://github.com/dependabot/dependabot-core/issues/485) (nor the version of the wrapper itself, though I looked less hard for that because it's less important). We've already not kept up with Maven upgrades very carefully—and we might each be using different Maven versions for all I know!—so this isn't necessarily a huge downgrade. Still, we don't want to fall far behind what's on our machines or GitHub CI, so I've at least set myself a calendar reminder to check back every 6 months. RELNOTES=n/a PiperOrigin-RevId: 573917287

    @cpovirk cpovirk committed Oct 16, 2023
    eb1532a
  • Remove suggestions to throw a plain `RuntimeException`, and discourage the remaining `propagateIfPossible` overloads, too. RELNOTES=n/a PiperOrigin-RevId: 568222002

    @cpovirk cpovirk committed Sep 25, 2023
    ff09ace
  • Update docs about annotation-only dependencies now that [j2objc-annotations will be hidden at runtime for Gradle users](https://github.com/google/guava/pull/3683). PiperOrigin-RevId: 544382567

    @cpovirk cpovirk committed Jun 29, 2023
    d04c013
  • Edits to the first line of `package-info` files, as seen in https://guava.dev/api. Some of the edits are in the name of consistency across packages; others are useful even in a vacuum. - Discourage `common.cache` and EventBus. - Delete most of the EventBus doc, as it is essentially a slightly incomplete copy of the wiki page (missing sections on unregistration and "magic things," plus a remark that the ability to rename subscriber methods is a feature). (Also, I updated the wiki page to say "subscriber" instead of "handler," following the change to package-info in cl/52404442(!). And I removed the section about filing a feature request.) - Stop saying "working with." - Stop inconsistently saying "This package contains." - Stop saying "Java." - Generalize the description of `common.net`. - Give `BigDecimal` equal billing alongside `BigInteger`. - Stop emphasizing that our collections are "generic," since that hasn't been a differentiator in many years. - Stop saying "common" in `common.annotations`. RELNOTES=n/a PiperOrigin-RevId: 542935350

    @cpovirk cpovirk committed Jun 23, 2023
    dc286b0
  • Warn about [JDK-8152174](https://bugs.openjdk.org/browse/JDK-8152174). This didn't feel common enough for me to also mention it on our landing pages. But it feels worth mentioning here, admittedly in part because I like to refer back to this sprawling section whenever I hear of problems from excluding dependencies :) (Thanks to https://github.com/google/guava/issues/6474 for the report.) PiperOrigin-RevId: 530298918

    @cpovirk cpovirk committed May 8, 2023
    b381bc8
  • Link to Marcono1234's discovery that Maven sometimes hides the error messages that are caused by missing annotation deps. PiperOrigin-RevId: 514477129

    @cpovirk cpovirk committed Mar 6, 2023
    67134bf
  • Updated HowToContribute (markdown)

    Kevin Bourrillion committed Feb 1, 2023
    b1131e8
  • Updated HowToContribute (markdown)

    Kevin Bourrillion committed Feb 1, 2023
    43e6622
  • Fix a typo. PiperOrigin-RevId: 503645479

    @java-team-github-bot java-team-github-bot committed Jan 21, 2023
    0ba6b5e
  • Add discouraging text to the Wiki for `EventBus` so that it matches the Javadoc. Inspired by #6291. RELNOTES=n/a PiperOrigin-RevId: 503491189

    @netdpb netdpb committed Jan 20, 2023
    77a65c2
  • Internal change. RELNOTES=n/a PiperOrigin-RevId: 488371180

    @netdpb netdpb committed Nov 14, 2022
    e9608c9
  • warning about not sending PRs; a little adjustment

    Kevin Bourrillion committed Nov 7, 2022
    22dda26