Polish pull request #291 per committer guidelines

- Update Apache license headers
 - Remove trailing whitespace
 - Edit original commit comment to use 'Issue:' syntax
 - Revert use of diamond operator (<>) in main sources

See committer guidelines at
https://github.com/SpringSource/spring-framework/blob/master/CONTRIBUTING.md

Issue: SPR-10579
This commit is contained in:
Chris Beams
2013-05-28 12:48:57 +02:00
parent 7860af8624
commit 46d47fef9a
5 changed files with 12 additions and 12 deletions

View File

@@ -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<T> extends EnumerablePropertySou
public void setNonOptionArgsPropertyName(String nonOptionArgsPropertyName) {
this.nonOptionArgsPropertyName = nonOptionArgsPropertyName;
}
/**
* Return whether this {@code PropertySource} contains a property with the given name.
* <p>This implementation first checks to see if the name specified is the special

View File

@@ -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<Opt
protected boolean containsOption(String name) {
return this.source.has(name);
}
@Override
public String[] getPropertyNames() {
List<String> names = new ArrayList<>();
List<String> names = new ArrayList<String>();
for (OptionSpec<?> spec : source.specs()) {
List<String> aliases = new ArrayList<>(spec.options());
List<String> aliases = new ArrayList<String>(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<String> getOptionValues(String name) {
List<?> argValues = this.source.valuesOf(name);

View File

@@ -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<C
public SimpleCommandLinePropertySource(String name, String[] args) {
super(name, new SimpleCommandLineArgsParser().parse(args));
}
/**
* Get the property names for the option arguments.
*/