-
Notifications
You must be signed in to change notification settings - Fork 208
Fix ErrorProne 2.38.0 build failures by updating checker configuration #4257
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
Conversation
|
instead of disabling IntLiteralCast, fix the issues |
Fixed the IntLiteralCast violations instead of disabling the check. Replaced 8 instances of Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Fix the other checks as well instead of disabling them Fix each check in its own commit so that I can decide later if I want to keep the fix or disable the check |
Fixed all the ErrorProne checks as requested, with separate commits for each: TimeInStaticInitializer fix (ebfcbc7): Moved time-dependent code out of static initializer in EnumOrdinal fix (7dbf8c2): Replaced AddNullMarkedToPackageInfo: Kept disabled due to Java 8 compatibility - JSpecify 1.0.0 uses Java 9+ features that cause compilation errors with the project's All ErrorProne checks now pass and builds are successful. |
|
@copilot rebase |
|
Use |
Used @SuppressWarnings annotations instead of code fixes as requested. TimeInStaticInitializer suppressed at class level for MockedProfilerSettingsServlet, and EnumOrdinal suppressed at method level for TraceTelemetry and ExceptionTelemetry. All builds pass with ErrorProne 2.38.0. (260ca3a) |
...com/microsoft/applicationinsights/smoketest/fakeingestion/MockedProfilerSettingsServlet.java
Outdated
Show resolved
Hide resolved
Co-authored-by: trask <[email protected]>
…d checks Co-authored-by: trask <[email protected]>
…ead of casting Co-authored-by: trask <[email protected]>
…ndent code out of static initializer Co-authored-by: trask <[email protected]>
…instead of ordinal-based array access Co-authored-by: trask <[email protected]>
…numOrdinal violations Co-authored-by: trask <[email protected]>
…lizer and EnumOrdinal Co-authored-by: trask <[email protected]>
…meInStaticInitializer check Co-authored-by: trask <[email protected]>
…ne 2.38.0 Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
This PR fixes build failures that occur when updating ErrorProne from version 2.36.0 to 2.38.0, as attempted in PR #4188.
Problem
The ErrorProne 2.38.0 update introduced several breaking changes:
Java7ApiCheckeris no longer recognized, causing compilation failures-WerrorSolution
Updated the ErrorProne configuration in
buildSrc/src/main/kotlin/ai.errorprone-conventions.gradle.ktsto:disable("Java7ApiChecker")as this check no longer existsdisable("TimeInStaticInitializer")disable("AddNullMarkedToPackageInfo")anddisable("IntLiteralCast")disable("EnumOrdinal")Changes Made
dependencyManagement/build.gradle.ktsto use ErrorProne 2.38.0Testing
This enables the ErrorProne dependency update while maintaining build stability and code quality standards.
Fixes #4256.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.