@Test public void testGetProperties() { assertTrue(Arrays.equals(new String[] { "foo-value", "bar-value", "baz-value" }, usingArgs.getProperties("foo", "bar", "baz"))); assertEquals(0, usingArgs.getProperties().length); assertNull(usingArgs.getProperties((String[]) null)); }
@Privileged String[] getProperties(String... names) { if (names == null) { return null; } final ArrayList<String> result = new ArrayList<String>(); for (String name : names) { result.add(System.getProperty(name)); } return result.toArray(new String[result.size()]); }
UsingArgs { @Privileged String[] getProperties(String... names) { if (names == null) { return null; } final ArrayList<String> result = new ArrayList<String>(); for (String name : names) { result.add(System.getProperty(name)); } return result.toArray(new String[result.size()]); } }
UsingArgs { @Privileged String[] getProperties(String... names) { if (names == null) { return null; } final ArrayList<String> result = new ArrayList<String>(); for (String name : names) { result.add(System.getProperty(name)); } return result.toArray(new String[result.size()]); }  }
UsingArgs { @Privileged String[] getProperties(String... names) { if (names == null) { return null; } final ArrayList<String> result = new ArrayList<String>(); for (String name : names) { result.add(System.getProperty(name)); } return result.toArray(new String[result.size()]); }   }
UsingArgs { @Privileged String[] getProperties(String... names) { if (names == null) { return null; } final ArrayList<String> result = new ArrayList<String>(); for (String name : names) { result.add(System.getProperty(name)); } return result.toArray(new String[result.size()]); }    }