code: protected Collection<ReadLock> getReadLocks() {
  
          // internally ownerTags.size() (WeakHashMap) contains synchronization
          // better avoid calling it
          // normally there will be one sharedObject so the capacity may be
          // considered as 2 because the load factor is 0.75f
          final Collection<ReadLock> readLocks = new HashSet<>(2);
  
          for (final AbstractHtml ownerTag : ownerTags) {
              final ReadLock readLock = ownerTag.getSharedObject()
                      .getLock(ACCESS_OBJECT).readLock();
              if (readLock != null) {
                  readLocks.add(readLock);
              }
          }
  
          return readLocks;
      }
docs: NB: this may not return the same locks as there could be the its
  ownerTags change. So call only once and reuse it for both lock and unlock
  call.
  
  @return the set of read locks