Projects
Mega:24.03
springframework
_service:tar_scm:springframework-3.2.14-jopt-si...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:springframework-3.2.14-jopt-simple.patch of Package springframework
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);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2