Skip to content

Commit

Permalink
Adding missing GRECLIPSE markers around GRECLIPSE specific fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
will-lauer committed Nov 7, 2016
1 parent fca0982 commit 97d3f4b
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ private void checkGenericsUsage(ClassNode n, ClassNode cn) {
for (int i=0; i<nTypes.length; i++) {
ClassNode nType = nTypes[i].getType();
ClassNode cnType = cnTypes[i].getType();
/// GRECLIPSE: start: added isWildcard
/*old{
if (!nType.isDerivedFrom(cnType)) {
}*/
// newcode
if (!nTypes[i].isWildcard() && !nType.isDerivedFrom(cnType)) {
// GRECLIPSE: end
if (cnType.isInterface() && nType.implementsInterface(cnType)) continue;
addError("The type "+nTypes[i].getName()+
" is not a valid substitute for the bounded parameter <"+
Expand All @@ -122,11 +128,23 @@ private String getPrintName(GenericsType gt) {
if (upperBounds!=null) {
ret += " extends ";
for (int i = 0; i < upperBounds.length; i++) {
/// GRECLIPSE: start: don't recurse on names
/*old{
ret += getPrintName(upperBounds[i]);
}*/
// newcode
ret += upperBounds[i].getName();
// GRECLIPSE: end
if (i+1<upperBounds.length) ret += " & ";
}
} else if (lowerBound!=null) {
/// GRECLIPSE: start: don't recurse on names
/*old{
ret += " super "+getPrintName(lowerBound);
}*/
// newcode
ret += " super "+ lowerBound.getName();
// GRECLIPSE: end
}
return ret;

Expand Down

0 comments on commit 97d3f4b

Please sign in to comment.