]> source.dussan.org Git - aspectj.git/commit
NotTypePattern: Fix matching problem for negated type patterns
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 23 Aug 2023 02:33:21 +0000 (09:33 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 23 Aug 2023 03:39:24 +0000 (10:39 +0700)
commit73e86eb9dc6825e8d8bade57a04e0e5289d78f8a
tree22855ec034129f49cb32e368bb304a4a3ae25ef8
parentc708962d7e0341133790bf7315257db7aa5acc86
NotTypePattern: Fix matching problem for negated type patterns

The implementation for boolean matchesArray(UnresolvedType type) was
buggy.

'!String' should match anything but String, no matter if it is
an array or not, e.g. int, void, int[], String[], String[][].

'!String[]' should match anything but String[], no matter if it is
an array or not, e.g. int, void, int[], String, String[][].

Fixes #257.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/NotTypePattern.java