File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/main/java/gr/uom/java/xmi/diff Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ else if(tagBefore.isReturn() && tagAfter.isReturn()) {
166166 }
167167 else if (tagBefore .isThrows () && tagAfter .isThrows ()) {
168168 boolean match = processModifiedTags (tagBefore , tagAfter );
169- if (match ) {
169+ if (match && ! throwsTagAlreadyMatchedWithSameType ( tagAfter ) ) {
170170 deletedToBeDeleted .add (tagBefore );
171171 addedToBeDeleted .add (tagAfter );
172172 Pair <UMLTagElement , UMLTagElement > pair = Pair .of (tagBefore , tagAfter );
@@ -235,6 +235,15 @@ else if(tagBefore.isSee() && tagAfter.isSee()) {
235235 this .addedTags .addAll (addedTags );
236236 }
237237
238+ private boolean throwsTagAlreadyMatchedWithSameType (UMLTagElement tagAfter ) {
239+ for (Pair <UMLTagElement , UMLTagElement > pair : commonTags ) {
240+ if (pair .getRight ().equals (tagAfter ) && pair .getLeft ().getFragments ().get (0 ).equals (pair .getRight ().getFragments ().get (0 ))) {
241+ return true ;
242+ }
243+ }
244+ return false ;
245+ }
246+
238247 private void matchNestedTags (UMLTagElement tagBefore , UMLTagElement tagAfter ) {
239248 List <UMLTagElement > nestedTagsBefore = tagBefore .getNestedTags ();
240249 List <UMLTagElement > nestedTagsAfter = tagAfter .getNestedTags ();
You can’t perform that action at this time.
0 commit comments