modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java

This commit is contained in:
AluAli 2021-03-26 15:24:15 +01:00
parent a4c38b2bb0
commit f5f639c0f7

View File

@ -664,16 +664,31 @@ public class FamilyOfGeneratedGenerics {
Pair pairUndCons2 = itUndCons.next();
boolean rEqRtilde = (tphR == pairUndCons2.TA1);
boolean rExRtilde = (tphR == pairUndCons2.TA1);
Pair rExRtildePair = new Pair(resSet.resolveType((TypePlaceholder) (tphR)).resolvedType, resSet.resolveType((TypePlaceholder) (pairExtends2.TA2)).resolvedType, PairOperator.SMALLERDOT);
boolean isPairInTExTapostrophe = checkForDuplicatesForSets(rExRtildePair, extendsSet);
// Pair rExRtildePair = new Pair(resSet.resolveType((TypePlaceholder) (tphR)).resolvedType, resSet.resolveType((TypePlaceholder) (pairExtends2.TA2)).resolvedType, PairOperator.SMALLERDOT);
boolean isPairInTExTapostrophe = false;
// Constraint<Pair> allOfOr = new Constraint<Pair>();
for(Set<Constraint<Pair>> scp: orCons) {
Iterator<Constraint<Pair>> itSCP = scp.iterator();
while(itSCP.hasNext()) {
Constraint<Pair> cp = itSCP.next();
Iterator<Pair> itCP = cp.iterator();
while(itCP.hasNext()) {
Pair p = itCP.next();
if(p.OperatorSmallerDot()) {
isPairInTExTapostrophe = tphR == p.TA1;
}
}
}
}
if (rEqRtilde || rExRtilde || isPairInTExTapostrophe) {
if (newPair2.TA1 != newPair2.TA2) { //eliminieren der Fälle wie AA<.AA
if (!checkForDuplicatesForSets(newPair2, tempSet2)) {
tempSet2.add(pairExtends2);
if (!checkForDuplicatesForSets(newPair2, tempSet2))
tempSet2.add(newPair2);
}
}
if (!checkForDuplicatesForSets(pairExtends2, tempSet2))
tempSet2.add(pairExtends2);
}
}