if (DEBUG) { if ((cachedReference == null) &&(cachedService == null)) { System.out.println("ServiceTracker.close[cached cleared]: "+filter); } }
    public synchronized void close()    {        if (tracked != null)        {            if (DEBUG)            {                System.out.println("ServiceTracker.close: "+filter);            }            tracked.close();            ServiceReference references[] = getServiceReferences();            Tracked outgoing = tracked;            tracked = null;            try            {                context.removeServiceListener(outgoing);            }            catch (IllegalStateException e)            {                /* In case the context was stopped. */            }            if (references != null)            {                for (int i = 0; i < references.length; i++)                {                    outgoing.untrack(references[i]);                }            }        }    }