summaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2017-09-27 14:15:38 -0700
committerAndy Clement <aclement@pivotal.io>2017-09-27 14:15:38 -0700
commitd7cb30379a1da09c2a60a906816f6f6ba29ee103 (patch)
tree88c9c5db663d3b5af84c1fb6a3a4a33f5057cc08 /org.aspectj.matcher
parentc39bd7440cbc3f0d845d3f885b9d4827af4d481f (diff)
downloadaspectj-d7cb30379a1da09c2a60a906816f6f6ba29ee103.tar.gz
aspectj-d7cb30379a1da09c2a60a906816f6f6ba29ee103.zip
Added commentary on a strange bit of code
I don't want to change that code until I see more evidence of it misbehaving but I'm having trouble working out why it is there!
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
index 65fdf3a95..7dc162a16 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@@ -376,10 +376,16 @@ public class ReferenceType extends ResolvedType {
if (this.isFinal() || other.isFinal()) {
return false;
}
+
+ // 20170927: What is the block of code for? It mentions jls5.5 which isn't on this topic (old version of jls?)
+ // Some possible references: http://docs.oracle.com/javase/specs/jls/se9/jls9.pdf 5.1.6 (narrowing reference conversion)
+ // On Java 9 the test GenericsTests.testAfterReturningWithWildcardVar will fail because this code below
+ // used to find Set and List were the same, but now finds they are not. (so it doesn't put out the unchecked
+ // conversion message). However the code "List l = (List)someSet;" still compiles on 9 - so is this code bogus?
+
// ??? needs to be Methods, not just declared methods? JLS 5.5 unclear
ResolvedMember[] a = getDeclaredMethods();
- ResolvedMember[] b = other.getDeclaredMethods(); // ??? is this cast
- // always safe
+ ResolvedMember[] b = other.getDeclaredMethods();
for (int ai = 0, alen = a.length; ai < alen; ai++) {
for (int bi = 0, blen = b.length; bi < blen; bi++) {
if (!b[bi].isCompatibleWith(a[ai])) {