代码拉取完成,页面将自动刷新
diff -Nru spring-framework-3.2.14.RELEASE/build.gradle spring-framework-3.2.14.RELEASE.jopt-simple/build.gradle
--- spring-framework-3.2.14.RELEASE/build.gradle 2015-06-30 19:36:07.000000000 +0200
+++ spring-framework-3.2.14.RELEASE.jopt-simple/build.gradle 2015-07-03 13:18:15.951750946 +0200
@@ -242,7 +242,7 @@
compile(files(asmRepackJar))
compile("commons-logging:commons-logging:1.1.3")
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
- optional("net.sf.jopt-simple:jopt-simple:3.3")
+ optional("net.sf.jopt-simple:jopt-simple:4.6")
optional("log4j:log4j:1.2.17")
testCompile("xmlunit:xmlunit:1.3")
testCompile("org.codehaus.woodstox:wstx-asl:3.2.7") {
diff -Nru spring-framework-3.2.14.RELEASE/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java spring-framework-3.2.14.RELEASE.jopt-simple/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java
--- spring-framework-3.2.14.RELEASE/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java 2015-06-30 19:36:07.000000000 +0200
+++ spring-framework-3.2.14.RELEASE.jopt-simple/spring-core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java 2015-07-03 13:28:05.299917137 +0200
@@ -21,6 +21,7 @@
import java.util.List;
import joptsimple.OptionSet;
+import joptsimple.OptionSpec;
import org.springframework.util.Assert;
@@ -43,10 +44,11 @@
*
* See {@link CommandLinePropertySource} for complete general usage examples.
*
- * <p>Requires JOpt version 3.0 or higher. Tested against JOpt up until 4.6.
+ * <p>Requires JOpt version 4.3 or higher. Tested against JOpt up until 4.6.
*
* @author Chris Beams
* @author Juergen Hoeller
+ * @author Dave Syer
* @since 3.1
* @see CommandLinePropertySource
* @see joptsimple.OptionParser
@@ -78,6 +80,18 @@
return this.source.has(name);
}
+ public String[] getPropertyNames() {
+ List<String> names = new ArrayList<String>();
+ for (OptionSpec<?> spec : this.source.specs()) {
+ 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));
+ }
+ }
+ return names.toArray(new String[names.size()]);
+ }
+
@Override
public List<String> getOptionValues(String name) {
List<?> argValues = this.source.valuesOf(name);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。