Skip to content
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

[null] Incomplete handling of @NonNullByDefault - fixes #682 #683

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

stephan-herrmann
Copy link
Contributor

  • applying @NNBD to a type parameter needs to know, whether on demand resolving has already happened (to detect explicit null annotations)
    • ASTNode.resolveAnnotations
    • STB.maybeMarkTypeParametersNonNull
  • better distinction if null tag bits result from @NNBD or explicit anno
    • ASTNode.mergeAnnotationsIntoType - may now report redundance
    • fix withdrawal of contradiction null annots after these changes
  • more detection of redundance below @NNBD
    • TypeParameter.resolveAnnotations
    • TypeReference.resolveAnnotations - one focus on annots on dimensions
    • MethodBinding.fillInDefaultNonNullness18 - less reporting here
    • ProblemReporter.nullAnnotationIsRedundant
      • 2 more overloads
      • fine tuning of error positions
  • be careful not to apply @NNBD to typevar (when using TYPE_USE)
    • new methods {Scope,STB}.hasDefaultNullnessForType()
  • expect redundance warning in may more tests
    • NullTypeAnnotationTest
    • NullAnnotationBatchCompilerTest
  • new tests from Bugs 522142 and 499596

@stephan-herrmann stephan-herrmann added this to the 4.27 M3 milestone Jan 31, 2023
@stephan-herrmann stephan-herrmann linked an issue Jan 31, 2023 that may be closed by this pull request
+ applying @NNBD to a type parameter needs to know, whether on demand
  resolving has already happened (to detect explicit null annotations)
  - ASTNode.resolveAnnotations
  - STB.maybeMarkTypeParametersNonNull
+ better distinction if null tag bits result from @NNBD or explicit anno
  - ASTNode.mergeAnnotationsIntoType
    - may now report redundance
    - fix withdrawal of contradiction null annots after these changes
+ more detection of redundance below @NNBD
  - TypeParameter.resolveAnnotations
  - TypeReference.resolveAnnotations - one focus on annots on dimensions
  - MethodBinding.fillInDefaultNonNullness18 - less reporting here
  - ProblemReporter.nullAnnotationIsRedundant
    - 2 more overloads
    - fine tuning of error positions
+ be careful not to apply @NNBD to typevar (when using TYPE_USE)
  - new methods {Scope,STB}.hasDefaultNullnessForType()
+ expect redundance warning in may more tests
  - NullTypeAnnotationTest
  - NullAnnotationBatchCompilerTest
+ ignore newly reported warnings in other tests:
  - IncrementalTests18.testBug483744_remove
  - ExternalAnnotations18Test (several)
+ new tests from Bugs 522142 and 499596
@akurtakov
Copy link
Contributor

A version bump is needed as can be seen at https://download.eclipse.org/eclipse/downloads/drops4/I20230202-1800/buildlogs/reporeports/reports/versionChecks.html :

org.eclipse.jdt.core.tests.builder 3.11.250.v20221114-0556 3.11.250.v20230202-1248

@stephan-herrmann stephan-herrmann deleted the issue682 branch February 4, 2023 17:29
stephan-herrmann added a commit to stephan-herrmann/eclipse.jdt.core that referenced this pull request Feb 4, 2023
stephan-herrmann added a commit to stephan-herrmann/eclipse.jdt.core that referenced this pull request Feb 4, 2023
stephan-herrmann added a commit to stephan-herrmann/eclipse.jdt.core that referenced this pull request Feb 6, 2023
iloveeclipse pushed a commit that referenced this pull request Feb 7, 2023
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this pull request Jul 18, 2024
… (eclipse-jdt#683)

+ applying @NNBD to a type parameter needs to know, whether on demand
  resolving has already happened (to detect explicit null annotations)
  - ASTNode.resolveAnnotations
  - STB.maybeMarkTypeParametersNonNull
+ better distinction if null tag bits result from @NNBD or explicit anno
  - ASTNode.mergeAnnotationsIntoType
    - may now report redundance
    - fix withdrawal of contradiction null annots after these changes
+ more detection of redundance below @NNBD
  - TypeParameter.resolveAnnotations
  - TypeReference.resolveAnnotations - one focus on annots on dimensions
  - MethodBinding.fillInDefaultNonNullness18 - less reporting here
  - ProblemReporter.nullAnnotationIsRedundant
    - 2 more overloads
    - fine tuning of error positions
+ be careful not to apply @NNBD to typevar (when using TYPE_USE)
  - new methods {Scope,STB}.hasDefaultNullnessForType()
+ expect redundance warning in may more tests
  - NullTypeAnnotationTest
  - NullAnnotationBatchCompilerTest
+ ignore newly reported warnings in other tests:
  - IncrementalTests18.testBug483744_remove
  - ExternalAnnotations18Test (several)
+ new tests from Bugs 522142 and 499596
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this pull request Jul 18, 2024
robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[null] Incomplete handling of @NonNullByDefault
2 participants