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

[BUG] FIELD location not being handled #622

Closed
1 task done
jmle opened this issue Jun 19, 2024 · 1 comment · Fixed by konveyor/java-analyzer-bundle#96 or #628
Closed
1 task done

[BUG] FIELD location not being handled #622

jmle opened this issue Jun 19, 2024 · 1 comment · Fixed by konveyor/java-analyzer-bundle#96 or #628
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Milestone

Comments

@jmle
Copy link
Contributor

jmle commented Jun 19, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Konveyor version

latest as of issue creation

Priority

Critical

Current Behavior

The following condition:

  when:
    java.referenced:
      pattern: java.lang.String
      location: FIELD

does not match against

public Class Person {
  private String name;
}

Expected Behavior

The FIELD location should be available and work, so that we can match against fields of a given type.

How Reproducible

Always (Default)

Steps To Reproduce

  1. Create a custom rule with the given condition
  2. Have a String field to be matched against in the application to be analyzed, within any class
  3. Run an analysis
  4. See how no matches are found

Environment

No response

Anything else?

FIELD and FIELD_DECLARATION are the same. FIELD_DECLARATION was used in windup, while it looks like jdt.ls uses FIELD instead.

@jmle jmle added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 19, 2024
@jmle jmle changed the title [BUG] FIELD_DECLARATION location not being handled [BUG] FIELD location not being handled Jun 19, 2024
@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label Jun 19, 2024
@dymurray dymurray added this to the v0.5.0 milestone Jun 19, 2024
@jmle jmle self-assigned this Jun 25, 2024
jmle added a commit that referenced this issue Jul 2, 2024
Enables rule authors to create `java.referenced` conditions with
`location: FIELD`.

- Bundle PR: 96
- Fixes #622

---------

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Status: ✅ Done
2 participants