forked from google/guava
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from google:master #247
Open
pull
wants to merge
1,324
commits into
scope-demo:master
Choose a base branch
from
google:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+121,377
−84,161
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… arrays contain too many elements. Fixes #7376 Fixes #3303 This change comes from @perceptron8, who generalized the earlier PR by @ineuwirth. RELNOTES=n/a PiperOrigin-RevId: 668024782
RELNOTES=n/a PiperOrigin-RevId: 668055504
As of cl/655647768, we always build with JDK 22. RELNOTES=n/a PiperOrigin-RevId: 668969633
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.26.2 to 3.26.5 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@429e197...2c779ab) Fixes #7374 RELNOTES=n/a PiperOrigin-RevId: 669378818
Bumps the github-actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/upload-artifact` from 4.3.6 to 4.4.0 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@834a144...5076954) Updates `github/codeql-action` from 3.26.5 to 3.26.6 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@2c779ab...4dd1613) Fixes #7386 RELNOTES=n/a PiperOrigin-RevId: 671039923
github-actions group Bumps the github-actions group with 1 update: [actions/setup-java](https://github.com/actions/setup-java). Updates `actions/setup-java` from 4.2.2 to 4.3.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@6a0805f...2dfa201) Fixes #7389 RELNOTES=n/a PiperOrigin-RevId: 672578189
Our nullness checking has seen `@NonNull` annotations in the JDK since cl/648064454. RELNOTES=n/a PiperOrigin-RevId: 672970833
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.26.6 to 3.26.7 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@4dd1613...8214744) Fixes #7393 RELNOTES=n/a PiperOrigin-RevId: 675248105
...by actually using our own homegrown versions that avoid reflection. (followup to cl/563137030 + cl/570474348) Also, suppress/address a few other warnings. And incidentally, largely rewrite `ThrowablesTest`. We're allowed to learn a thing or two about writing tests over the course of 17+ years :) (I'd specifically highlight the old `testPropagateIfInstanceOf_uncheckedThrown` test, which has been replaced with the similarly `testPropagateIfInstanceOf_unchecked`: It might have appeared to have been a test that `propagateIfInstanceOf` would throw the given unchecked exception, but in fact what it actually shows is that _`propagate`_ does so. `propagateIfInstanceOf` does not and should not. Additionally, I think that my new `testPropagateIfPossible_twoDeclared_secondSame` covers a case that wasn't covered before.) Future work: - Perform this migration for our other packages. - Generalize AssertThrowsMultipleStatements to cover our `assertThrows` methods. - Maybe migrate non-GWT/J2CL/J2KT calls of `assertThrows` to our methods, too. This migration should save us from warnings from the recent changes to the EmptyCatch check in cl/674409794. The approach used in this change (of declaring both `ThrowingRunnable` and `ThrowingSupplier` overloads of `assertThrows`) saves us from needing to update our CheckReturnValue enforcement to recognize the new `assertThrows` variants. Note also that it lets us provide a slightly better failure message, as discussed back in junit-team/junit5#1394. RELNOTES=n/a PiperOrigin-RevId: 675634517
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.26.7 to 3.26.8 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@8214744...294a9d9) Fixes #7398 RELNOTES=n/a PiperOrigin-RevId: 677824554
While that artifact contains no runtime-retention annotations, it does contain class-retention annotations (which could drive a runtime bytecode-rewriting agent). And, more practically, the Android Gradle Plugin has started reporting errors for `compileOnly` dependencies. Fixes #7397 Relevant to firebase/firebase-android-sdk#6232 and androidx/media#1700 RELNOTES=Added `j2objc-annotations` to the Gradle runtime classpath to avoid [an Android Gradle Plugin error](#7397). PiperOrigin-RevId: 677842769
…terable. RELNOTES=n/a PiperOrigin-RevId: 678224792
RELNOTES=n/a PiperOrigin-RevId: 678330548
Fixes #7404 RELNOTES=`net`: Added `application/cbor` to `MediaType` PiperOrigin-RevId: 679244841
…verrides in place for a few others. (For more detail on the other plugins, see cl/655647768.) RELNOTES=n/a PiperOrigin-RevId: 681043097
…rfc7838#page-8 RELNOTES=Adds `HttpHeaders.ALT_SVC` PiperOrigin-RevId: 681113423
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-java](https://github.com/actions/setup-java) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 4.1.7 to 4.2.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@692973e...d632683) Updates `actions/setup-java` from 4.3.0 to 4.4.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@2dfa201...b36c23c) Updates `github/codeql-action` from 3.26.8 to 3.26.10 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@294a9d9...e2b3eaf) Fixes #7411 RELNOTES=n/a PiperOrigin-RevId: 681130086
#7401. RELNOTES=n/a PiperOrigin-RevId: 681498058
…s are not also required to be absent. Fixes #7401 RELNOTES=`collect.testing.features`: Fixed `@Require` annotations so that features implied by absent features are not also required to be absent. PiperOrigin-RevId: 682731934
RELNOTES=Provide an optimized copyOf method for TreeRangeMap PiperOrigin-RevId: 682878547
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action). Updates `github/codeql-action` from 3.26.10 to 3.26.11 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@e2b3eaf...6db8d63) Fixes #7419 RELNOTES=n/a PiperOrigin-RevId: 683229166
…olve potential memory issues in a J2ObjC context. RELNOTES=n/a PiperOrigin-RevId: 683652108
…lation` and `Failure` case handling logic. RELNOTES=n/a PiperOrigin-RevId: 683695919
PiperOrigin-RevId: 683725351
RELNOTES=Remove @GwtIncompatible from LongMath.checkedSubtract PiperOrigin-RevId: 684068945
RELNOTES=n/a PiperOrigin-RevId: 684455708
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 4.2.0 to 4.2.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@d632683...eef6144) Updates `actions/upload-artifact` from 4.4.0 to 4.4.3 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@5076954...b4b15b8) Updates `github/codeql-action` from 3.26.11 to 3.26.13 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@6db8d63...f779452) Fixes #7431 RELNOTES=n/a PiperOrigin-RevId: 685774596
RELNOTES=n/a PiperOrigin-RevId: 726922078
RELNOTES=n/a PiperOrigin-RevId: 728204140
One is from cl/725859649 (I _thought_ I had tested that change with nullness checking on), and the other is from [a change to the annotations for `Map.replace` used by Android](jspecify/jdk#118). (I think that the latter change should actually be leading to _more_ errors in our _other_ implementations of the 3-arg `Map.replace`, like in `Maps` and `Synchronized`. The lack of errors is probably a bug in the checker.) RELNOTES=n/a PiperOrigin-RevId: 728229469
There is nothing wrong with it, and we will add it in version 33.5.0. I'm removing it merely so that we can release a [module-system-friendly](#2970) version of Guava as a _patch_ release, rather than as a _minor_ release. (The `MediaType` change is the only addition we've made since 33.4.0.) By doing so, we reduce the pressure on users to upgrade immediately, since dependencies can't come to depend on any new APIs. That gives users a little more time to sort out any issues that might arise from our new `module-info`. RELNOTES=n/a PiperOrigin-RevId: 728267849
RELNOTES=n/a PiperOrigin-RevId: 728705777
… to `MoreExecutors.shutdownAndAwaitTermination`. RELNOTES=n/a PiperOrigin-RevId: 728722633
RELNOTES=n/a PiperOrigin-RevId: 728791732
Workaround is no longer required. PiperOrigin-RevId: 729083405
In pre-[modularization](#2970) cl/725625326, I had pledged not to bikeshed over this. But it turns out that the number matters to some part of our JDiff pipeline, which has been broken since that CL. (Then I broke it _even more_ by introducing usages of `java.io.Serial` (cl/726154745), which I've since rolled back externally (cl/726521329).) We still really should [finish setting up japicmp](google/error-prone#4311 (comment)) to replace JDiff, but again, I just want to unbreak publishing documentation for releases and snapshots. (I will still view this as a _small_ bit of evidence that biggest version number is best version number for snapshot purposes :)) RELNOTES=n/a PiperOrigin-RevId: 729117340
…he classes look slightly more similar to one another. RELNOTES=n/a PiperOrigin-RevId: 729152015
PiperOrigin-RevId: 729184487
…g it for more environments. That includes J2KT and [GWT/J2CL](#2934). Changes include: - Suppress nullness at smaller scopes, fixing errors that were hidden by the old, broad suppression. - Remove `synchronized` from an override of `fillInStackTrace`. J2KT doesn't like `synchronized` except on very specific types, and we don't need it. - Introduce `rethrowIfErrorOtherThanStackOverflow` and `interruptCurrentThread`, `Platform` methods that will require different implementations for J2KT and J2CL/GWT. - Introduce helper methods like `casListeners(expect, update)` for `AtomicHelper` operations. These reduce verbosity relative to `ATOMIC_HELPER.casListeners(this, expect, update)`. They also prepare for `AbstractFuture` implementations that don't use `AtomicHelper`. - Introduce `notInstanceOfSetFuture`. This is arguably nicer than `!(localValue instanceof SetFuture)`, but the real purpose is to prepare for when code in a different file needs to check `instance SetFuture`. (I could be convinced that I should just make `SetFuture` package-private instead, even though no one outside the file should use it for anything but an `instanceof` check.) - Mysteriously move things around, increase visibility of members, and introduce and sometimes use accessors. This is to prepare for when some of the code will be moving to a separate file so that the remainder of `AbstractFuture` can be wholly shared across different platforms. - Fix a few typos in comments. Also, rename `SetFuture`. This isn't directly related, but now is as good a time as any to do it. Additional bonus: This CL probably makes [the logging at the "end" of `AbstractFuture` static initialization](https://github.com/google/guava/blob/7ec362ec68b630363231d5292cd6b2577c710be6/guava/src/com/google/common/util/concurrent/AbstractFuture.java#L210) have a better chance of actually working in the hypothetical situation that a logger uses `AbstractFuture`: Currently, `AbstractFuture` performs some further initialization _after_ that logging (such as the initialization of `NULL`). Now, it performs all that initialization before the `static` block that might log. RELNOTES=n/a PiperOrigin-RevId: 729313044
…om GWT/J2CL. This CL introduces a superclass, `AbstractFutureState`, following the pattern of [`AggregateFutureState`](https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/AggregateFutureState.java). That superclass contains platform-specific operations. Fixes #2934 RELNOTES=n/a PiperOrigin-RevId: 729328833
…). RELNOTES=n/a PiperOrigin-RevId: 729532679
- mostly https://errorprone.info/bugpattern/UnnecessaryParentheses (by removing the parentheses) - in `HostAndPort`, https://errorprone.info/bugpattern/UnusedException (by using `tryParse` instead of a `try`-`catch` approach, conveniently also getting the behavior we want for `+` and for non-ASCII digits for free) - in `IntMath`, https://errorprone.info/bugpattern/NonFinalStaticField (by making it `final` :)) RELNOTES=n/a PiperOrigin-RevId: 729533506
RELNOTES=n/a PiperOrigin-RevId: 730445899
RELNOTES=n/a PiperOrigin-RevId: 730460531
Bumps the github-actions group with 3 updates: [ossf/scorecard-action](https://github.com/ossf/scorecard-action), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action). Updates `ossf/scorecard-action` from 2.4.0 to 2.4.1 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@62b2cac...f49aabe) Updates `actions/upload-artifact` from 4.6.0 to 4.6.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@65c4c4a...4cec3d8) Updates `github/codeql-action` from 3.28.9 to 3.28.10 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@9e8d078...b56ba49) Fixes #7700 RELNOTES=n/a PiperOrigin-RevId: 730489574
The two are equivalent. We had to use the longer form temporarily because of a Kotlin bug that has since been fixed. Compare cl/708605353. RELNOTES=n/a PiperOrigin-RevId: 730523786
… up some code comments. RELNOTES=n/a PiperOrigin-RevId: 730887309
Fixes #7704 RELNOTES=n/a PiperOrigin-RevId: 731425671
RELNOTES=n/a PiperOrigin-RevId: 731426628
…o ours in `ByteStreams`. RELNOTES=n/a PiperOrigin-RevId: 731454411
…harStreams`. (I realized this just a little too late to include it in cl/731454411....) Surprisingly, the JDK `nullWriter` behaves slightly differently than the JDK `nullOutputStream`: The `flush()` method of the former throws after `close()`, while the `flush()` method of the latter does not. RELNOTES=n/a PiperOrigin-RevId: 731722268
This was going to be part of cl/731030741, but I'm pulling it out now that that CL has stalled. RELNOTES=n/a PiperOrigin-RevId: 731731239
I went with `@since 21.0` because [that's when our `Predicate` began to extend the JDK's](https://github.com/google/guava/wiki/Release21#commonbase)—and thus it's the earliest release of Guava in which you can call, e.g., `someBloomFilter.test(someObject)`. I doubt that that will ever matter to anyone, though. RELNOTES=n/a PiperOrigin-RevId: 731937798
RELNOTES=n/a PiperOrigin-RevId: 733072853
Otherwise, after our call to `future.clearListeners()`, there might be nothing to keep the listeners alive. (And each time we handle and discard the head of the list, there might be nothing to keep the tail of the list alive.) RELNOTES=n/a PiperOrigin-RevId: 733308592
…terables.getFirst()` / `getLast()`. RELNOTES=n/a PiperOrigin-RevId: 733371274
RELNOTES=n/a PiperOrigin-RevId: 734047493
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )