Skip to content

Commit 4c64695

Browse files
committed
Use pattern match instead of String.equals for package binding
Fixes 2 Signed-off-by: David Thompson <[email protected]>
1 parent 1e804f4 commit 4c64695

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/core/search/matching/DOMPackageReferenceLocator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public LocatorResponse match(Name node, NodeSetWrapper nodeSet, MatchLocator loc
4444
public LocatorResponse resolveLevel(org.eclipse.jdt.core.dom.ASTNode node, IBinding binding, MatchLocator locator) {
4545
if (binding instanceof IPackageBinding ipb) {
4646
String n = ipb.getName();
47-
String patternName = new String(this.locator.pattern.pkgName);
48-
if (patternName.equals(n)) {
47+
if (matchesName(this.locator.pattern.pkgName, n.toCharArray())) {
4948
if( this.locator.pattern.focus == null ) {
5049
// good enough
5150
return toResponse(ACCURATE_MATCH);

0 commit comments

Comments
 (0)