[GitHub] [commons-collections] Claudenw commented on pull request #317: moved IndexFilter to its own file.
Claudenw commented on PR #317: URL: https://github.com/apache/commons-collections/pull/317#issuecomment-1175812547 @aherbert if there is no objection I will merge this change. -- 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] [Work logged] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788100=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788100 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 06/Jul/22 01:34 Start Date: 06/Jul/22 01:34 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175678253 Hello All, The PR was not good enough as it was, specifically, the changes I made were: - Reuse own `ArrayUtils#containsAny()` API for validation instead of custom intersection implementation - Add missing `@since` tags to new public methods - Add missing `@since` tags to the new protected field - Fix up some Javadocs Since I happened to have the time, and instead of going round and round on comments in this PR, I just fixed it all up and pushed the new feature as a single commit, which is much cleaner than applying the PR and then following it up with an additional commit. Authorship is attributed as always in the release notes as generated from `changes.xml`. Issue Time Tracking --- Worklog Id: (was: 788100) Remaining Estimate: 2h 20m (was: 2.5h) Time Spent: 3h 40m (was: 3.5h) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 3h 40m > Remaining Estimate: 2h 20m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory commented on pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names
garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175678253 Hello All, The PR was not good enough as it was, specifically, the changes I made were: - Reuse own `ArrayUtils#containsAny()` API for validation instead of custom intersection implementation - Add missing `@since` tags to new public methods - Add missing `@since` tags to the new protected field - Fix up some Javadocs Since I happened to have the time, and instead of going round and round on comments in this PR, I just fixed it all up and pushed the new feature as a single commit, which is much cleaner than applying the PR and then following it up with an additional commit. Authorship is attributed as always in the release notes as generated from `changes.xml`. -- 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] [Work logged] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788096=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788096 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 06/Jul/22 00:58 Start Date: 06/Jul/22 00:58 Worklog Time Spent: 10m Work Description: kinow commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175649542 Hi @GutoVeronezi I had a quick look via GitHub UI and it is not showing you as co-author. When a maintainer needs to perform changes during the merge, it is common practice here in Commons (also in other OSS projects), to squash/rebase/edit commits. I think maybe @garydgregory was trying that but accidentally replaced authorship? Normally both original author & Commons maintainer appear as the authors of the commits. We can edit that commit's authorship & push-force if necessary, but let's wait for @garydgregory 's reply to confirm if that was really the case :+1: Thanks! Bruno Issue Time Tracking --- Worklog Id: (was: 788096) Remaining Estimate: 2.5h (was: 2h 40m) Time Spent: 3.5h (was: 3h 20m) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 3.5h > Remaining Estimate: 2.5h > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] kinow commented on pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names
kinow commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175649542 Hi @GutoVeronezi I had a quick look via GitHub UI and it is not showing you as co-author. When a maintainer needs to perform changes during the merge, it is common practice here in Commons (also in other OSS projects), to squash/rebase/edit commits. I think maybe @garydgregory was trying that but accidentally replaced authorship? Normally both original author & Commons maintainer appear as the authors of the commits. We can edit that commit's authorship & push-force if necessary, but let's wait for @garydgregory 's reply to confirm if that was really the case :+1: Thanks! Bruno -- 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] [Work logged] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788082=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788082 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 06/Jul/22 00:14 Start Date: 06/Jul/22 00:14 Worklog Time Spent: 10m Work Description: GutoVeronezi commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175621447 @garydgregory, I have a question, why close the PR and push the changes as if they were yours instead of merging the PR? I know that you referenced my PR in the commit message and so on, but for anybody that looks at the git history, the credits are yours. If you think that changes/amendments were necessary, you could have asked, and I would haply apply them. However, this way seems a bit odd. At least, quite different from the other OpenSource interactions I have had so far. Is this a common practice here in the commons-lang community? Issue Time Tracking --- Worklog Id: (was: 788082) Remaining Estimate: 2h 40m (was: 2h 50m) Time Spent: 3h 20m (was: 3h 10m) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 3h 20m > Remaining Estimate: 2h 40m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] GutoVeronezi commented on pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names
GutoVeronezi commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175621447 @garydgregory, I have a question, why close the PR and push the changes as if they were yours instead of merging the PR? I know that you referenced my PR in the commit message and so on, but for anybody that looks at the git history, the credits are yours. If you think that changes/amendments were necessary, you could have asked, and I would haply apply them. However, this way seems a bit odd. At least, quite different from the other OpenSource interactions I have had so far. Is this a common practice here in the commons-lang community? -- 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] [Work logged] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788073=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788073 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 05/Jul/22 23:33 Start Date: 05/Jul/22 23:33 Worklog Time Spent: 10m Work Description: garydgregory closed pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names URL: https://github.com/apache/commons-lang/pull/849 Issue Time Tracking --- Worklog Id: (was: 788073) Remaining Estimate: 2h 50m (was: 3h) Time Spent: 3h 10m (was: 3h) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 3h 10m > Remaining Estimate: 2h 50m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788072=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788072 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 05/Jul/22 23:33 Start Date: 05/Jul/22 23:33 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175600836 Applied PR and: - Added missing @since tags to new public and protected methods and fields - Fixed Javadocs - Reuse own ArrayUtils API for validation - Move methods to AB order Issue Time Tracking --- Worklog Id: (was: 788072) Remaining Estimate: 3h (was: 3h 10m) Time Spent: 3h (was: 2h 50m) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 3h > Remaining Estimate: 3h > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory closed pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names
garydgregory closed pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names URL: https://github.com/apache/commons-lang/pull/849 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #849: [LANG-1662] Let ReflectionToStringBuilder only reflect given field names
garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175600836 Applied PR and: - Added missing @since tags to new public and protected methods and fields - Fixed Javadocs - Reuse own ArrayUtils API for validation - Move methods to AB order -- 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] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary D. Gregory resolved LANG-1662. --- Fix Version/s: 3.13.0 Resolution: Fixed Applied PR and: * Added missing {{@since}} tags to new public and protected methods and fields * Fixed Javadocs * Reuse own ArrayUtils API for validation * Move methods to AB order > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Fix For: 3.13.0 > > Original Estimate: 6h > Time Spent: 2h 50m > Remaining Estimate: 3h 10m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (LANG-1662) Let ReflectionToStringBuilder only reflect given field names
[ https://issues.apache.org/jira/browse/LANG-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary D. Gregory updated LANG-1662: -- Summary: Let ReflectionToStringBuilder only reflect given field names (was: Create methods on ReflectionToStringBuilder to reflect only select fields) > Let ReflectionToStringBuilder only reflect given field names > > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Original Estimate: 6h > Time Spent: 2h 50m > Remaining Estimate: 3h 10m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1662) Create methods on ReflectionToStringBuilder to reflect only select fields
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788029=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788029 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 05/Jul/22 19:32 Start Date: 05/Jul/22 19:32 Worklog Time Spent: 10m Work Description: GutoVeronezi commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175422840 @garydgregory, when the `ReflectionToStringBuilder` is instantiated, the object is added to the `ToStringStyle#REGISTRY` and is removed from it when calling `ToStringBuilder#toString()`. As we have both include and exclude fields now, we are validating if there is intersection between them. Previous these last changes, if there was intersection, an exception was being thrown and the object was not being removed from the `REGISTRY`. If the tests expecting the exception were being executed firstly, and as `ToStringStyle#REGISTRY` is static, it would never be empty, broking the other tests. To fix this situation, I made the validation code block unregister the object before throwing the exception, to honor the current workflow. I also moved the block that validates the intersection to a more convenient flow. I extended `AbstractLangBuilderTest` in the test class, as you requested. Issue Time Tracking --- Worklog Id: (was: 788029) Remaining Estimate: 3h 10m (was: 3h 20m) Time Spent: 2h 50m (was: 2h 40m) > Create methods on ReflectionToStringBuilder to reflect only select fields > - > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Original Estimate: 6h > Time Spent: 2h 50m > Remaining Estimate: 3h 10m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] GutoVeronezi commented on pull request #849: [LANG-1662] Create methods on ReflectionToStringBuilder to reflect only select fields
GutoVeronezi commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175422840 @garydgregory, when the `ReflectionToStringBuilder` is instantiated, the object is added to the `ToStringStyle#REGISTRY` and is removed from it when calling `ToStringBuilder#toString()`. As we have both include and exclude fields now, we are validating if there is intersection between them. Previous these last changes, if there was intersection, an exception was being thrown and the object was not being removed from the `REGISTRY`. If the tests expecting the exception were being executed firstly, and as `ToStringStyle#REGISTRY` is static, it would never be empty, broking the other tests. To fix this situation, I made the validation code block unregister the object before throwing the exception, to honor the current workflow. I also moved the block that validates the intersection to a more convenient flow. I extended `AbstractLangBuilderTest` in the test class, as you requested. -- 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
[GitHub] [commons-lang] garydgregory closed pull request #509: Update DurationFormatUtils.java
garydgregory closed pull request #509: Update DurationFormatUtils.java URL: https://github.com/apache/commons-lang/pull/509 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #509: Update DurationFormatUtils.java
garydgregory commented on PR #509: URL: https://github.com/apache/commons-lang/pull/509#issuecomment-1175410847 Closing: No feedback. -- 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] [Work logged] (LANG-1595) Add ArrayUtils methods that accept a Predicate.
[ https://issues.apache.org/jira/browse/LANG-1595?focusedWorklogId=788025=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788025 ] ASF GitHub Bot logged work on LANG-1595: Author: ASF GitHub Bot Created on: 05/Jul/22 19:15 Start Date: 05/Jul/22 19:15 Worklog Time Spent: 10m Work Description: garydgregory closed pull request #603: [LANG-1595] Add ArrayUtils methods that accept a Predicate. URL: https://github.com/apache/commons-lang/pull/603 Issue Time Tracking --- Worklog Id: (was: 788025) Time Spent: 1h (was: 50m) > Add ArrayUtils methods that accept a Predicate. > --- > > Key: LANG-1595 > URL: https://issues.apache.org/jira/browse/LANG-1595 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Isira Seneviratne >Priority: Major > Fix For: 3.13.0 > > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1595) Add ArrayUtils methods that accept a Predicate.
[ https://issues.apache.org/jira/browse/LANG-1595?focusedWorklogId=788024=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788024 ] ASF GitHub Bot logged work on LANG-1595: Author: ASF GitHub Bot Created on: 05/Jul/22 19:15 Start Date: 05/Jul/22 19:15 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #603: URL: https://github.com/apache/commons-lang/pull/603#issuecomment-1175410095 Closing: No feedback and it also feels like a duplication of applying predicates to a `Stream.of(...)`. Issue Time Tracking --- Worklog Id: (was: 788024) Time Spent: 50m (was: 40m) > Add ArrayUtils methods that accept a Predicate. > --- > > Key: LANG-1595 > URL: https://issues.apache.org/jira/browse/LANG-1595 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: Isira Seneviratne >Priority: Major > Fix For: 3.13.0 > > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory closed pull request #603: [LANG-1595] Add ArrayUtils methods that accept a Predicate.
garydgregory closed pull request #603: [LANG-1595] Add ArrayUtils methods that accept a Predicate. URL: https://github.com/apache/commons-lang/pull/603 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #603: [LANG-1595] Add ArrayUtils methods that accept a Predicate.
garydgregory commented on PR #603: URL: https://github.com/apache/commons-lang/pull/603#issuecomment-1175410095 Closing: No feedback and it also feels like a duplication of applying predicates to a `Stream.of(...)`. -- 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] [Work logged] (LANG-1533) RandomStringUtils.random() should not include \u0000
[ https://issues.apache.org/jira/browse/LANG-1533?focusedWorklogId=788022=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788022 ] ASF GitHub Bot logged work on LANG-1533: Author: ASF GitHub Bot Created on: 05/Jul/22 19:13 Start Date: 05/Jul/22 19:13 Worklog Time Spent: 10m Work Description: garydgregory commented on code in PR #654: URL: https://github.com/apache/commons-lang/pull/654#discussion_r914127759 ## src/main/java/org/apache/commons/lang3/RandomStringUtils.java: ## @@ -404,6 +404,7 @@ public static String random(int count, int start, int end, final boolean letters case Character.UNASSIGNED: case Character.PRIVATE_USE: case Character.SURROGATE: +case Character.CONTROL: Review Comment: That does not look right IMO because it excludes the TAB character. Issue Time Tracking --- Worklog Id: (was: 788022) Time Spent: 40m (was: 0.5h) > RandomStringUtils.random() should not include \u > - > > Key: LANG-1533 > URL: https://issues.apache.org/jira/browse/LANG-1533 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Affects Versions: 3.8.1 >Reporter: Daniel Vega >Priority: Minor > Attachments: 0001-xxx.patch > > Time Spent: 40m > Remaining Estimate: 0h > > When generating random strings we should not include char 0x00 by default. > This is problematic for many tools and libraries. For example, if we try to > save this value in a PosgreSQL database we'll get: > > {quote}PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 > {quote} > > Currently we are avoiding some code code-point ranges. We should also skip > {{codePoint=0}} > {code:none} > --- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java > +++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java > @@ -400,6 +400,12 @@ public static String random(int count, int start, int > end, final boolean letters > if (chars == null) { > codePoint = random.nextInt(gap) + start; > > +// Skip codePoint \u because is problematic for some > tools/libraries > +if (codePoint==0) { > +count++; > +continue; > +} > + > switch (Character.getType(codePoint)) { > case Character.UNASSIGNED: > case Character.PRIVATE_USE: > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory commented on a diff in pull request #654: [LANG-1533] - RandomStringUtils.random() should not include \u0000 or control characters
garydgregory commented on code in PR #654: URL: https://github.com/apache/commons-lang/pull/654#discussion_r914127759 ## src/main/java/org/apache/commons/lang3/RandomStringUtils.java: ## @@ -404,6 +404,7 @@ public static String random(int count, int start, int end, final boolean letters case Character.UNASSIGNED: case Character.PRIVATE_USE: case Character.SURROGATE: +case Character.CONTROL: Review Comment: That does not look right IMO because it excludes the TAB character. -- 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
[GitHub] [commons-lang] garydgregory closed pull request #817: fix NumberFormatException in method org.apache.commons.lang3.math.Fra…
garydgregory closed pull request #817: fix NumberFormatException in method org.apache.commons.lang3.math.Fra… URL: https://github.com/apache/commons-lang/pull/817 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #817: fix NumberFormatException in method org.apache.commons.lang3.math.Fra…
garydgregory commented on PR #817: URL: https://github.com/apache/commons-lang/pull/817#issuecomment-1175404138 Closing: No feedback. -- 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] (LANG-1627) BooleanUtils.xor not behaving as expected with any odd number of true's
[ https://issues.apache.org/jira/browse/LANG-1627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary D. Gregory resolved LANG-1627. --- Fix Version/s: 3.13.0 Resolution: Fixed > BooleanUtils.xor not behaving as expected with any odd number of true's > --- > > Key: LANG-1627 > URL: https://issues.apache.org/jira/browse/LANG-1627 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.11 >Reporter: Alberto Scotto >Priority: Major > Fix For: 3.13.0 > > Time Spent: 1h 40m > Remaining Estimate: 0h > > Hi, > I was expecting a xor function that takes a variable number of arguments to > *return true if and only if exactly one among all of the arguments is true*, > regardless of the number of arguments. > This holds true given three false's: > {code:java} > @Test > public void threeFalse() { > boolean[] bools = new boolean[]{Boolean.FALSE, Boolean.FALSE, Boolean.FALSE}; > assertFalse(BooleanUtils.xor(bools)); > }{code} > > It also holds true given 4 true's, as well as for any even number of trues. > {code:java} > @Test > public void fourTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, > Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > The above tests pass. > But with any odd number of true's that doesn't hold anymore: > > {code:java} > @Test > public void threeTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > This test fails. > That was totally unexpected to me. > But as it turns out, even > {noformat} > true ^ true ^ true{noformat} > evaluates to true. That was unexpected too to me, at a first sight. > The thing is that xor (I mean the original boolean operator) is a binary > operator, so if you want to make it n-ary, one simple solution is to apply it > in two by two: ((a ^ b) ^ c) ^ d > And that's what is done in the implementation of the method BooleanUtils#xor. > But that brings to BooleanUtils.xor(true, true, true) == true, and at the > same time BooleanUtils.xor(true, true, true, true) == false, which just > doesn't sound right to me. > Whether or not you agree with me that that is a bug of the method, please at > least update the Javadoc, because right now it is not providing the user > enough information. Look: > {code:java} > Performs an xor on a set of booleans. > BooleanUtils.xor(true, true) = false > BooleanUtils.xor(false, false) = false > BooleanUtils.xor(true, false) = true > {code} > > Thanks. > Cheers -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1627) BooleanUtils.xor not behaving as expected with any odd number of true's
[ https://issues.apache.org/jira/browse/LANG-1627?focusedWorklogId=788018=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788018 ] ASF GitHub Bot logged work on LANG-1627: Author: ASF GitHub Bot Created on: 05/Jul/22 19:05 Start Date: 05/Jul/22 19:05 Worklog Time Spent: 10m Work Description: garydgregory closed pull request #890: [LANG-1627] Implement xorOneHot and add clarifications to Javadoc for xor to explain when it returns true URL: https://github.com/apache/commons-lang/pull/890 Issue Time Tracking --- Worklog Id: (was: 788018) Time Spent: 1h 40m (was: 1.5h) > BooleanUtils.xor not behaving as expected with any odd number of true's > --- > > Key: LANG-1627 > URL: https://issues.apache.org/jira/browse/LANG-1627 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.11 >Reporter: Alberto Scotto >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > Hi, > I was expecting a xor function that takes a variable number of arguments to > *return true if and only if exactly one among all of the arguments is true*, > regardless of the number of arguments. > This holds true given three false's: > {code:java} > @Test > public void threeFalse() { > boolean[] bools = new boolean[]{Boolean.FALSE, Boolean.FALSE, Boolean.FALSE}; > assertFalse(BooleanUtils.xor(bools)); > }{code} > > It also holds true given 4 true's, as well as for any even number of trues. > {code:java} > @Test > public void fourTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, > Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > The above tests pass. > But with any odd number of true's that doesn't hold anymore: > > {code:java} > @Test > public void threeTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > This test fails. > That was totally unexpected to me. > But as it turns out, even > {noformat} > true ^ true ^ true{noformat} > evaluates to true. That was unexpected too to me, at a first sight. > The thing is that xor (I mean the original boolean operator) is a binary > operator, so if you want to make it n-ary, one simple solution is to apply it > in two by two: ((a ^ b) ^ c) ^ d > And that's what is done in the implementation of the method BooleanUtils#xor. > But that brings to BooleanUtils.xor(true, true, true) == true, and at the > same time BooleanUtils.xor(true, true, true, true) == false, which just > doesn't sound right to me. > Whether or not you agree with me that that is a bug of the method, please at > least update the Javadoc, because right now it is not providing the user > enough information. Look: > {code:java} > Performs an xor on a set of booleans. > BooleanUtils.xor(true, true) = false > BooleanUtils.xor(false, false) = false > BooleanUtils.xor(true, false) = true > {code} > > Thanks. > Cheers -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1627) BooleanUtils.xor not behaving as expected with any odd number of true's
[ https://issues.apache.org/jira/browse/LANG-1627?focusedWorklogId=788017=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788017 ] ASF GitHub Bot logged work on LANG-1627: Author: ASF GitHub Bot Created on: 05/Jul/22 19:05 Start Date: 05/Jul/22 19:05 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #890: URL: https://github.com/apache/commons-lang/pull/890#issuecomment-1175402822 Closing: I brought this in slightly differently, using `oneHot()` instead of `xorOneHot` and other minor changes; please see git master. Issue Time Tracking --- Worklog Id: (was: 788017) Time Spent: 1.5h (was: 1h 20m) > BooleanUtils.xor not behaving as expected with any odd number of true's > --- > > Key: LANG-1627 > URL: https://issues.apache.org/jira/browse/LANG-1627 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.11 >Reporter: Alberto Scotto >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > Hi, > I was expecting a xor function that takes a variable number of arguments to > *return true if and only if exactly one among all of the arguments is true*, > regardless of the number of arguments. > This holds true given three false's: > {code:java} > @Test > public void threeFalse() { > boolean[] bools = new boolean[]{Boolean.FALSE, Boolean.FALSE, Boolean.FALSE}; > assertFalse(BooleanUtils.xor(bools)); > }{code} > > It also holds true given 4 true's, as well as for any even number of trues. > {code:java} > @Test > public void fourTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, > Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > The above tests pass. > But with any odd number of true's that doesn't hold anymore: > > {code:java} > @Test > public void threeTrue() { > boolean[] bools = new boolean[]{Boolean.TRUE, Boolean.TRUE, Boolean.TRUE}; > assertFalse(BooleanUtils.xor(bools)); > } > {code} > This test fails. > That was totally unexpected to me. > But as it turns out, even > {noformat} > true ^ true ^ true{noformat} > evaluates to true. That was unexpected too to me, at a first sight. > The thing is that xor (I mean the original boolean operator) is a binary > operator, so if you want to make it n-ary, one simple solution is to apply it > in two by two: ((a ^ b) ^ c) ^ d > And that's what is done in the implementation of the method BooleanUtils#xor. > But that brings to BooleanUtils.xor(true, true, true) == true, and at the > same time BooleanUtils.xor(true, true, true, true) == false, which just > doesn't sound right to me. > Whether or not you agree with me that that is a bug of the method, please at > least update the Javadoc, because right now it is not providing the user > enough information. Look: > {code:java} > Performs an xor on a set of booleans. > BooleanUtils.xor(true, true) = false > BooleanUtils.xor(false, false) = false > BooleanUtils.xor(true, false) = true > {code} > > Thanks. > Cheers -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory closed pull request #890: [LANG-1627] Implement xorOneHot and add clarifications to Javadoc for xor to explain when it returns true
garydgregory closed pull request #890: [LANG-1627] Implement xorOneHot and add clarifications to Javadoc for xor to explain when it returns true URL: https://github.com/apache/commons-lang/pull/890 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #890: [LANG-1627] Implement xorOneHot and add clarifications to Javadoc for xor to explain when it returns true
garydgregory commented on PR #890: URL: https://github.com/apache/commons-lang/pull/890#issuecomment-1175402822 Closing: I brought this in slightly differently, using `oneHot()` instead of `xorOneHot` and other minor changes; please see git master. -- 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] [Work logged] (LANG-1662) Create methods on ReflectionToStringBuilder to reflect only select fields
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=788013=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788013 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 05/Jul/22 18:54 Start Date: 05/Jul/22 18:54 Worklog Time Spent: 10m Work Description: codecov-commenter commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175394383 # [Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#849](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (1e8b9de) into [master](https://codecov.io/gh/apache/commons-lang/commit/1bf7d7ec12fa143a1b544cf2dd1a0c1a8de7548a?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (1bf7d7e) will **increase** coverage by `0.00%`. > The diff coverage is `94.73%`. ```diff @@Coverage Diff@@ ## master #849 +/- ## = Coverage 91.71% 91.72% - Complexity 7408 7422 +14 = Files 188 188 Lines 1590015928 +28 Branches 2994 3000+6 = + Hits 1458314610 +27 - Misses 725 726+1 Partials592 592 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...mmons/lang3/builder/ReflectionToStringBuilder.java](https://codecov.io/gh/apache/commons-lang/pull/849/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvYnVpbGRlci9SZWZsZWN0aW9uVG9TdHJpbmdCdWlsZGVyLmphdmE=) | `91.96% <94.73%> (+0.56%)` | :arrow_up: | | [...in/java/org/apache/commons/lang3/BooleanUtils.java](https://codecov.io/gh/apache/commons-lang/pull/849/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvQm9vbGVhblV0aWxzLmphdmE=) | `94.82% <0.00%> (+0.28%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). Last update [1bf7d7e...1e8b9de](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=lastupdated_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). Issue Time Tracking --- Worklog Id: (was: 788013) Remaining Estimate: 3h 20m (was: 3.5h) Time Spent: 2h 40m (was: 2.5h) > Create methods on ReflectionToStringBuilder to reflect only select fields > - > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Original Estimate: 6h > Time Spent: 2h 40m > Remaining Estimate: 3h 20m > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? >
[GitHub] [commons-lang] codecov-commenter commented on pull request #849: [LANG-1662] Create methods on ReflectionToStringBuilder to reflect only select fields
codecov-commenter commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175394383 # [Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#849](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (1e8b9de) into [master](https://codecov.io/gh/apache/commons-lang/commit/1bf7d7ec12fa143a1b544cf2dd1a0c1a8de7548a?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (1bf7d7e) will **increase** coverage by `0.00%`. > The diff coverage is `94.73%`. ```diff @@Coverage Diff@@ ## master #849 +/- ## = Coverage 91.71% 91.72% - Complexity 7408 7422 +14 = Files 188 188 Lines 1590015928 +28 Branches 2994 3000+6 = + Hits 1458314610 +27 - Misses 725 726+1 Partials592 592 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...mmons/lang3/builder/ReflectionToStringBuilder.java](https://codecov.io/gh/apache/commons-lang/pull/849/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvYnVpbGRlci9SZWZsZWN0aW9uVG9TdHJpbmdCdWlsZGVyLmphdmE=) | `91.96% <94.73%> (+0.56%)` | :arrow_up: | | [...in/java/org/apache/commons/lang3/BooleanUtils.java](https://codecov.io/gh/apache/commons-lang/pull/849/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvQm9vbGVhblV0aWxzLmphdmE=) | `94.82% <0.00%> (+0.28%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). Last update [1bf7d7e...1e8b9de](https://codecov.io/gh/apache/commons-lang/pull/849?src=pr=lastupdated_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation). -- 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] [Work logged] (LANG-1662) Create methods on ReflectionToStringBuilder to reflect only select fields
[ https://issues.apache.org/jira/browse/LANG-1662?focusedWorklogId=787927=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787927 ] ASF GitHub Bot logged work on LANG-1662: Author: ASF GitHub Bot Created on: 05/Jul/22 16:11 Start Date: 05/Jul/22 16:11 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175237551 When I apply the patch locally and run the Maven build from the command line, I get failures because it seems like the test order matters: ``` [ERROR] org.apache.commons.lang3.builder.ToStringBuilderTest.testDoubleArray Time elapsed: 0.001 s <<< FAILURE! org.opentest4j.AssertionFailedError: Expected null, actual: {org.apache.commons.lang3.builder.ReflectionToStringBuilderIncludeTest$TestFeature@58e9cc9a=null, org.apache.commons.lang3.builder.ReflectionToStringBuil derIncludeTest$TestFeature@7dca6126=null} ==> expected: but was: <{org.apache.commons.lang3.builder.ReflectionToStringBuilderIncludeTest$TestFeature@58e9cc9a=null, org.apache.commons.lang3.builder.Reflectio nToStringBuilderIncludeTest$TestFeature@7dca6126=null}> at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55) at org.junit.jupiter.api.AssertNull.failNotNull(AssertNull.java:54) at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:38) ``` Issue Time Tracking --- Worklog Id: (was: 787927) Remaining Estimate: 3.5h (was: 3h 40m) Time Spent: 2.5h (was: 2h 20m) > Create methods on ReflectionToStringBuilder to reflect only select fields > - > > Key: LANG-1662 > URL: https://issues.apache.org/jira/browse/LANG-1662 > Project: Commons Lang > Issue Type: Improvement > Components: lang.builder.* >Reporter: Daniel Augusto Veronezi Salvador >Priority: Minor > Original Estimate: 6h > Time Spent: 2.5h > Remaining Estimate: 3.5h > > *ReflectionToStringBuilder* has methods to exclude fields from *toString*; If > we have an object with several fields and want to reflect only a fews, we > have to list all the fields that we don't want to reflect and pass to > *excludeFieldNames*. > Would be valid implement a way to pass the fields that we want and reflect > only the selected fields? > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory commented on pull request #849: [LANG-1662] Create methods on ReflectionToStringBuilder to reflect only select fields
garydgregory commented on PR #849: URL: https://github.com/apache/commons-lang/pull/849#issuecomment-1175237551 When I apply the patch locally and run the Maven build from the command line, I get failures because it seems like the test order matters: ``` [ERROR] org.apache.commons.lang3.builder.ToStringBuilderTest.testDoubleArray Time elapsed: 0.001 s <<< FAILURE! org.opentest4j.AssertionFailedError: Expected null, actual: {org.apache.commons.lang3.builder.ReflectionToStringBuilderIncludeTest$TestFeature@58e9cc9a=null, org.apache.commons.lang3.builder.ReflectionToStringBuil derIncludeTest$TestFeature@7dca6126=null} ==> expected: but was: <{org.apache.commons.lang3.builder.ReflectionToStringBuilderIncludeTest$TestFeature@58e9cc9a=null, org.apache.commons.lang3.builder.Reflectio nToStringBuilderIncludeTest$TestFeature@7dca6126=null}> at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55) at org.junit.jupiter.api.AssertNull.failNotNull(AssertNull.java:54) at org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:38) ``` -- 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
[GitHub] [commons-lang] garydgregory commented on a diff in pull request #869: Add missing exception javadoc/tests for some null arguments
garydgregory commented on code in PR #869: URL: https://github.com/apache/commons-lang/pull/869#discussion_r913877942 ## src/main/java/org/apache/commons/lang3/ArrayUtils.java: ## @@ -3790,6 +3790,7 @@ public static > boolean isSorted(final T[] array * @param comparator the {@code Comparator} to compare over * @param the datatype of the array * @return whether the array is sorted + * @throws IllegalArgumentException if {@code comparator == null} Review Comment: This is a NullPointerExcception in git master. In general, please update the comment format to: ``` * @throws IllegalArgumentException if {@code comparator} is null ``` or ``` * @throws IllegalArgumentException if {@code comparator} is {@code null} ``` This reads more like a comment than code. -- 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] (COLLECTIONS-823) BloomFilter: Optimize ArrayCountingBloomFilter.ForEachBitMap
[ https://issues.apache.org/jira/browse/COLLECTIONS-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Herbert resolved COLLECTIONS-823. -- Fix Version/s: 4.5 Resolution: Fixed > BloomFilter: Optimize ArrayCountingBloomFilter.ForEachBitMap > > > Key: COLLECTIONS-823 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-823 > Project: Commons Collections > Issue Type: Improvement > Components: Collection >Affects Versions: 4.5 >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Minor > Labels: bloom-filter > Fix For: 4.5 > > Time Spent: 10m > Remaining Estimate: 0h > > > > Member > h3. > !https://avatars.githubusercontent.com/u/886334?s=48=4|width=24,height=24! > *[aherbert|https://github.com/aherbert]* [on 27 > Feb|https://github.com/apache/commons-collections/pull/258#discussion_r812499923] > This converts all the non zero indices to a bitmap long[] array. But to do so > requires using the {{forEachIndex}} method with a conditional boolean check > on each loop iteration. I wonder if this should be brought inline for > efficiency: > {noformat} > @Override > public boolean forEachBitMap(LongPredicate consumer) { > Objects.requireNonNull(consumer, "consumer"); > long[] result = new > long[BitMap.numberOfBitMaps(shape.getNumberOfBits())]; > for (int i = 0; i < counts.length; i++) { > if (counts[i] != 0) { > // Avoids a second check on the predicate result in > forEachIndex > BitMap.set(result, i); > } > } > return BitMapProducer.fromBitMapArray(result).forEachBitMap(consumer); > } > {noformat} > Or better yet, avoid the {{long[]}} array: > {noformat} > int blocksm1 = BitMap.numberOfBitMaps(shape.getNumberOfBits()) - 1; > int i = 0; > long value; > for (int j = 0; j < blocksm1; j++) { > value = 0; > for (int k = 0; k < Long.SIZE; k++) { > if (counts[i++] != 0) { > value |= BitMap.getLongBit(k); > } > } > if (!consumer.test(value)) { > return false; > } > } > // Final block > value = 0; > for (int k = 0; i < counts.length; k++) { > if (counts[i++] != 0) { > value |= BitMap.getLongBit(k); > } > } > return consumer.test(value); > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory merged pull request #918: docs: Annotation error StringUtils.repeat("", "x", 3) = "xx";
garydgregory merged PR #918: URL: https://github.com/apache/commons-lang/pull/918 -- 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] [Work logged] (LANG-1687) java Document update
[ https://issues.apache.org/jira/browse/LANG-1687?focusedWorklogId=787833=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787833 ] ASF GitHub Bot logged work on LANG-1687: Author: ASF GitHub Bot Created on: 05/Jul/22 12:41 Start Date: 05/Jul/22 12:41 Worklog Time Spent: 10m Work Description: garydgregory closed pull request #908: [LANG-1687] fix java Doc URL: https://github.com/apache/commons-lang/pull/908 Issue Time Tracking --- Worklog Id: (was: 787833) Time Spent: 40m (was: 0.5h) > java Document update > > > Key: LANG-1687 > URL: https://issues.apache.org/jira/browse/LANG-1687 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: taeyongpark >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > The example of java document is incorrect. > > This is not incorrect: > {code:java} > StringUtils.substringBetween("yabczyabcz", "y", "z") = "abc"{code} > This is correct: > {code:java} > StringUtils.substringBetween("yabczyabcz", "y", "z") = "abczyabc"{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1687) java Document update
[ https://issues.apache.org/jira/browse/LANG-1687?focusedWorklogId=787832=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787832 ] ASF GitHub Bot logged work on LANG-1687: Author: ASF GitHub Bot Created on: 05/Jul/22 12:41 Start Date: 05/Jul/22 12:41 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #908: URL: https://github.com/apache/commons-lang/pull/908#issuecomment-1175014136 Closing: -1, see org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringStringString(). Issue Time Tracking --- Worklog Id: (was: 787832) Time Spent: 0.5h (was: 20m) > java Document update > > > Key: LANG-1687 > URL: https://issues.apache.org/jira/browse/LANG-1687 > Project: Commons Lang > Issue Type: Improvement > Components: lang.* >Reporter: taeyongpark >Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > The example of java document is incorrect. > > This is not incorrect: > {code:java} > StringUtils.substringBetween("yabczyabcz", "y", "z") = "abc"{code} > This is correct: > {code:java} > StringUtils.substringBetween("yabczyabcz", "y", "z") = "abczyabc"{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory closed pull request #908: [LANG-1687] fix java Doc
garydgregory closed pull request #908: [LANG-1687] fix java Doc URL: https://github.com/apache/commons-lang/pull/908 -- 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
[GitHub] [commons-lang] garydgregory commented on pull request #908: [LANG-1687] fix java Doc
garydgregory commented on PR #908: URL: https://github.com/apache/commons-lang/pull/908#issuecomment-1175014136 Closing: -1, see org.apache.commons.lang3.StringUtilsSubstringTest.testSubstringBetween_StringStringString(). -- 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] [Work logged] (COLLECTIONS-823) BloomFilter: Optimize ArrayCountingBloomFilter.ForEachBitMap
[ https://issues.apache.org/jira/browse/COLLECTIONS-823?focusedWorklogId=787825=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787825 ] ASF GitHub Bot logged work on COLLECTIONS-823: -- Author: ASF GitHub Bot Created on: 05/Jul/22 12:36 Start Date: 05/Jul/22 12:36 Worklog Time Spent: 10m Work Description: aherbert merged PR #316: URL: https://github.com/apache/commons-collections/pull/316 Issue Time Tracking --- Worklog Id: (was: 787825) Remaining Estimate: 0h Time Spent: 10m > BloomFilter: Optimize ArrayCountingBloomFilter.ForEachBitMap > > > Key: COLLECTIONS-823 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-823 > Project: Commons Collections > Issue Type: Improvement > Components: Collection >Affects Versions: 4.5 >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Minor > Labels: bloom-filter > Time Spent: 10m > Remaining Estimate: 0h > > > > Member > h3. > !https://avatars.githubusercontent.com/u/886334?s=48=4|width=24,height=24! > *[aherbert|https://github.com/aherbert]* [on 27 > Feb|https://github.com/apache/commons-collections/pull/258#discussion_r812499923] > This converts all the non zero indices to a bitmap long[] array. But to do so > requires using the {{forEachIndex}} method with a conditional boolean check > on each loop iteration. I wonder if this should be brought inline for > efficiency: > {noformat} > @Override > public boolean forEachBitMap(LongPredicate consumer) { > Objects.requireNonNull(consumer, "consumer"); > long[] result = new > long[BitMap.numberOfBitMaps(shape.getNumberOfBits())]; > for (int i = 0; i < counts.length; i++) { > if (counts[i] != 0) { > // Avoids a second check on the predicate result in > forEachIndex > BitMap.set(result, i); > } > } > return BitMapProducer.fromBitMapArray(result).forEachBitMap(consumer); > } > {noformat} > Or better yet, avoid the {{long[]}} array: > {noformat} > int blocksm1 = BitMap.numberOfBitMaps(shape.getNumberOfBits()) - 1; > int i = 0; > long value; > for (int j = 0; j < blocksm1; j++) { > value = 0; > for (int k = 0; k < Long.SIZE; k++) { > if (counts[i++] != 0) { > value |= BitMap.getLongBit(k); > } > } > if (!consumer.test(value)) { > return false; > } > } > // Final block > value = 0; > for (int k = 0; i < counts.length; k++) { > if (counts[i++] != 0) { > value |= BitMap.getLongBit(k); > } > } > return consumer.test(value); > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-collections] aherbert merged pull request #316: COLLECTIONS-823: Modified ArrayCountingBloomFilter.forEachBitMap to be more efficient
aherbert merged PR #316: URL: https://github.com/apache/commons-collections/pull/316 -- 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
[GitHub] [commons-lang] garydgregory merged pull request #915: Bump commons.pmd-impl.version from 6.46.0 to 6.47.0
garydgregory merged PR #915: URL: https://github.com/apache/commons-lang/pull/915 -- 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