private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }
private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }
private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }
private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }
private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }
private void installContentHandlerFactory(BundleContext context) { ContentHandlerFactoryImpl chf = new ContentHandlerFactoryImpl(context, container); try { // first try the standard way URLConnection.setContentHandlerFactory(chf); } catch (Error err) { // ok we failed now use more drastic means to set the factory try { forceContentHandlerFactory(chf); } catch (Exception ex) { // this is unexpected, log the exception and throw the original error container.getLogServices().log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, ex.getMessage(), ex); throw err; } } contentHandlerFactory = chf; }