5 Star 0 Fork 18

src-openEuler/springframework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
springframework-3.2.14-jopt-simple.patch 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
yaokai13 提交于 2020-06-09 15:16 . Package init
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);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/springframework.git
git@gitee.com:src-openeuler/springframework.git
src-openeuler
springframework
springframework
master

搜索帮助