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

fix: keep track of declaring type for nested field accesses #5408

Merged
merged 5 commits into from
Aug 30, 2023

Commits on Aug 28, 2023

  1. Configuration menu
    Copy the full SHA
    7d40726 View commit details
    Browse the repository at this point in the history
  2. Refactor input resource setup in FieldTest

    This commit enhances readability by restructuring how the input resource 'Example' class is added in the 'testArrayLengthDeclaringTypeNested' method within FieldTest. The addition process is now within a single method call to 'addInputResource', improving code clarity and maintainability without altering functionality.
    SirYwell committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    d1a327b View commit details
    Browse the repository at this point in the history
  3. Fix null pointer in JDTTreeBuilderHelper

    This commit addresses a potential null pointer exception in JDTTreeBuilderHelper.java. It occurred due to 'no classpath mode' which may cause variable 'b' to be null. By adding a null check, it ensures 'b' is not null before accessing its properties, increasing the stability of the program.
    SirYwell committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    f074282 View commit details
    Browse the repository at this point in the history
  4. Add @nullable annotation to TypeBinding parameters

    Added @nullable annotation to two functions in ReferenceBuilder.java and JDTTreeBuilderHelper.java. These functions are getVariableReference() in ReferenceBuilder and declaringType variable in JDTTreeBuilderHelper. The Nullable annotation is useful as the TypeBinding parameter can at times be null, particularly when running the program in 'no classpath' mode. This reduces the risk of throwing a null pointer exception and increases overall code robustness.
    SirYwell committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a86af99 View commit details
    Browse the repository at this point in the history
  5. Disable AssignmentToNull check in qodana.yaml

    Disabled the AssignmentToNull check in qodana.yaml due to its lack of support for nullability annotations. Commented out the line to maintain code clarity for future reference. This change enhances program performance when running in 'no classpath' mode and prevents potential NullPointerException. It contributes to the overall robustness of the code.
    SirYwell committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    f5ae2e8 View commit details
    Browse the repository at this point in the history