diff --git a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java index 358c6d34..3f98a42b 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java @@ -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 allOfOr = new Constraint(); + for(Set> scp: orCons) { + Iterator> itSCP = scp.iterator(); + while(itSCP.hasNext()) { + Constraint cp = itSCP.next(); + Iterator 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); } }