Skip to content

Commit 50988de

Browse files
Close for now API that exposes one to one relationship for waiting tags
DEVSIX-1236
1 parent a565978 commit 50988de

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/tagutils/WaitingTagsManager.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* </p>
1717
* <p>
1818
* Waiting state of tags is defined by the association with arbitrary objects instances.
19-
* This mapping is one to one: for every waiting tag there is always exactly one associated object.
2019
* </p>
2120
* Waiting state could also be perceived as a temporal association of the object to some particular tag.
2221
*/
@@ -75,16 +74,16 @@ public boolean tryMovePointerToWaitingTag(TagTreePointer tagPointer, Object asso
7574
return false;
7675
}
7776

78-
/**
79-
* Gets an object that is associated with the tag (if there is one) at which given {@link TagTreePointer} points.
80-
* Essentially, this method could be used as indication that current tag has waiting state.
81-
* @param pointer a {@link TagTreePointer} which points at the tag for which associated object is to be retrieved.
82-
* @return an object that is associated with the tag at which given {@link TagTreePointer} points, or null if
83-
* current tag of the {@link TagTreePointer} is not a waiting tag.
84-
*/
85-
public Object getAssociatedObject(TagTreePointer pointer) {
86-
return getObjForStructDict(pointer.getCurrentStructElem().getPdfObject());
87-
}
77+
// /**
78+
// * Gets an object that is associated with the tag (if there is one) at which given {@link TagTreePointer} points.
79+
// * Essentially, this method could be used as indication that current tag has waiting state.
80+
// * @param pointer a {@link TagTreePointer} which points at the tag for which associated object is to be retrieved.
81+
// * @return an object that is associated with the tag at which given {@link TagTreePointer} points, or null if
82+
// * current tag of the {@link TagTreePointer} is not a waiting tag.
83+
// */
84+
// public Object getAssociatedObject(TagTreePointer pointer) {
85+
// return getObjForStructDict(pointer.getCurrentStructElem().getPdfObject());
86+
// }
8887

8988
/**
9089
* Removes waiting state of the tag which is associated with the given object.

kernel/src/test/java/com/itextpdf/kernel/pdf/TagTreePointerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public void tagTreePointerTest06() throws Exception {
296296
tagPointer.getProperties().setActualText(actualText1);
297297

298298
WaitingTagsManager waitingTagsManager = document.getTagStructureContext().getWaitingTagsManager();
299-
assertNull(waitingTagsManager.getAssociatedObject(tagPointer));
299+
// assertNull(waitingTagsManager.getAssociatedObject(tagPointer));
300300
Object associatedObj = new Object();
301301
waitingTagsManager.assignWaitingState(tagPointer, associatedObj);
302302

0 commit comments

Comments
 (0)