-
Notifications
You must be signed in to change notification settings - Fork 309
Comparing changes
Open a pull request
base repository: uber/NullAway
base: v0.12.3
head repository: uber/NullAway
compare: v0.12.4
- 13 commits
- 31 files changed
- 5 contributors
Commits on Jan 6, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 1e29ca7 - Browse repository at this point
Copy the full SHA 1e29ca7View commit details
Commits on Jan 25, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 427fa89 - Browse repository at this point
Copy the full SHA 427fa89View commit details
Commits on Jan 31, 2025
-
Skip checks involving wildcard generic type arguments (#1137)
We need to handle wildcards eventually, but in the meantime, avoid reporting false positives. Fixes #1126
Configuration menu - View commit details
-
Copy full SHA for 90265c5 - Browse repository at this point
Copy the full SHA 90265c5View commit details -
Properly handle conditional expression within parens as RHS of assign…
Configuration menu - View commit details
-
Copy full SHA for 18a0a68 - Browse repository at this point
Copy the full SHA 18a0a68View commit details
Commits on Feb 3, 2025
-
Configuration menu - View commit details
-
Copy full SHA for f064222 - Browse repository at this point
Copy the full SHA f064222View commit details
Commits on Feb 7, 2025
-
Remove need to use JSpecify's @nullable annotation (#1142)
Fixes #1139. There are real scenarios where projects may not want to ship with a JSpecify dependence; see #1139 (comment). So, we remove any cases where we were specifically checking for or using JSpecify's `@Nullable` annotation. Most of the code changes are due to the fact that now, we check if an annotation is a `@Nullable` annotation using `Nullness.hasNullableAnnotation`, which requires a `Config` object as a parameter. So we need to thread a `Config` object as a parameter through a bunch of methods.
Configuration menu - View commit details
-
Copy full SHA for 50cb4ab - Browse repository at this point
Copy the full SHA 50cb4abView commit details
Commits on Feb 10, 2025
-
Fix printing of array types in JSpecify errors (#1145)
Before we would not print nullability of the top-level array type. Also improve spacing.
Configuration menu - View commit details
-
Copy full SHA for 7fa7bf9 - Browse repository at this point
Copy the full SHA 7fa7bf9View commit details -
Always acknowledge restrictive annotations in JSpecify mode (#1144)
Previously, we neglected to acknowledge explicit `@Nullable` return types and `@NonNull` parameter types in `@NullUnmarked` code unless the `AcknowledgeRestrictiveAnnotations` setting was passed. But, the JSpecify spec requires acknowledging restrictive annotations in `@NullUnmarked` code. So now, in JSpecify mode, we always acknowledge restrictive annotations. Note that in JSpecify mode, this change will also impact handling of other "unannotated" code that is not explicitly annotated `@NullUnmarked`. But, as discussed in #978, we want to switch to acknowledging restrictive annotations by default anyway. It seems reasonable to go ahead and make this change in JSpecify mode, to ensure greater spec compliance.
Configuration menu - View commit details
-
Copy full SHA for a1df1c4 - Browse repository at this point
Copy the full SHA a1df1c4View commit details
Commits on Feb 13, 2025
-
JSpecify: preserve explicit nullability annotations on type variables…
… when performing substitutions (#1143) Fixes #1091 Consider the following code: ```java abstract class Test { abstract <V> @nullable V foo(Function<@nullable V, @nullable V> f); void testPositive(Function<String, String> f) { this.<String>foo(f); // error } } ``` The call to `foo` should not type check. Since the type of its parameter `f` is `Function<@nullable V, @nullable V>`, with explicit `@Nullable` annotations on the type variables, any `Function` passed to `foo` must have `@Nullable` type arguments. In typechecking this code, NullAway previously substituted the type arguments for the type variables in `foo` just using built-in `javac` routines. But, this would yield a formal parameter type `Function<String, String>`, as the `javac` routine would not retain the explicit type arguments in the right places. So we would miss reporting an error. This PR fixes the substitutions and re-introduces the annotations on type variables, so we get the type `Function<@nullable String, @nullable String>` for the formal parameter at the call, and report an error correctly. Substitutions were broken in other cases as well; substituting `@Nullable V` for `@Nullable V` (where `V` is a type variable) yielded just `V`, which led to false positives (like #1091). The main logic changes are in `TypeSubstitutionUtils`. We add a new `RestoreNullnessAnnotationsVisitor` and use it to restore nullability annotations from type variables after performing a substitution. We also extract the `TypeMetadataBuilder` logic to a top-level source file, and add new methods as needed for this PR. Some of this could have been split into a separate PR but it's a bit of a pain to extract it now.
Configuration menu - View commit details
-
Copy full SHA for 6f4cda7 - Browse repository at this point
Copy the full SHA 6f4cda7View commit details
Commits on Feb 18, 2025
-
Ignore Spring Framework 6.2
@MockitoBean
,@MockitoSpyBean
fields (#……1147) Spring Framework 6.2 introduced two annotations, `@MockitoBean` and `@MockitoSpyBean`, that supersede Spring Boot's `@MockBean` and `@SpyBean`. Add these annotations to the field ignore list.
Configuration menu - View commit details
-
Copy full SHA for 4805b0b - Browse repository at this point
Copy the full SHA 4805b0bView commit details
Commits on Feb 19, 2025
-
Add support for local variables for arrays. (#1146)
I added changes to support local variables specifically for arrays. Added a new class `LocalVariableLocation` that will contain location details in the scenario when the target is a local variable. --------- Co-authored-by: Manu Sridharan <msridhar@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15c817a - Browse repository at this point
Copy the full SHA 15c817aView commit details
Commits on Feb 25, 2025
-
Better
@MonotonicNonNull
support (#1149)Fixes #1148 We add explicit support for any annotation named `@MonotonicNonNull` and add our own version of the annotation to our annotations package. The main additional support is that we now reason that once assigned a non-null value, `@MonotonicNull` fields remain non-null when accessed from subsequent lambdas, even if the lambdas are invoked asynchronously.
Configuration menu - View commit details
-
Copy full SHA for 8e525e6 - Browse repository at this point
Copy the full SHA 8e525e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 282c573 - Browse repository at this point
Copy the full SHA 282c573View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.12.3...v0.12.4