@Test public void testReadWhenNoConfigFileProperty() throws IOException { propertyReader.readDescriptors(); assertTrue(propertyReader.cache.isEmpty()); }
@Override protected void readDescriptors() { try { final InputStream in = getConfigurationStream(getConfig()); if (in == null) { return; } final JAXBContext context = JAXBContext.newInstance(FeatureDescriptors.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); final FeatureDescriptors descriptors = (FeatureDescriptors) unmarshaller .unmarshal(in); cache.clear(); if (descriptors != null && descriptors.getFeatures() != null) { for (final FeatureDescriptor descriptor : descriptors.getFeatures()) { cache.put(descriptor.getName(), descriptor); } } } catch (final JAXBException ex) { Logger.getLogger(XmlPropertyReader.class.getName()).log(Level.WARNING, null, ex); } }
XmlPropertyReader extends RefreshablePropertyReader { @Override protected void readDescriptors() { try { final InputStream in = getConfigurationStream(getConfig()); if (in == null) { return; } final JAXBContext context = JAXBContext.newInstance(FeatureDescriptors.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); final FeatureDescriptors descriptors = (FeatureDescriptors) unmarshaller .unmarshal(in); cache.clear(); if (descriptors != null && descriptors.getFeatures() != null) { for (final FeatureDescriptor descriptor : descriptors.getFeatures()) { cache.put(descriptor.getName(), descriptor); } } } catch (final JAXBException ex) { Logger.getLogger(XmlPropertyReader.class.getName()).log(Level.WARNING, null, ex); } } }
XmlPropertyReader extends RefreshablePropertyReader { @Override protected void readDescriptors() { try { final InputStream in = getConfigurationStream(getConfig()); if (in == null) { return; } final JAXBContext context = JAXBContext.newInstance(FeatureDescriptors.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); final FeatureDescriptors descriptors = (FeatureDescriptors) unmarshaller .unmarshal(in); cache.clear(); if (descriptors != null && descriptors.getFeatures() != null) { for (final FeatureDescriptor descriptor : descriptors.getFeatures()) { cache.put(descriptor.getName(), descriptor); } } } catch (final JAXBException ex) { Logger.getLogger(XmlPropertyReader.class.getName()).log(Level.WARNING, null, ex); } } XmlPropertyReader(ClassLoader resourceClassLoader);  XmlPropertyReader(); }
XmlPropertyReader extends RefreshablePropertyReader { @Override protected void readDescriptors() { try { final InputStream in = getConfigurationStream(getConfig()); if (in == null) { return; } final JAXBContext context = JAXBContext.newInstance(FeatureDescriptors.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); final FeatureDescriptors descriptors = (FeatureDescriptors) unmarshaller .unmarshal(in); cache.clear(); if (descriptors != null && descriptors.getFeatures() != null) { for (final FeatureDescriptor descriptor : descriptors.getFeatures()) { cache.put(descriptor.getName(), descriptor); } } } catch (final JAXBException ex) { Logger.getLogger(XmlPropertyReader.class.getName()).log(Level.WARNING, null, ex); } } XmlPropertyReader(ClassLoader resourceClassLoader);  XmlPropertyReader();  }
XmlPropertyReader extends RefreshablePropertyReader { @Override protected void readDescriptors() { try { final InputStream in = getConfigurationStream(getConfig()); if (in == null) { return; } final JAXBContext context = JAXBContext.newInstance(FeatureDescriptors.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); final FeatureDescriptors descriptors = (FeatureDescriptors) unmarshaller .unmarshal(in); cache.clear(); if (descriptors != null && descriptors.getFeatures() != null) { for (final FeatureDescriptor descriptor : descriptors.getFeatures()) { cache.put(descriptor.getName(), descriptor); } } } catch (final JAXBException ex) { Logger.getLogger(XmlPropertyReader.class.getName()).log(Level.WARNING, null, ex); } } XmlPropertyReader(ClassLoader resourceClassLoader);  XmlPropertyReader();  static final String CONFIG_PROPERTY; static final String CONFIG_FILE_NAME; }