@Test public void getMetaData() { DefaultMetaDataProvider provider = new DefaultMetaDataProvider(); assertThat(provider).isEqualTo(provider.init(ConfigurationContext.EMPTY)); assertThat(provider.getMetaData("foo")).isNotNull(); }
@Override public Map<String, String> getMetaData(String property) { long configHash = Objects.hash(context.getPropertySources().toArray()); if(configHash!=lastHash.get()){ lastHash.set(configHash); propertyCache = loadMetaProperties(); } Map<String, String> meta = propertyCache.get(property); if(meta==null){ return Collections.emptyMap(); } return Collections.unmodifiableMap(meta); }
DefaultMetaDataProvider implements MetadataProvider { @Override public Map<String, String> getMetaData(String property) { long configHash = Objects.hash(context.getPropertySources().toArray()); if(configHash!=lastHash.get()){ lastHash.set(configHash); propertyCache = loadMetaProperties(); } Map<String, String> meta = propertyCache.get(property); if(meta==null){ return Collections.emptyMap(); } return Collections.unmodifiableMap(meta); } }
DefaultMetaDataProvider implements MetadataProvider { @Override public Map<String, String> getMetaData(String property) { long configHash = Objects.hash(context.getPropertySources().toArray()); if(configHash!=lastHash.get()){ lastHash.set(configHash); propertyCache = loadMetaProperties(); } Map<String, String> meta = propertyCache.get(property); if(meta==null){ return Collections.emptyMap(); } return Collections.unmodifiableMap(meta); }  }
DefaultMetaDataProvider implements MetadataProvider { @Override public Map<String, String> getMetaData(String property) { long configHash = Objects.hash(context.getPropertySources().toArray()); if(configHash!=lastHash.get()){ lastHash.set(configHash); propertyCache = loadMetaProperties(); } Map<String, String> meta = propertyCache.get(property); if(meta==null){ return Collections.emptyMap(); } return Collections.unmodifiableMap(meta); }  @Override MetadataProvider init(ConfigurationContext context); @Override Map<String, String> getMetaData(String property); @Override MetadataProvider setMeta(String property, String key, String value); @Override MetadataProvider setMeta(String property, Map<String, String> metaData); @Override MetadataProvider reset(String property); @Override MetadataProvider reset(); @Override String toString(); }
DefaultMetaDataProvider implements MetadataProvider { @Override public Map<String, String> getMetaData(String property) { long configHash = Objects.hash(context.getPropertySources().toArray()); if(configHash!=lastHash.get()){ lastHash.set(configHash); propertyCache = loadMetaProperties(); } Map<String, String> meta = propertyCache.get(property); if(meta==null){ return Collections.emptyMap(); } return Collections.unmodifiableMap(meta); }  @Override MetadataProvider init(ConfigurationContext context); @Override Map<String, String> getMetaData(String property); @Override MetadataProvider setMeta(String property, String key, String value); @Override MetadataProvider setMeta(String property, Map<String, String> metaData); @Override MetadataProvider reset(String property); @Override MetadataProvider reset(); @Override String toString();  }