コード例 #1
0
 private WriteOwner requireOwner() {
   final WriteOwner owner = WRITE_OWNER.peek();
   if (owner == null) {
     throw MESSAGES.readOnlyNamingContext();
   }
   return owner;
 }
コード例 #2
0
 /**
  * Get the current context selector for the current thread.
  *
  * @return The current context selector.
  */
 public static NamespaceContextSelector getCurrentSelector() {
   NamespaceContextSelector selector = currentSelector.peek();
   if (selector != null) {
     return selector;
   }
   return defaultSelector;
 }