Core: type arguments

This commit is contained in:
str4d
2013-11-22 09:34:42 +00:00
parent 6314f33d8f
commit 15bf94b479
10 changed files with 30 additions and 29 deletions

View File

@ -535,11 +535,12 @@ public class I2PAppContext {
*
* @return set of Strings containing the names of defined system properties
*/
public Set<String> getPropertyNames() {
@SuppressWarnings({ "unchecked", "rawtypes" })
public Set<String> getPropertyNames() {
// clone to avoid ConcurrentModificationException
Set names = new HashSet(((Properties) System.getProperties().clone()).keySet());
Set<String> names = new HashSet<String>((Set<String>) (Set) ((Properties) System.getProperties().clone()).keySet()); // TODO-Java6: s/keySet()/stringPropertyNames()/
if (_overrideProps != null)
names.addAll(_overrideProps.keySet());
names.addAll((Set<String>) (Set) _overrideProps.keySet()); // TODO-Java6: s/keySet()/stringPropertyNames()/
return names;
}