diff --git a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java index 04d7c536f4f..e8e0fda893d 100644 --- a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -218,7 +218,7 @@ public abstract class CommandLinePropertySource extends EnumerablePropertySou public void setNonOptionArgsPropertyName(String nonOptionArgsPropertyName) { this.nonOptionArgsPropertyName = nonOptionArgsPropertyName; } - + /** * Return whether this {@code PropertySource} contains a property with the given name. *

This implementation first checks to see if the name specified is the special diff --git a/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java index 1767ad0e817..63590556b78 100644 --- a/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,20 +77,20 @@ public class JOptCommandLinePropertySource extends CommandLinePropertySource names = new ArrayList<>(); + List names = new ArrayList(); for (OptionSpec spec : source.specs()) { - List aliases = new ArrayList<>(spec.options()); + List aliases = new ArrayList(spec.options()); if (!aliases.isEmpty()) { // Only the longest name is used for enumerating - names.add(aliases.get(aliases.size()-1)); + names.add(aliases.get(aliases.size()-1)); } } return names.toArray(new String[names.size()]); } - + @Override public List getOptionValues(String name) { List argValues = this.source.valuesOf(name); diff --git a/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java index bc00692f813..f1b1f8d7b5f 100644 --- a/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ public class SimpleCommandLinePropertySource extends CommandLinePropertySource