@Test public void load() throws Exception { final int[] expected = {1, 2, 3, 4}; final KarafConfigFile karafConfigFile = new KarafConfigFile(KARAF_ETC, "etc/ints_4.config"); karafConfigFile.load(); final int[] ints = (int[]) karafConfigFile.get("ints"); assertArrayEquals(expected, ints); }
@SuppressWarnings("unchecked") @Override public void load() throws IOException { if (!file.exists()) { return; } final FileInputStream fis = new FileInputStream(file); configuration = ConfigurationHandler.read(fis); fis.close(); }
KarafConfigFile extends KarafConfigurationFile { @SuppressWarnings("unchecked") @Override public void load() throws IOException { if (!file.exists()) { return; } final FileInputStream fis = new FileInputStream(file); configuration = ConfigurationHandler.read(fis); fis.close(); } }
KarafConfigFile extends KarafConfigurationFile { @SuppressWarnings("unchecked") @Override public void load() throws IOException { if (!file.exists()) { return; } final FileInputStream fis = new FileInputStream(file); configuration = ConfigurationHandler.read(fis); fis.close(); } KarafConfigFile(File karafHome, String location); }
KarafConfigFile extends KarafConfigurationFile { @SuppressWarnings("unchecked") @Override public void load() throws IOException { if (!file.exists()) { return; } final FileInputStream fis = new FileInputStream(file); configuration = ConfigurationHandler.read(fis); fis.close(); } KarafConfigFile(File karafHome, String location); @Override void store(); @SuppressWarnings("unchecked") @Override void load(); @Override void put(final String key, final Object value); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override void extend(final String key, final Object value); @Override Object get(final String key); }
KarafConfigFile extends KarafConfigurationFile { @SuppressWarnings("unchecked") @Override public void load() throws IOException { if (!file.exists()) { return; } final FileInputStream fis = new FileInputStream(file); configuration = ConfigurationHandler.read(fis); fis.close(); } KarafConfigFile(File karafHome, String location); @Override void store(); @SuppressWarnings("unchecked") @Override void load(); @Override void put(final String key, final Object value); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override void extend(final String key, final Object value); @Override Object get(final String key);  }