-
Notifications
You must be signed in to change notification settings - Fork 86
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
AJC core dump when mixing type name wildcards with generics #211
Comments
BTW, despite not causing any exceptions, patterns like
are not matching either. I.e., even beyond the problem above there is something fundamentally wrong with generic type parameter matching in connection with array types. For non-array types, pointcuts such as
would match a method like
would cause the same |
This is like a can of worms. I think I am understanding it better now, but there are several issues here:
|
Fixes #211. Previously, '?' was not converted to '*' in UnresolvedType.nameToSignature, but kept as-is. That is why - falsely - it was necessary to handle the '?' case in UnresolvedType.forSignature at all, reading this kind of bogus signature and creating a type for it in TypeFactory.createTypeFromSignature. This, ironically, led to correct JVM generic type signatures containing '*' not being handled at all. The conversion should now work correctly both ways. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Fixes #211. Previously, '?' was not converted to '*' in UnresolvedType.nameToSignature, but kept as-is. That is why - falsely - it was necessary to handle the '?' case in UnresolvedType.forSignature at all, reading this kind of bogus signature and creating a type for it in TypeFactory.createTypeFromSignature. This, ironically, led to correct JVM generic type signatures containing '*' not being handled at all. The conversion should now work correctly both ways. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
# Conflicts: # pom.xml # tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml
Fixes #211. Previously, '?' was not converted to '*' in UnresolvedType.nameToSignature, but kept as-is. That is why - falsely - it was necessary to handle the '?' case in UnresolvedType.forSignature at all, reading this kind of bogus signature and creating a type for it in TypeFactory.createTypeFromSignature. This, ironically, led to correct JVM generic type signatures containing '*' not being handled at all. The conversion should now work correctly both ways. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Fixes #211. Previously, '?' was not converted to '*' in UnresolvedType.nameToSignature, but kept as-is. That is why - falsely - it was necessary to handle the '?' case in UnresolvedType.forSignature at all, reading this kind of bogus signature and creating a type for it in TypeFactory.createTypeFromSignature. This, ironically, led to correct JVM generic type signatures containing '*' not being handled at all. The conversion should now work correctly both ways. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Commit 5383736 contains an inactive test case reproducing a new problem I found by chance when fixing a failing test after the code changes for #24:
https://github.com/eclipse/org.aspectj/blob/53837367b0f04a20aab530741ea7a24a42e309e5/tests/bugs165/pr272233/Iffy2.java#L44-L45
Further up in the same class you see working variations of that syntax.
The corresponding ajcore.*.txt file says:
The text was updated successfully, but these errors were encountered: