Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uber/NullAway
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.12.2
Choose a base ref
...
head repository: uber/NullAway
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.12.3
Choose a head ref
  • 17 commits
  • 39 files changed
  • 3 contributors

Commits on Dec 13, 2024

  1. Configuration menu
    Copy the full SHA
    9ff664a View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2024

  1. Remove InferredJARModelsHandler (#1079)

    Now, all logic for parsing loading `astubx` files is consolidated into
    the `LibraryModelsHandler.ExternalStubxLibraryModels` class and is
    uniform for `astubx` files generated via JarInfer or from source code,
    which will ease future bug fixes and changes.
    
    We copied over the logic from `InferredJARModelsHandler` for loading
    Android SDK models if present. We also update the logic for
    `ExternalStubxLibraryModels.nonNullParameters()` and
    `ExternalStubxLibraryModels.nullableReturns()` to pull in all the
    relevant info from the parsed `astubx` file.
    
    Fixes #1072
    msridhar authored Dec 16, 2024
    Configuration menu
    Copy the full SHA
    cb3ff51 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2024

  1. Fix crash with annotation on enum (#1097)

    Fixes #1093 
    
    We just missed a case.
    msridhar authored Dec 17, 2024
    Configuration menu
    Copy the full SHA
    346b9b0 View commit details
    Browse the repository at this point in the history
  2. Fix comment positions (#1098)

    msridhar authored Dec 17, 2024
    Configuration menu
    Copy the full SHA
    18c9723 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2024

  1. Handle case null in switch statements (#1100)

    In Java 21+, when a `switch` statement contains `case null`, the
    expression being switched on is allowed to be `null`.
    
    Fixes #930
    msridhar authored Dec 18, 2024
    Configuration menu
    Copy the full SHA
    41c7c55 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2024

  1. Configuration menu
    Copy the full SHA
    b7dad0c View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2024

  1. Configuration menu
    Copy the full SHA
    f17b330 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2024

  1. Configuration menu
    Copy the full SHA
    d0502e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2754c45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2bafb2 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2024

  1. Build latest Caffeine on CI (#1111)

    Fixes #1110 
    
    We can see how this goes for some time before making it a required job.
    msridhar authored Dec 23, 2024
    Configuration menu
    Copy the full SHA
    728bf77 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2024

  1. Properly handle nested generics and multiple wildcard type args in Ja…

    …rInfer (#1114)
    
    Our previous code would crash on nested generic types or when multiple
    unbounded wildcard type arguments were passed consecutively.
    msridhar authored Dec 24, 2024
    Configuration menu
    Copy the full SHA
    17df87f View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2024

  1. [refactoring] Wrap calls to Types.subst and Types.memberType (#1115)

    This is in preparation to attempt to fix #1091. Just a refactoring, no
    behavior changes.
    msridhar authored Dec 26, 2024
    Configuration menu
    Copy the full SHA
    7cb6b98 View commit details
    Browse the repository at this point in the history
  2. Proper checking of vararg overrides with JSpecify annotations (#1116)

    Fixes #1113 
    
    We weren't calling the right API to check the nullability of a varargs
    argument when checking valid overriding. Most of this PR is tests to
    check handling of most of the cases.
    msridhar authored Dec 26, 2024
    Configuration menu
    Copy the full SHA
    6d331c7 View commit details
    Browse the repository at this point in the history
  3. Add flag to indicate only @NullMarked code should be checked (#1117)

    Fixes #574 
    
    We add a new flag `OnlyNullMarked` to indicate that NullAway can only
    check code that is `@NullMarked`, and hence it is ok to omit the
    (previously required) `AnnotatedPackages` flag. We currently require
    _exactly_ one of either `AnnotatedPackages` or `OnlyNullMarked` to be
    passed in; if both flags are omitted or both flags are passed, we fail.
    
    As JSpecify and `@NullMarked` become more widely adopted, we may change
    the policy to allow neither flag to be passed (as NullAway already
    checks `@NullMarked` code out of the box). But for now, we require one
    of the flags to be passed, to avoid confusion.
    msridhar authored Dec 26, 2024
    Configuration menu
    Copy the full SHA
    43054bb View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2024

  1. Add support for static fields in contracts (#1118)

    This PR adds support for static fields in
    `@EnsureNonnull`,`EnsureNonnullIf`,`@RequiresNonnull` annotations.
    Currently the following code will throw validation errors (as well as
    the annotation handlers are unable to handle static fields). However,
    after this change, static fields for all three annotations are supported
    
    ```
    class Foo {
      @nullable static Item staticNullableItem;
    
      @EnsuresNonNull("staticNullableItem")
      public static void initializeStaticField() {
        staticNullableItem = new Item();
      }
    
      @RequiresNonNull("staticNullableItem")
      public static void useStaticField() {
        staticNullableItem.call();
      }
    
      @EnsuresNonNullIf(value="staticNullableItem", result=true)
      public static boolean hasStaticNullableItem() {
        return staticNullableItem != null;
      }
    }
    ```
    Fixes #431
    
    ---------
    
    Co-authored-by: Manu Sridharan <[email protected]>
    armughan11 and msridhar authored Dec 28, 2024
    Configuration menu
    Copy the full SHA
    aaf9f08 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2025

  1. Prepare for release 0.12.3.

    yuxincs committed Jan 6, 2025
    Configuration menu
    Copy the full SHA
    39b376c View commit details
    Browse the repository at this point in the history
Loading