From f5f639c0f74a1788a3351c8c9c446cccf40581ea Mon Sep 17 00:00:00 2001 From: AluAli Date: Fri, 26 Mar 2021 15:24:15 +0100 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java --- .../FamilyOfGeneratedGenerics.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) 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); } }