[jira] [Comment Edited] (CLI-306) Issue parsing numeric options following an option which accepts multiple args in DefaultParser
[ https://issues.apache.org/jira/browse/CLI-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17785268#comment-17785268 ] Sruteesh Kumar Paramata edited comment on CLI-306 at 12/2/23 7:31 AM: -- [~Todd Ye] For DefaultParser, negative number is preferably considered as an argument than an option. So, -2 is considered as an argument to option --one [~ggregory] Please confirm if my understanding is correct was (Author: JIRAUSER301594): [~Todd Ye] For DefaultParser, negative number is preferably considered as an argument than an option. So, -2 is considered as an argument to option --one > Issue parsing numeric options following an option which accepts multiple args > in DefaultParser > -- > > Key: CLI-306 > URL: https://issues.apache.org/jira/browse/CLI-306 > Project: Commons CLI > Issue Type: Bug > Components: CLI-1.x >Affects Versions: 1.4 >Reporter: Todd Ye >Priority: Major > > commons-cli seems to be unable to detect numeric options in their short "opt" > form following an option which takes multiple arguments. > Will consistently throw: > {code:java} > Exception in thread "main" org.apache.commons.cli.MissingOptionException: > Missing required option: 2 > {code} > How to reproduce: > {code:java} > Option multipleOptional = Option.builder("1") > .longOpt("one") > .argName("value1,value2,...,valueN") > .hasArgs() > .valueSeparator(',') > .build(); > Option singleMandatory = Option.builder("2") > .argName("value") > .longOpt("two") > .hasArg() > .required() > .build(); > Options options = new Options(); > options.addOption(singleMandatory); > options.addOption(multipleOptional); > CommandLineParser parser = new DefaultParser(); > CommandLine line = parser.parse(options, args); > for (Option o : line.getOptions()) { > System.out.println(o.getOpt() + '\t' > + Arrays.toString(o.getValues())); > } > {code} > now pass in: > {code:java} > --one argNumOne,argNumTwo -2 argNumThree > {code} > Note that an error will not occur if "opt" is set to a char like "a/b/c" or > if the previous option is set with hasArg() instead of hasArgs() > Also error will not occur if the longOpt is used such as: > {code:java} > --one argNumOne,argNumTwo --two argNumThree > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (IO-813) LastModifiedFileComparator should not throw exceptions, period
[ https://issues.apache.org/jira/browse/IO-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792310#comment-17792310 ] Miguel Munoz commented on IO-813: - As for your hurricane metaphor, the kind of failure you describe might be a hurricane, but it might also be a brief sprinkle. This is why I believe we should document the hazard clearly and let the user decide how to handle the issue. (They can always catch the UncheckedIOException, for example.) > LastModifiedFileComparator should not throw exceptions, period > -- > > Key: IO-813 > URL: https://issues.apache.org/jira/browse/IO-813 > Project: Commons IO > Issue Type: Bug >Reporter: Elliotte Rusty Harold >Priority: Major > > LastModifiedFileComparator is likely broken by design since it can > unexpectedly throw UncheckedIOException. This violates the contract of > Comparable.compareTo which is not documented to throw that exception. > I analyzed almost this exact case in detail here: > https://medium.com/@elharo/when-you-cant-throw-an-exception-b9f9b0db9ba4 > I'm not sure how to fix this now, but I'm tempted to simply deprecate this > entire class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (IO-813) LastModifiedFileComparator should not throw exceptions, period
[ https://issues.apache.org/jira/browse/IO-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792308#comment-17792308 ] Miguel Munoz commented on IO-813: - That's what I'm planning, after getting some feedback. (I already have the decorators written.) > LastModifiedFileComparator should not throw exceptions, period > -- > > Key: IO-813 > URL: https://issues.apache.org/jira/browse/IO-813 > Project: Commons IO > Issue Type: Bug >Reporter: Elliotte Rusty Harold >Priority: Major > > LastModifiedFileComparator is likely broken by design since it can > unexpectedly throw UncheckedIOException. This violates the contract of > Comparable.compareTo which is not documented to throw that exception. > I analyzed almost this exact case in detail here: > https://medium.com/@elharo/when-you-cant-throw-an-exception-b9f9b0db9ba4 > I'm not sure how to fix this now, but I'm tempted to simply deprecate this > entire class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (IO-824) SymbolicLineFileFilter documentation fixes
[ https://issues.apache.org/jira/browse/IO-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miguel Munoz updated IO-824: Attachment: Documentation_Changes.patch > SymbolicLineFileFilter documentation fixes > -- > > Key: IO-824 > URL: https://issues.apache.org/jira/browse/IO-824 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.15.1 >Reporter: Miguel Munoz >Priority: Trivial > Attachments: Documentation_Changes.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > One minor fix to the JavaDocs: > Method > FileVisitResult accept(final Path path, final BasicFileAttributes attributes) > says "Checks to see if the file is a file" but should say "Checks to see if > the file is a symbolic link." > Also, internal documentation has a missing word. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (IO-824) SymbolicLineFileFilter documentation fixes
[ https://issues.apache.org/jira/browse/IO-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792294#comment-17792294 ] Miguel Munoz commented on IO-824: - Patch attached, which fixed documentation issues > SymbolicLineFileFilter documentation fixes > -- > > Key: IO-824 > URL: https://issues.apache.org/jira/browse/IO-824 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.15.1 >Reporter: Miguel Munoz >Priority: Trivial > Attachments: Documentation_Changes.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > One minor fix to the JavaDocs: > Method > FileVisitResult accept(final Path path, final BasicFileAttributes attributes) > says "Checks to see if the file is a file" but should say "Checks to see if > the file is a symbolic link." > Also, internal documentation has a missing word. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (IO-824) SymbolicLineFileFilter documentation fixes
Miguel Munoz created IO-824: --- Summary: SymbolicLineFileFilter documentation fixes Key: IO-824 URL: https://issues.apache.org/jira/browse/IO-824 Project: Commons IO Issue Type: Improvement Components: Filters Affects Versions: 2.15.1 Reporter: Miguel Munoz One minor fix to the JavaDocs: Method FileVisitResult accept(final Path path, final BasicFileAttributes attributes) says "Checks to see if the file is a file" but should say "Checks to see if the file is a symbolic link." Also, internal documentation has a missing word. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (CRYPTO-158) Illegal reflective access
[ https://issues.apache.org/jira/browse/CRYPTO-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved CRYPTO-158. - Resolution: Fixed Fixed in {color:#22}b51442e5{color} > Illegal reflective access > - > > Key: CRYPTO-158 > URL: https://issues.apache.org/jira/browse/CRYPTO-158 > Project: Commons Crypto > Issue Type: Bug > Components: Cipher >Affects Versions: 1.1.0 > Environment: Linux OpenJDK 15.0.2 >Reporter: Juan F Arjona >Priority: Minor > > Getting this message: > WARNING: An illegal reflective access operation has occurred > WARNING: Illegal reflective access by > org.apache.commons.crypto.stream.CryptoInputStream > (.../BOOT-INF/lib/commons-crypto-1.1.0.jar!/) to method > sun.nio.ch.DirectBuffer.cleaner() > WARNING: Please consider reporting this to the maintainers of > org.apache.commons.crypto.stream.CryptoInputStream > WARNING: Use --illegal-access=warn to enable warnings of further illegal > reflective access operations > WARNING: All illegal access operations will be denied in a future release -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] Bump actions/setup-java from 3.13.0 to 4.0.0 [commons-configuration]
garydgregory merged PR #333: URL: https://github.com/apache/commons-configuration/pull/333 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (CRYPTO-136) Expose FIPS_mode_set() and FIPS_selftest() API
[ https://issues.apache.org/jira/browse/CRYPTO-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved CRYPTO-136. - Resolution: Won't Do Needs to be redefined in terms of OpenSSL3 > Expose FIPS_mode_set() and FIPS_selftest() API > -- > > Key: CRYPTO-136 > URL: https://issues.apache.org/jira/browse/CRYPTO-136 > Project: Commons Crypto > Issue Type: Improvement > Components: Native >Reporter: Xiaodong Wang >Priority: Major > > Expose FIPS_mode_set() and FIPS_selftest() API > https://wiki.openssl.org/index.php/FIPS_mode_set() would allow applications > require FIPS compliance enter FIPS only mode, and run seft test. -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] Bump actions/setup-java from 3.13.0 to 4.0.0 [commons-collections]
garydgregory merged PR #433: URL: https://github.com/apache/commons-collections/pull/433 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] CODEC-314: Fix possible IndexOutOfBoundsException thrown by PercentCodec.insertAlwaysEncodeChars() method [commons-codec]
arthurscchan commented on code in PR #222: URL: https://github.com/apache/commons-codec/pull/222#discussion_r1412032098 ## src/main/java/org/apache/commons/codec/net/PercentCodec.java: ## @@ -77,10 +77,15 @@ public PercentCodec() { * * @param alwaysEncodeChars the unsafe characters that should always be encoded * @param plusForSpace the flag defining if the space character should be encoded as '+' + * @throws EncoderException if the alwaysEncodeChars byte array contains invalid bytes */ -public PercentCodec(final byte[] alwaysEncodeChars, final boolean plusForSpace) { +public PercentCodec(final byte[] alwaysEncodeChars, final boolean plusForSpace) throws EncoderException { Review Comment: Yes, I think it is a better changes and interpretation of the exceptions. I will change it accordingly. @garydgregory -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump actions/setup-java from 3.13.0 to 4.0.0 [commons-bsf]
garydgregory merged PR #108: URL: https://github.com/apache/commons-bsf/pull/108 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump org.apache.httpcomponents.core5:httpcore5 from 5.2.3 to 5.2.4 [commons-vfs]
garydgregory merged PR #447: URL: https://github.com/apache/commons-vfs/pull/447 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump com.puppycrawl.tools:checkstyle from 9.3 to 10.12.5 [commons-parent]
garydgregory closed pull request #333: Bump com.puppycrawl.tools:checkstyle from 9.3 to 10.12.5 URL: https://github.com/apache/commons-parent/pull/333 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump github/codeql-action from 2.22.7 to 2.22.8 [commons-parent]
garydgregory merged PR #332: URL: https://github.com/apache/commons-parent/pull/332 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump actions/setup-java from 3.13.0 to 4.0.0 [commons-parent]
garydgregory merged PR #334: URL: https://github.com/apache/commons-parent/pull/334 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (IO-813) LastModifiedFileComparator should not throw exceptions, period
[ https://issues.apache.org/jira/browse/IO-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792009#comment-17792009 ] Elliotte Rusty Harold commented on IO-813: -- Handling missing files is an interesting and separate issue though. I'd file an independent bug for that one. > LastModifiedFileComparator should not throw exceptions, period > -- > > Key: IO-813 > URL: https://issues.apache.org/jira/browse/IO-813 > Project: Commons IO > Issue Type: Bug >Reporter: Elliotte Rusty Harold >Priority: Major > > LastModifiedFileComparator is likely broken by design since it can > unexpectedly throw UncheckedIOException. This violates the contract of > Comparable.compareTo which is not documented to throw that exception. > I analyzed almost this exact case in detail here: > https://medium.com/@elharo/when-you-cant-throw-an-exception-b9f9b0db9ba4 > I'm not sure how to fix this now, but I'm tempted to simply deprecate this > entire class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (IO-813) LastModifiedFileComparator should not throw exceptions, period
[ https://issues.apache.org/jira/browse/IO-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17792008#comment-17792008 ] Elliotte Rusty Harold commented on IO-813: -- It's not our job to fix that problem, any more than it's FEMA's job to prevent hurricanes. Instead, it's our job to be prepared to respond to that problem when it inevitably happens, as it's FEMA's to respond to hurricanes. The purpose of checked exceptions is to make sure that devs prepare for and are ready to respond to the hurricanes/problems they can't prevent. Runtime exceptions are for the problems that programmers can prevent by changing their code. > LastModifiedFileComparator should not throw exceptions, period > -- > > Key: IO-813 > URL: https://issues.apache.org/jira/browse/IO-813 > Project: Commons IO > Issue Type: Bug >Reporter: Elliotte Rusty Harold >Priority: Major > > LastModifiedFileComparator is likely broken by design since it can > unexpectedly throw UncheckedIOException. This violates the contract of > Comparable.compareTo which is not documented to throw that exception. > I analyzed almost this exact case in detail here: > https://medium.com/@elharo/when-you-cant-throw-an-exception-b9f9b0db9ba4 > I'm not sure how to fix this now, but I'm tempted to simply deprecate this > entire class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] Bump actions/setup-java from 3.13.0 to 4.0.0 [commons-jcs]
garydgregory merged PR #188: URL: https://github.com/apache/commons-jcs/pull/188 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Add Java Microbenchmarking (JMH) [commons-imaging]
MerendaFrancoN opened a new pull request, #340: URL: https://github.com/apache/commons-imaging/pull/340 # Context Added dependency to support JMH -- [Java Microbenchmarking Tool](https://github.com/openjdk/jmh) in the project. # Changes - Added jmh dependency - Added `src/test/java/org/apache/commons/imaging/BenchmarkRunner.java` as Benchmarking Runner -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Add Java Microbenchmarking (JMH) [commons-imaging]
MerendaFrancoN closed pull request #340: Add Java Microbenchmarking (JMH) URL: https://github.com/apache/commons-imaging/pull/340 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org