Skip to content

Commit

Permalink
Add test case for issue #384
Browse files Browse the repository at this point in the history
  • Loading branch information
adambir committed Oct 30, 2024
1 parent 286d4ee commit cf702d2
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -727,4 +727,32 @@ interface A {
)
);
}

@Issue("https://github.com/openrewrite/rewrite-static-analysis/issues/384")
@Test
void staticWithObjectArray() {
rewriteRun(
//language=java
java(
"""
class A {
public void method() {
Object[] args = null;
args = new Object[] {"value"};
}
}
""",
"""
class A {
public void method() {
Object[] args = null;
args = new Object[] {"value"};
}
}
"""
)
);
}


}

0 comments on commit cf702d2

Please sign in to comment.