if (reference == contentHandlerServiceReference) {  ServiceReference newReference = contentHandlerServiceTracker.getServiceReference(); if (newReference != null) { setNewHandler(newReference, getRank(newReference)); } else { ranking = -1; realHandler = new DefaultContentHandler(); } } context.ungetService(reference);
if (reference != contentHandlerServiceReference) return;   ServiceReference newReference = contentHandlerServiceTracker.getServiceReference();  setNewHandler(newReference, getRank(newReference));
	public void removedService(ServiceReference reference, Object service) {		//check to see if our URLStreamHandler was unregistered.  If so, look 		//for a lower ranking URLHandler		//TODO invert test and return quickly, to reduce indentation		if (reference == contentHandlerServiceReference) {			//this should get us the highest ranking service left, if available			ServiceReference newReference = contentHandlerServiceTracker.getServiceReference();			if (newReference != null) {				setNewHandler(newReference, getRank(newReference));			} else {				ranking = -1;				realHandler = new DefaultContentHandler();			}		}		context.ungetService(reference);	}