/*
private OutboxAmp getCurrentOutbox()
{
Outbox<MessageAmp> outboxDeliver = OutboxThreadLocal.getCurrent();

if (outboxDeliver instanceof OutboxAmp) {
OutboxAmp outbox = (OutboxAmp) outboxDeliver;

return outbox;
}
else {
return null;
}
}
497248
@Override
  public <V> void streamResult(ResultStream<V> result, long timeout,
                               ServiceRefAmp serviceRef, MethodAmp method,
                               Object[] args)
  {
    // TODO Auto-generated method stub
    
  }
646500
public Object current() {
        assert ctx.executor().inEventLoop();
        PendingWrite write = head;
        if (write == null) {
            return null;
        }
        return write.msg;
    }
154029
@Override
    public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> env)
                    throws Exception {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        // -----------------------------------------------------------------------
        // Is obj a Reference?
        // -----------------------------------------------------------------------
        if (!(obj instanceof Reference)) {
            return null;
        }

        Reference ref = (Reference) obj;

        // -----------------------------------------------------------------------
        // Is the right factory for this reference?
        // -----------------------------------------------------------------------
        if (!ivInstanceClassName.equals(ref.getFactoryClassName())) {
            return null;
        }

        // -----------------------------------------------------------------------
        // Is address null?
        // -----------------------------------------------------------------------
        RefAddr addr = ref.get(Addr_Type);
        if (addr == null) {
            NamingException nex = new NamingException("The address for this Reference is empty (null)");
            throw nex;
        }

        // -----------------------------------------------------------------------
        // Reference has the right factory and non empty address, so it is OK
        // to generate the EntityManager or EntityManagerFactory object now.
        // -----------------------------------------------------------------------

        Object retObj = null;

        JPAJndiLookupInfo info = (JPAJndiLookupInfo) addr.getContent();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.debug(tc, "getting EntityManagerFactory for " + info);

        JPAPuId puId = info.getPuId(); // d424494
        J2EEName j2eeName = info.getJ2EEName(); // d510184
        String refName = info.getReferenceName(); // d510184
        boolean isSFSB = checkSFSBAccess(info, info.isSFSB()); // F743-30682
        JPAComponent jpaService = JPAAccessor.getJPAComponent();

        //Check to see see if we can delegate to the OSGi-aware JPA container
        JPALookupDelegate delegate = lookupDelegate.get();

        // If we find a delegate then call it to see if it can provide the Object
        if (delegate != null) {
            // Call the right method
            if (info.isFactory())
                retObj = delegate.getEntityManagerFactory(puId.getPuName(), j2eeName);
            else
                retObj = delegate.getEntityManager(puId.getPuName(), j2eeName, info.isExtendedContextType(), info.getPersistenceProperties());
        }

        if (retObj == null) {
            if (info.isFactory()) {
                retObj = jpaService.getEntityManagerFactory(puId,
                                                            j2eeName,
                                                            USE_EMF_PROXY_VALUE || isSFSB); // d706751
            } else {
                Map<?, ?> pCtxtProperties = info.getPersistenceProperties();
                retObj = jpaService.getEntityManager(puId,
                                                     j2eeName,
                                                     refName,
                                                     info.isExtendedContextType(),
                                                     info.isUnsynchronized(),
                                                     pCtxtProperties);

            }
        }

        return retObj;
    }
1137985
private static Component getCurrentModal_(RootPaneContainer rootPane) {
	synchronized (modals) {
	  Modal modal = modals.get(rootPane);
	  if (modal != null) {
		if (modal.getSize() > 0) {
		  return modal.components.get(modal.components.size() - 1);
		}
	  }
	  return null;
	}
  }
337794
public BoundingBox getBoundingBox() {
		BoundingBox boundingBox = null;
		if (minX != null && maxX != null && minY != null && maxY != null) {
			boundingBox = new BoundingBox(getMinX(), getMinY(), getMaxX(),
					getMaxY());
		}
		return boundingBox;
	}
1053336
public int readMessages(Reader is, OutboxAmp outbox)
    throws IOException
  {
    Objects.requireNonNull(outbox);
    
    JsonReaderImpl jIn = new JsonReaderImpl(is, _jsonFactory);
      
    return readMessages(jIn, outbox);
  }
649953
public MessageTransport getMessageTransport(String strMessageTransport)
    {
        if ((strMessageTransport == null) || (strMessageTransport.length() == 0))
            return null;
        if (Utility.isNumeric(strMessageTransport))
        {
            this.setKeyArea(MessageTransport.ID_KEY);
            this.getField(MessageTransport.ID).setString(strMessageTransport);  
        }
        else
        {
            this.setKeyArea(MessageTransport.CODE_KEY);
            this.getField(MessageTransport.CODE).setString(strMessageTransport);
        }
        try {
            if (this.seek(null))
                return this;
        } catch (DBException ex) {
            ex.printStackTrace();
        }
        return null;
    }
1256621
@Override
  public InetSocketAddress ipRemote()
  {
    SocketChannel s = _channel;
    
    if (s != null) {
      try {
        return (InetSocketAddress) s.getRemoteAddress();
      } catch (IOException e) {
        return null;
        //throw new RuntimeException(e);
      }
    }
    else {
      return null;
    }
  }
789965
public SoundCloudTrack getCurrentTrack() {
        if (mCurrentTrackIndex > -1 && mCurrentTrackIndex < mSoundCloudPlaylist.getTracks().size()) {
            return mSoundCloudPlaylist.getTracks().get(mCurrentTrackIndex);
        }
        return null;
    }
362048
@SuppressWarnings("unchecked")
    public <T> T readOutbound() {
        T message =  (T) poll(outboundMessages);
        if (message != null) {
            ReferenceCountUtil.touch(message, "Caller of readOutbound() will handle the message from this point.");
        }
        return message;
    }
872872
SocketAddress getLocalSocketAddress() {
        // a lot could go wrong here, so rather than put in a bunch of code
        // to check for nulls all down the chain let's do it the simple
        // yet bulletproof way
        try {
            return ((SocketChannel) sendThread.sockKey.channel()).socket()
                    .getLocalSocketAddress();
        } catch (NullPointerException e) {
            return null;
        }
    }
679478
function() {
            var element = this._element;
            while (element.parentNode) {
                element = element.parentNode;
                if (element.$widget) {
                    return element.$widget;
                }
            }
            return null;
        }
492589
@Exported(name="currentExecutable")
    @Restricted(DoNotUse.class) // for exporting only
    public Queue.Executable getCurrentExecutableForApi() {
        Executable candidate = getCurrentExecutable();
        return candidate instanceof AccessControlled && ((AccessControlled) candidate).hasPermission(Item.READ) ? candidate : null;
    }
995816
OutboundTcpConnection getConnection(MessageOut msg)
    {
        Stage stage = msg.getStage();
        return stage == Stage.REQUEST_RESPONSE || stage == Stage.INTERNAL_RESPONSE || stage == Stage.GOSSIP
               ? ackCon
               : cmdCon;
    }
1269346
@SuppressWarnings("unchecked")
    public T get() {
        if (HystrixRequestContext.getContextForCurrentThread() == null) {
            throw new IllegalStateException(HystrixRequestContext.class.getSimpleName() + ".initializeContext() must be called at the beginning of each request before RequestVariable functionality can be used.");
        }
        ConcurrentHashMap<HystrixRequestVariableDefault<?>, LazyInitializer<?>> variableMap = HystrixRequestContext.getContextForCurrentThread().state;

        // short-circuit the synchronized path below if we already have the value in the ConcurrentHashMap
        LazyInitializer<?> v = variableMap.get(this);
        if (v != null) {
            return (T) v.get();
        }

        /*
         * Optimistically create a LazyInitializer to put into the ConcurrentHashMap.
         * 
         * The LazyInitializer will not invoke initialValue() unless the get() method is invoked
         * so we can optimistically instantiate LazyInitializer and then discard for garbage collection
         * if the putIfAbsent fails.
         * 
         * Whichever instance of LazyInitializer succeeds will then have get() invoked which will call
         * the initialValue() method once-and-only-once.
         */
        LazyInitializer<T> l = new LazyInitializer<T>(this);
        LazyInitializer<?> existing = variableMap.putIfAbsent(this, l);
        if (existing == null) {
            /*
             * We won the thread-race so can use 'l' that we just created.
             */
            return l.get();
        } else {
            /*
             * We lost the thread-race so let 'l' be garbage collected and instead return 'existing'
             */
            return (T) existing.get();
        }
    }
686812
public Class<?> getType()
    {
        if ( this == Primitive.VOID )
            return Void.TYPE;

        // NULL return null as type... we currently use null type to indicate
        // loose typing throughout bsh.
        if ( this == Primitive.NULL )
            return null;

        return unboxType( value.getClass() );
    }
28607
@Override
    public MessageListener getMessageListener() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMessageListener");

        MessageListener messageListener = null;

        try {
            messageListener = messageConsumer.getMessageListener();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "getMessageListener", messageListener);
        }

        return messageListener;
    }