[jira] [Work logged] (IO-543) ReversedLinesFileReader with 'getFilePointer' and 'seek' API
[ https://issues.apache.org/jira/browse/IO-543?focusedWorklogId=799596=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799596 ] ASF GitHub Bot logged work on IO-543: - Author: ASF GitHub Bot Created on: 10/Aug/22 05:42 Start Date: 10/Aug/22 05:42 Worklog Time Spent: 10m Work Description: Jean-Pierre-Portier commented on PR #39: URL: https://github.com/apache/commons-io/pull/39#issuecomment-1210187340 Hi @garydgregory This is a very old PR and I did not work onto it for a long time now. Let me sync with sources; please. Issue Time Tracking --- Worklog Id: (was: 799596) Time Spent: 40m (was: 0.5h) > ReversedLinesFileReader with 'getFilePointer' and 'seek' API > > > Key: IO-543 > URL: https://issues.apache.org/jira/browse/IO-543 > Project: Commons IO > Issue Type: Improvement >Affects Versions: 2.6 >Reporter: Jean-Pierre Portier >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > Adding API to get/set current file pointer position for > org.apache.commons.io.input.ReversedLinesFileReader class: > - long getFilePointer() > - void seek(long pos) > (they act like java.io.RandomAccessFile API class) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-io] Jean-Pierre-Portier commented on pull request #39: IO-543-ReversedLinesFileReader-with-RandowFileAccess-API
Jean-Pierre-Portier commented on PR #39: URL: https://github.com/apache/commons-io/pull/39#issuecomment-1210187340 Hi @garydgregory This is a very old PR and I did not work onto it for a long time now. Let me sync with sources; please. -- 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] (BEANUTILS-532) Require commons-beanutils library which supports commons-collections-4.x version
[ https://issues.apache.org/jira/browse/BEANUTILS-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577762#comment-17577762 ] Dinesh commented on BEANUTILS-532: -- This is [link|https://advisory.checkmarx.net/advisory/vulnerability/Cx78f40514-81ff/] for security issue with apache commons collections version < 4.3 : > Require commons-beanutils library which supports commons-collections-4.x > version > - > > Key: BEANUTILS-532 > URL: https://issues.apache.org/jira/browse/BEANUTILS-532 > Project: Commons BeanUtils > Issue Type: Bug > Components: Bean-Collections >Reporter: AvanthikaNC >Priority: Blocker > Attachments: image-2020-01-31-14-52-43-114.png > > > Hi Team, > > We are working on ATM SWITCH project and the project currently uses > commons-beanutils library 1.9.4 and we have upgraded to > commons-collections-4.1 as part of our project requirement as it contained > vulnerabilities. > We are facing some errors due to the above mentioned upgrade as > commons-beanutils library 1.9.4 will support commons-collections 3.2.2 > version. > Now as per our requirement we cannot downgrade common-collections library but > we need commons-beanutils library which supports commons-collections4-4.1 > version. > Please provide your response asap. > Thanks -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1638) commons-lang3-3.11 - Date
[ https://issues.apache.org/jira/browse/LANG-1638?focusedWorklogId=799520=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799520 ] ASF GitHub Bot logged work on LANG-1638: Author: ASF GitHub Bot Created on: 09/Aug/22 22:17 Start Date: 09/Aug/22 22:17 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #924: URL: https://github.com/apache/commons-lang/pull/924#issuecomment-1209947123 Should the comment be at the class level instead of duplicated all over? A link to the class comment could also be used. Issue Time Tracking --- Worklog Id: (was: 799520) Time Spent: 50m (was: 40m) > commons-lang3-3.11 - Date > -- > > Key: LANG-1638 > URL: https://issues.apache.org/jira/browse/LANG-1638 > Project: Commons Lang > Issue Type: Bug >Affects Versions: 3.11 > Environment: Production >Reporter: Shailendra Soni >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > December 27th to 31st 2020 gets converted into 2021 while trying to use > `DateFormatUtils.format` method. > {code:java} > import org.apache.commons.lang3.time.DateFormatUtils; > import org.apache.commons.lang3.time.DateUtils; > public class DateEx { > public static void main(String... args) throws Exception{ > String startDateStr = "2020-12-31"; > String startDate = DateFormatUtils > .format(DateUtils.parseDate(startDateStr, "-MM-dd"), > "-MM-dd-HH.MM.SS.mm"); > System.out.println("startDate with Timestamp - " + startDate); > } > } > {code} > > Actual Output - 2021-12-31-00.12.00.00 > Expected Output - 2020-12-31-00.12.00.00 > > Can someone look into it. > > Version :- > # Java -> 1.8.0_212-b10 > # Common-lang3 -> 3.11 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-lang] garydgregory commented on pull request #924: LANG-1638: Added docs regarding week year support
garydgregory commented on PR #924: URL: https://github.com/apache/commons-lang/pull/924#issuecomment-1209947123 Should the comment be at the class level instead of duplicated all over? A link to the class comment could also be used. -- 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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799498=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799498 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 20:23 Start Date: 09/Aug/22 20:23 Worklog Time Spent: 10m Work Description: garydgregory commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941766996 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: I don't see the point in returning a half-functional list. The list should not mangle the underlying record that's all. Issue Time Tracking --- Worklog Id: (was: 799498) Time Spent: 1h (was: 50m) > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 1h > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] garydgregory commented on a diff in pull request #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
garydgregory commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941766996 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: I don't see the point in returning a half-functional list. The list should not mangle the underlying record that's all. -- 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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799496=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799496 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 20:20 Start Date: 09/Aug/22 20:20 Worklog Time Spent: 10m Work Description: kinow commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941764572 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: (Also needs to update the javadocs as mentioned in the JIRA comment too, and needs unit tests as pointed below by @garydgregory :+1: ) Issue Time Tracking --- Worklog Id: (was: 799496) Time Spent: 50m (was: 40m) > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 50m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] kinow commented on a diff in pull request #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
kinow commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941764572 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: (Also needs to update the javadocs as mentioned in the JIRA comment too, and needs unit tests as pointed below by @garydgregory :+1: ) -- 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-io] garydgregory commented on pull request #7: New listFile convenience methods
garydgregory commented on PR #7: URL: https://github.com/apache/commons-io/pull/7#issuecomment-1209831487 -1 needs unit tests. See also discussion items in the Jira ticket. -- 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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799492=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799492 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 20:15 Start Date: 09/Aug/22 20:15 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #249: URL: https://github.com/apache/commons-csv/pull/249#issuecomment-1209829807 -1 needs a unit test Issue Time Tracking --- Worklog Id: (was: 799492) Time Spent: 40m (was: 0.5h) > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 40m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] garydgregory commented on pull request #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
garydgregory commented on PR #249: URL: https://github.com/apache/commons-csv/pull/249#issuecomment-1209829807 -1 needs a unit test -- 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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799488=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799488 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 20:06 Start Date: 09/Aug/22 20:06 Worklog Time Spent: 10m Work Description: kinow commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941754150 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: See @aherbert 's comment in the JIRA linked about returning an immutable list. Unless there's a reason for allowing users to modify the returned list, I think an immutable list would be best :+1: Thanks for the pull request! -Bruno Issue Time Tracking --- Worklog Id: (was: 799488) Time Spent: 0.5h (was: 20m) > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 0.5h > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] kinow commented on a diff in pull request #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
kinow commented on code in PR #249: URL: https://github.com/apache/commons-csv/pull/249#discussion_r941754150 ## src/main/java/org/apache/commons/csv/CSVRecord.java: ## @@ -298,13 +299,14 @@ public Stream stream() { } /** - * Converts the values to a List. + * Converts the values to a new {@code List}. + * Modifications to the list do not alter this record. * - * @return a new List + * @return a new {@code List} * @since 1.9.0 */ public List toList() { -return Arrays.asList(values); +return new ArrayList<>(Arrays.asList(values)); Review Comment: See @aherbert 's comment in the JIRA linked about returning an immutable list. Unless there's a reason for allowing users to modify the returned list, I think an immutable list would be best :+1: Thanks for the pull request! -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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799484=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799484 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 19:44 Start Date: 09/Aug/22 19:44 Worklog Time Spent: 10m Work Description: codecov-commenter commented on PR #249: URL: https://github.com/apache/commons-csv/pull/249#issuecomment-1209802959 # [Codecov](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#249](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (4ffdf29) into [master](https://codecov.io/gh/apache/commons-csv/commit/532e08c3c4b7b8e8d71002480bf4976f9a8985f8?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (532e08c) will **not change** coverage. > The diff coverage is `100.00%`. ```diff @@Coverage Diff@@ ## master #249 +/- ## = Coverage 96.99% 96.99% Complexity 529 529 = Files11 11 Lines 1166 1166 Branches205 205 = Hits 1131 1131 Misses 23 23 Partials 12 12 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...rc/main/java/org/apache/commons/csv/CSVRecord.java](https://codecov.io/gh/apache/commons-csv/pull/249/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY3N2L0NTVlJlY29yZC5qYXZh) | `100.00% <100.00%> (ø)` | | :mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Issue Time Tracking --- Worklog Id: (was: 799484) Time Spent: 20m (was: 10m) > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 20m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] codecov-commenter commented on pull request #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
codecov-commenter commented on PR #249: URL: https://github.com/apache/commons-csv/pull/249#issuecomment-1209802959 # [Codecov](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#249](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (4ffdf29) into [master](https://codecov.io/gh/apache/commons-csv/commit/532e08c3c4b7b8e8d71002480bf4976f9a8985f8?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (532e08c) will **not change** coverage. > The diff coverage is `100.00%`. ```diff @@Coverage Diff@@ ## master #249 +/- ## = Coverage 96.99% 96.99% Complexity 529 529 = Files11 11 Lines 1166 1166 Branches205 205 = Hits 1131 1131 Misses 23 23 Partials 12 12 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-csv/pull/249?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...rc/main/java/org/apache/commons/csv/CSVRecord.java](https://codecov.io/gh/apache/commons-csv/pull/249/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY3N2L0NTVlJlY29yZC5qYXZh) | `100.00% <100.00%> (ø)` | | :mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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
[GitHub] [commons-lang] arturobernalg commented on pull request #904: Add a bunch of test in order to increase the coverage.
arturobernalg commented on PR #904: URL: https://github.com/apache/commons-lang/pull/904#issuecomment-1209799306 Fix all the remarks @garydgregory ty. -- 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] (VFS-683) Thread safety issue in VFSClassLoader - NullPointerException thrown
[ https://issues.apache.org/jira/browse/VFS-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577602#comment-17577602 ] Dave MacDonald commented on VFS-683: I created a [branch|https://github.com/davem62210/commons-vfs/compare/threads-and-classloading] with a new test case to show the failure. Are you saying this case is expected to fail? If so that is surprising. > Thread safety issue in VFSClassLoader - NullPointerException thrown > --- > > Key: VFS-683 > URL: https://issues.apache.org/jira/browse/VFS-683 > Project: Commons VFS > Issue Type: Bug >Affects Versions: 2.2 >Reporter: Daryl Odnert >Assignee: Gary D. Gregory >Priority: Major > Attachments: Main.java > > Time Spent: 1.5h > Remaining Estimate: 0h > > In my application, I have two instances of the {{VFSClassLoader}}, each of > which is being used in a distinct thread. Both {{VFSClassLoader}} instances > refer to the same compressed file resource described by a {{FileObject}} that > is passed to the class loader's constructor. Intermittently, the application > throws an exception with the stack trace shown below. So, there seems to be > either a race condition in the code or an undocumented assumption here. If it > is unsupported for two {{VFSClassLoader}} instances to refer to the same > resource (file), then that assumption should be documented. But if that is > not the case, then there is a race condition bug in the implementation. > {noformat} > 43789 WARN {} c.a.e.u.PreferredPathClassLoader - While loading class > org.apache.hive.jdbc.HiveDatabaseMetaData, rethrowing unexpected > java.lang.NullPointerException: Inflater has been closed > java.lang.NullPointerException: Inflater has been closed > at java.util.zip.Inflater.ensureOpen(Inflater.java:389) > at java.util.zip.Inflater.inflate(Inflater.java:257) > at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > at > org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91) > at org.apache.commons.vfs2.FileUtil.getContent(FileUtil.java:47) > at org.apache.commons.vfs2.impl.Resource.getBytes(Resource.java:102) > at > org.apache.commons.vfs2.impl.VFSClassLoader.defineClass(VFSClassLoader.java:179) > at > org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:150) > at > com.atscale.engine.utils.PreferredPathClassLoader.findClass(PreferredPathClassLoader.scala:54) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (IO-473) Add classpath based lookups to FileUtils
[ https://issues.apache.org/jira/browse/IO-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577558#comment-17577558 ] Amir Gur edited comment on IO-473 at 8/9/22 5:51 PM: - [~ggregory] - thanks. Updated the ticket to: * Reflect it is focused on lack of classpath based lookups rather than just the end result convenient methods. * Listed opened issues Qs on description. Similar PR w/ tests isn't hard to make, just may take time to get there and am now heads done on other things. Anyone is welcomed to chime in to contribute one. was (Author: agur): [~ggregory] - thanks. Updated the ticket to: * Reflect it is focused lacck of classpath based lookups rather than just the end result convenient methods. * Listed opened issues Qs on description. Similar PR w/ tests isn't hard to make, just may take time to get there. Or anyone can chime in to contribute one. > Add classpath based lookups to FileUtils > > > Key: IO-473 > URL: https://issues.apache.org/jira/browse/IO-473 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.4 >Reporter: Amir Gur >Priority: Trivial > > Lacking classpath based lookup methods such as: > {code:java} > - Collection listFiles(String[] extensions) > - Collection listFiles(String extension, String classpathRoot) > {code} > Created [pull request 7|https://github.com/apache/commons-io/pull/7]. > > Q1: does such classpath based lookup already exists elsewhere (that is on > such a generic apache commons level, not buried in some other huge > specialized project). If not exists this is neede. > Q2: does it belong here, or on another Utils class/package? > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (IO-473) Add classpath based lookups to FileUtils
[ https://issues.apache.org/jira/browse/IO-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577558#comment-17577558 ] Amir Gur commented on IO-473: - [~ggregory] - thanks. Updated the ticket to: * Reflect it is focused lacck of classpath based lookups rather than just the end result convenient methods. * Listed opened issues Qs on description. Similar PR w/ tests isn't hard to make, just may take time to get there. Or anyone can chime in to contribute one. > Add classpath based lookups to FileUtils > > > Key: IO-473 > URL: https://issues.apache.org/jira/browse/IO-473 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.4 >Reporter: Amir Gur >Priority: Trivial > > Lacking classpath based lookup methods such as: > {code:java} > - Collection listFiles(String[] extensions) > - Collection listFiles(String extension, String classpathRoot) > {code} > Created [pull request 7|https://github.com/apache/commons-io/pull/7]. > > Q1: does such classpath based lookup already exists elsewhere (that is on > such a generic apache commons level, not buried in some other huge > specialized project). If not exists this is neede. > Q2: does it belong here, or on another Utils class/package? > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (IO-473) Add classpath based lookups to FileUtils
[ https://issues.apache.org/jira/browse/IO-473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amir Gur updated IO-473: Description: Lacking classpath based lookup methods such as: {code:java} - Collection listFiles(String[] extensions) - Collection listFiles(String extension, String classpathRoot) {code} Created [pull request 7|https://github.com/apache/commons-io/pull/7]. Q1: does such classpath based lookup already exists elsewhere (that is on such a generic apache commons level, not buried in some other huge specialized project). If not exists this is neede. Q2: does it belong here, or on another Utils class/package? was: Lacking classpath based lookup methods such as: {code:java} - Collection listFiles(String[] extensions) - Collection listFiles(String extension, String classpathRoot) {code} Created [pull request 7|https://github.com/apache/commons-io/pull/7]. > Add classpath based lookups to FileUtils > > > Key: IO-473 > URL: https://issues.apache.org/jira/browse/IO-473 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.4 >Reporter: Amir Gur >Priority: Trivial > > Lacking classpath based lookup methods such as: > {code:java} > - Collection listFiles(String[] extensions) > - Collection listFiles(String extension, String classpathRoot) > {code} > Created [pull request 7|https://github.com/apache/commons-io/pull/7]. > > Q1: does such classpath based lookup already exists elsewhere (that is on > such a generic apache commons level, not buried in some other huge > specialized project). If not exists this is neede. > Q2: does it belong here, or on another Utils class/package? > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (IO-473) Add classpath based lookups to FileUtils
[ https://issues.apache.org/jira/browse/IO-473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amir Gur updated IO-473: Description: Lacking classpath based lookup methods such as: {code:java} - Collection listFiles(String[] extensions) - Collection listFiles(String extension, String classpathRoot) {code} Created [pull request 7|https://github.com/apache/commons-io/pull/7]. was: Lacking a few convenience methods such as: {code} - Collection listFiles(String[] extensions) - Collection listFiles(String extension, String classpathRoot) {code} Created [pull request 7|https://github.com/apache/commons-io/pull/7]. > Add classpath based lookups to FileUtils > > > Key: IO-473 > URL: https://issues.apache.org/jira/browse/IO-473 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.4 >Reporter: Amir Gur >Priority: Trivial > > Lacking classpath based lookup methods such as: > {code:java} > - Collection listFiles(String[] extensions) > - Collection listFiles(String extension, String classpathRoot) > {code} > Created [pull request 7|https://github.com/apache/commons-io/pull/7]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (IO-473) Add classpath based lookups to FileUtils
[ https://issues.apache.org/jira/browse/IO-473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amir Gur updated IO-473: Summary: Add classpath based lookups to FileUtils (was: Add convenient listFiles to FileUtils) > Add classpath based lookups to FileUtils > > > Key: IO-473 > URL: https://issues.apache.org/jira/browse/IO-473 > Project: Commons IO > Issue Type: Improvement > Components: Filters >Affects Versions: 2.4 >Reporter: Amir Gur >Priority: Trivial > > Lacking a few convenience methods such as: > {code} > - Collection listFiles(String[] extensions) > - Collection listFiles(String extension, String classpathRoot) > {code} > Created [pull request 7|https://github.com/apache/commons-io/pull/7]. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-collections] aherbert commented on a diff in pull request #329: Collections-818: convert to characteristics flag
aherbert commented on code in PR #329: URL: https://github.com/apache/commons-collections/pull/329#discussion_r941544205 ## src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java: ## @@ -29,6 +29,15 @@ */ public interface BloomFilter extends IndexProducer, BitMapProducer { +/** + * The sparse characteristic used to determine the best method for matching. + * For `sparse` implementations + * the {@code forEachIndex(IntConsumer consumer)} method is more efficient. For non `sparse` implementations + * the {@code forEachBitMap(LongConsumer consumer)} is more efficient. Implementers should determine if it is easier + * for the implementation to produce indexes of bit map blocks. + */ +int SPARSE=0x1; Review Comment: `SPARSE = 0x1` ## src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java: ## @@ -38,17 +47,12 @@ public interface BloomFilter extends IndexProducer, BitMapProducer { // Query Operations /** - * This method is used to determine the best method for matching. - * - * For `sparse` implementations - * the {@code forEachIndex(IntConsumer consumer)} method is more efficient. For non `sparse` implementations - * the {@code forEachBitMap(LongConsumer consumer)} is more efficient. Implementers should determine if it is easier - * for the implementation to produce indexes of bit map blocks. - * - * @return {@code true} if the implementation is sparse {@code false} otherwise. - * @see BitMap + * Returns the bitmap of characteristics of the filter. Review Comment: Drop the `bitmap of`. I think it confusing as `bitmap` in this package is specifically used to refer to a range of indices [0, 63] packed into a long. ## src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java: ## @@ -38,17 +47,12 @@ public interface BloomFilter extends IndexProducer, BitMapProducer { // Query Operations /** - * This method is used to determine the best method for matching. - * - * For `sparse` implementations - * the {@code forEachIndex(IntConsumer consumer)} method is more efficient. For non `sparse` implementations - * the {@code forEachBitMap(LongConsumer consumer)} is more efficient. Implementers should determine if it is easier - * for the implementation to produce indexes of bit map blocks. - * - * @return {@code true} if the implementation is sparse {@code false} otherwise. - * @see BitMap + * Returns the bitmap of characteristics of the filter. + * + * Characteristics are defined as bits witin the characteristics integer. Review Comment: `within` ## src/main/java/org/apache/commons/collections4/bloomfilter/SimpleBloomFilter.java: ## @@ -194,7 +194,7 @@ public boolean merge(Hasher hasher) { @Override public boolean merge(BloomFilter other) { Objects.requireNonNull(other, "other"); -if (other.isSparse()) { +if ((other.characteristics())>0) { Review Comment: whitespace: `(other.characteristics() & SPARSE) != 0` ## src/main/java/org/apache/commons/collections4/bloomfilter/SparseBloomFilter.java: ## @@ -58,7 +58,7 @@ public SparseBloomFilter(BloomFilter other) { Objects.requireNonNull(other, "other"); this.shape = other.getShape(); this.indices = new TreeSet<>(); -if (other.isSparse()) { +if ((other.characteristics())>0) { Review Comment: whitespace: `(other.characteristics() & SPARSE) != 0` ## src/main/java/org/apache/commons/collections4/bloomfilter/SparseBloomFilter.java: ## @@ -169,7 +169,7 @@ public boolean merge(Hasher hasher) { @Override public boolean merge(BloomFilter other) { Objects.requireNonNull(other, "other"); -IndexProducer producer = other.isSparse() ? (IndexProducer) other : IndexProducer.fromBitMapProducer(other); +IndexProducer producer = (other.characteristics())>0 ? (IndexProducer) other : IndexProducer.fromBitMapProducer(other); Review Comment: whitespace: `(other.characteristics() & SPARSE) != 0` ## src/main/java/org/apache/commons/collections4/bloomfilter/SimpleBloomFilter.java: ## @@ -65,7 +65,7 @@ public SimpleBloomFilter(BloomFilter other) { this.shape = other.getShape(); this.bitMap = new long[BitMap.numberOfBitMaps(shape.getNumberOfBits())]; this.cardinality = 0; -if (other.isSparse()) { +if ((other.characteristics())>0) { Review Comment: whitespace: `(other.characteristics() & SPARSE) != 0` ## src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java: ## @@ -69,7 +73,7 @@ public interface BloomFilter extends IndexProducer, BitMapProducer { */ default boolean contains(BloomFilter other) {
[GitHub] [commons-collections] aherbert commented on a diff in pull request #328: Collections 827: Add tests using or, and and xor with different length filters.
aherbert commented on code in PR #328: URL: https://github.com/apache/commons-collections/pull/328#discussion_r941542308 ## src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java: ## @@ -222,12 +222,26 @@ public final void testOrCardinality() { filter2 = new SparseBloomFilter(shape, IndexProducer.fromIndexArray(new int[] { 5, 64, 69 })); assertEquals(4, SetOperations.orCardinality(filter1, filter2)); assertEquals(4, SetOperations.orCardinality(filter2, filter1)); +} -Shape bigShape = Shape.fromKM(3, 192); -filter1 = new SparseBloomFilter(bigShape, IndexProducer.fromIndexArray(new int[] { 1, 63, 185})); -filter2 = new SparseBloomFilter(shape, IndexProducer.fromIndexArray(new int[] { 5, 63, 69 })); +@Test +public final void testOrCardinalityWithDifferentLengthFilters() { +Shape shape = Shape.fromKM(3, 128); +Shape shape2 = Shape.fromKM(3, 192); +SparseBloomFilter filter1 = new SparseBloomFilter(shape, IndexProducer.fromIndexArray(new int[] { 1, 63, 64 })); +SparseBloomFilter filter2 = new SparseBloomFilter(shape2, IndexProducer.fromIndexArray(new int[] { 5, 64, 169 })); +assertEquals(5, SetOperations.orCardinality(filter1, filter2)); +assertEquals(5, SetOperations.orCardinality(filter2, filter1)); + +filter1 = new SparseBloomFilter(shape, IndexProducer.fromIndexArray(new int[] { 1, 63 })); +filter2 = new SparseBloomFilter(shape2, IndexProducer.fromIndexArray(new int[] { 5, 64, 169 })); assertEquals(5, SetOperations.orCardinality(filter1, filter2)); assertEquals(5, SetOperations.orCardinality(filter2, filter1)); + +filter1 = new SparseBloomFilter(shape, IndexProducer.fromIndexArray(new int[] { 5, 63 })); +filter2 = new SparseBloomFilter(shape2, IndexProducer.fromIndexArray(new int[] { 5, 64, 169 })); +assertEquals(4, SetOperations.orCardinality(filter1, filter2)); +assertEquals(4, SetOperations.orCardinality(filter2, filter1)); Review Comment: I think we can reduce the amount of duplicate code with a custom assertion: ```Java assertSymmetricOperation(4, SetOperations::orCardinality, filter1, filter2); } private static void assertSymmetricOperation(int expected, ToIntBiFunction operation, BloomFilter filter1, BloomFilter filter2) { assertEquals(expected, operation.applyAsInt(filter1, filter2), "op(filter1, filter2)"); assertEquals(expected, operation.applyAsInt(filter2, filter1), "op(filter2, filter1)"); } ``` This ensures you only have one place where you specify the expected value and where filter 1 and 2 are swapped as arguments to the assertion. -- 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] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577499#comment-17577499 ] Alex Herbert commented on CSV-300: -- Is there any reason to wish to modify the list? If the list is intended for read-only usage then array copies can be prevented in the ArrayList constructor by avoiding creating a new ArrayList and instead using: {code:java} public List toList() { // Current bug // return Arrays.asList(values); // Suggested // return new ArrayList<>(Arrays.asList(values)); // Immutable return return Collections.unmodifiableList(Arrays.asList(values)); } {code} The javadoc would have to be updated to state that the list is not modifiable. Currently the present code returns a list that has mutable elements but cannot change in size so this is a minor functional compatibility change. > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 10m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577438#comment-17577438 ] Markus Spann commented on CSV-300: -- Pull request [#249|https://github.com/apache/commons-csv/pull/249] created. > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 10m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (CSV-300) CSVRecord.toList() gives write access to private values array
[ https://issues.apache.org/jira/browse/CSV-300?focusedWorklogId=799357=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-799357 ] ASF GitHub Bot logged work on CSV-300: -- Author: ASF GitHub Bot Created on: 09/Aug/22 14:06 Start Date: 09/Aug/22 14:06 Worklog Time Spent: 10m Work Description: sman-81 opened a new pull request, #249: URL: https://github.com/apache/commons-csv/pull/249 This PR offers a fix to bug CSV-300. Issue Time Tracking --- Worklog Id: (was: 799357) Remaining Estimate: 0h Time Spent: 10m > CSVRecord.toList() gives write access to private values array > - > > Key: CSV-300 > URL: https://issues.apache.org/jira/browse/CSV-300 > Project: Commons CSV > Issue Type: Bug >Affects Versions: 1.9.0 >Reporter: Markus Spann >Priority: Trivial > Time Spent: 10m > Remaining Estimate: 0h > > {{CSVRecord.toList()}} converts the values to a list by calling > {{Arrays.asList}} which writes to the private array in calls to > {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-csv] sman-81 opened a new pull request, #249: [CSV-300] Return new ArrayList in CSVRecord.toList() to prevent access to private values array
sman-81 opened a new pull request, #249: URL: https://github.com/apache/commons-csv/pull/249 This PR offers a fix to bug CSV-300. -- 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] [Created] (CSV-300) CSVRecord.toList() gives write access to private values array
Markus Spann created CSV-300: Summary: CSVRecord.toList() gives write access to private values array Key: CSV-300 URL: https://issues.apache.org/jira/browse/CSV-300 Project: Commons CSV Issue Type: Bug Affects Versions: 1.9.0 Reporter: Markus Spann {{CSVRecord.toList()}} converts the values to a list by calling {{Arrays.asList}} which writes to the private array in calls to {{{}Arrays.ArrayList.set(int, E){}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (VALIDATOR-390) Upgrade to Commons Collections 4.x
[ https://issues.apache.org/jira/browse/VALIDATOR-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577268#comment-17577268 ] Dinesh edited comment on VALIDATOR-390 at 8/9/22 8:32 AM: -- Hi, There is security issue related to apache commons collection version < 4.3.x, Ref: [https://advisory.checkmarx.net/advisory/vulnerability/Cx78f40514-81ff/] Adding this comment just to avoid version less than 4.3 was (Author: bhagat_dineshbe2006): Hi, There is security issue related to apache commons collection version < 4.3.x, Ref: [https://advisory.checkmarx.net/advisory/vulnerability/Cx78f40514-81ff/] > Upgrade to Commons Collections 4.x > -- > > Key: VALIDATOR-390 > URL: https://issues.apache.org/jira/browse/VALIDATOR-390 > Project: Commons Validator > Issue Type: Improvement >Reporter: Jake Brownell >Priority: Minor > > Commons Validator 1.5 now uses Java 1.6. Commons Collections 4.0/4.1 has the > same Java requirement. > I noticed that CV seems to be the only one of many third party dependencies > in my project that requires CC 3.2. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (VALIDATOR-390) Upgrade to Commons Collections 4.x
[ https://issues.apache.org/jira/browse/VALIDATOR-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17577268#comment-17577268 ] Dinesh commented on VALIDATOR-390: -- Hi, There is security issue related to apache commons collection version < 4.3.x, Ref: [https://advisory.checkmarx.net/advisory/vulnerability/Cx78f40514-81ff/] > Upgrade to Commons Collections 4.x > -- > > Key: VALIDATOR-390 > URL: https://issues.apache.org/jira/browse/VALIDATOR-390 > Project: Commons Validator > Issue Type: Improvement >Reporter: Jake Brownell >Priority: Minor > > Commons Validator 1.5 now uses Java 1.6. Commons Collections 4.0/4.1 has the > same Java requirement. > I noticed that CV seems to be the only one of many third party dependencies > in my project that requires CC 3.2. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (COLLECTIONS-825) BloomFilter: drop SimpleHasher.getDefaultIncrement
[ https://issues.apache.org/jira/browse/COLLECTIONS-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Herbert resolved COLLECTIONS-825. -- Resolution: Done > BloomFilter: drop SimpleHasher.getDefaultIncrement > --- > > Key: COLLECTIONS-825 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-825 > Project: Commons Collections > Issue Type: Improvement >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Major > Labels: bloom-filter > Fix For: 4.5 > > > {noformat} > src/main/java/org/apache/commons/collections4/bloomfilter/SimpleHasher.java > * > * @return The default increment to use when the requested increment is > zero. > */ > public long getDefaultIncrement() { > Member > {noformat} > @aherbert aherbert on 27 Feb > I think this should be dropped. The default increment will fix the rare case > 1 in 2^64 that the increment is zero. But it does not fix the more common > case (1 in nbits) that the increment for the shape will be zero. Dropping > this simplifies the constructor. A zero increment can be handled later. > @Claude-at-Instaclustr Claude-at-Instaclustr on 10 Mar > This is to handle the case where an existing implementation has chosen a > different default value while still allowing the commons code to drop in > place. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Reopened] (COLLECTIONS-825) BloomFilter: drop SimpleHasher.getDefaultIncrement
[ https://issues.apache.org/jira/browse/COLLECTIONS-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Herbert reopened COLLECTIONS-825: -- > BloomFilter: drop SimpleHasher.getDefaultIncrement > --- > > Key: COLLECTIONS-825 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-825 > Project: Commons Collections > Issue Type: Improvement >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Major > Labels: bloom-filter > Fix For: 4.5 > > > {noformat} > src/main/java/org/apache/commons/collections4/bloomfilter/SimpleHasher.java > * > * @return The default increment to use when the requested increment is > zero. > */ > public long getDefaultIncrement() { > Member > {noformat} > @aherbert aherbert on 27 Feb > I think this should be dropped. The default increment will fix the rare case > 1 in 2^64 that the increment is zero. But it does not fix the more common > case (1 in nbits) that the increment for the shape will be zero. Dropping > this simplifies the constructor. A zero increment can be handled later. > @Claude-at-Instaclustr Claude-at-Instaclustr on 10 Mar > This is to handle the case where an existing implementation has chosen a > different default value while still allowing the commons code to drop in > place. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-collections] codecov-commenter commented on pull request #329: Collections-818: convert to characteristics flag
codecov-commenter commented on PR #329: URL: https://github.com/apache/commons-collections/pull/329#issuecomment-1209039539 # [Codecov](https://codecov.io/gh/apache/commons-collections/pull/329?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#329](https://codecov.io/gh/apache/commons-collections/pull/329?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (853ae39) into [master](https://codecov.io/gh/apache/commons-collections/commit/df091173cdfabd5ecc852f47c978ee9bcb2b7059?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (df09117) will **decrease** coverage by `0.05%`. > The diff coverage is `100.00%`. ```diff @@ Coverage Diff @@ ## master #329 +/- ## - Coverage 86.01% 85.96% -0.06% + Complexity 4675 4673 -2 Files 288 288 Lines 1347313473 Branches 1980 1980 - Hits 1158911582 -7 - Misses 1323 1327 +4 - Partials561 564 +3 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-collections/pull/329?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...ections4/bloomfilter/ArrayCountingBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/329/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0FycmF5Q291bnRpbmdCbG9vbUZpbHRlci5qYXZh) | `100.00% <100.00%> (ø)` | | | [.../commons/collections4/bloomfilter/BloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/329/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0Jsb29tRmlsdGVyLmphdmE=) | `100.00% <100.00%> (ø)` | | | [...ns/collections4/bloomfilter/SimpleBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/329/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL1NpbXBsZUJsb29tRmlsdGVyLmphdmE=) | `94.25% <100.00%> (ø)` | | | [...ns/collections4/bloomfilter/SparseBloomFilter.java](https://codecov.io/gh/apache/commons-collections/pull/329/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL1NwYXJzZUJsb29tRmlsdGVyLmphdmE=) | `96.66% <100.00%> (ø)` | | | [...commons/collections4/map/AbstractReferenceMap.java](https://codecov.io/gh/apache/commons-collections/pull/329/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9BYnN0cmFjdFJlZmVyZW5jZU1hcC5qYXZh) | `88.88% <0.00%> (-2.60%)` | :arrow_down: | :mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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] [Updated] (COLLECTIONS-818) BloomFilter: convert to characteristics flag
[ https://issues.apache.org/jira/browse/COLLECTIONS-818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claude Warren updated COLLECTIONS-818: -- Assignee: Claude Warren > BloomFilter: convert to characteristics flag > > > Key: COLLECTIONS-818 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-818 > Project: Commons Collections > Issue Type: Improvement > Components: Collection >Affects Versions: 4.5 >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Minor > > [https://github.com/Claudenw/commons-collections/blob/9f2945cc98747893456b73f42ab53f46a866ac37/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java#L51] > > As with IndexProducer this could be replaced with a characteristics flag: > > {{int characteristics();}} > Currently the only characteristic is sparse. Are there any other > characteristics to report that may be of use? This would allow them to be > added without adding more methods to the interface. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CLI-316) Integrating commons-cli into oss-fuzz
Dae Glendowne created CLI-316: - Summary: Integrating commons-cli into oss-fuzz Key: CLI-316 URL: https://issues.apache.org/jira/browse/CLI-316 Project: Commons CLI Issue Type: Improvement Reporter: Dae Glendowne Hi all, we have prepared the [initial integration|https://github.com/CodeIntelligenceTesting/oss-fuzz/tree/apache-commons-cli/projects/apache-commons-cli] of commons-cli into [Google OSS-Fuzz|https://github.com/google/oss-fuzz] which will provide more security for your project. *Why do you need Fuzzing?* The Code Intelligence JVM fuzzer [Jazzer|https://github.com/CodeIntelligenceTesting/jazzer] has already found [hundreds of bugs|https://github.com/CodeIntelligenceTesting/jazzer#findings] in open source projects including for example [OpenJDK|https://nvd.nist.gov/vuln/detail/CVE-2022-21360], [Protobuf|https://nvd.nist.gov/vuln/detail/CVE-2021-22569] or [jsoup|https://github.com/jhy/jsoup/security/advisories/GHSA-m72m-mhq2-9p6c]. Fuzzing proved to be very effective having no false positives. It provides a crashing input which helps you to reproduce and debug any finding easily. The integration of your project into the OSS-Fuzz platform will enable continuous fuzzing of your project by [Jazzer|https://github.com/CodeIntelligenceTesting/jazzer]. *What do you need to do?* The integration requires the maintainer or one established project committer to deal with the bug reports. You need to create or provide one email address that is associated with a google account as per [here|https://google.github.io/oss-fuzz/getting-started/accepting-new-projects/]. When a bug is found, you will receive an email that will provide you with access to ClusterFuzz, crash reports, code coverage reports and fuzzer statistics. More than 1 person can be included. *How Code Intelligence can support?* We will continue to add more fuzz targets to improve code coverage over time. Furthermore, we are permanently enhancing fuzzing technologies by developing new fuzzers and more bug detectors. Please let me know if you have any questions regarding fuzzing or the OSS-Fuzz integration. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [commons-collections] Claudenw opened a new pull request, #329: Collections-818: convert to characteristics flag
Claudenw opened a new pull request, #329: URL: https://github.com/apache/commons-collections/pull/329 converted BloomFilter.isSparse() to BloomFilter.characteristics() and defiend SPARSE constant. fixes Collections-818 -- 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-collections] codecov-commenter commented on pull request #328: Collections 827: Add tests using or, and and xor with different length filters.
codecov-commenter commented on PR #328: URL: https://github.com/apache/commons-collections/pull/328#issuecomment-1208974618 # [Codecov](https://codecov.io/gh/apache/commons-collections/pull/328?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) Report > Merging [#328](https://codecov.io/gh/apache/commons-collections/pull/328?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (4c58624) into [master](https://codecov.io/gh/apache/commons-collections/commit/df091173cdfabd5ecc852f47c978ee9bcb2b7059?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) (df09117) will **decrease** coverage by `0.05%`. > The diff coverage is `n/a`. ```diff @@ Coverage Diff @@ ## master #328 +/- ## - Coverage 86.01% 85.96% -0.06% + Complexity 4675 4673 -2 Files 288 288 Lines 1347313473 Branches 1980 1980 - Hits 1158911582 -7 - Misses 1323 1327 +4 - Partials561 564 +3 ``` | [Impacted Files](https://codecov.io/gh/apache/commons-collections/pull/328?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [...commons/collections4/map/AbstractReferenceMap.java](https://codecov.io/gh/apache/commons-collections/pull/328/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9BYnN0cmFjdFJlZmVyZW5jZU1hcC5qYXZh) | `88.88% <0.00%> (-2.60%)` | :arrow_down: | :mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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
[GitHub] [commons-collections] Claudenw opened a new pull request, #328: Collections 827: Add tests using or, and and xor with different length filters.
Claudenw opened a new pull request, #328: URL: https://github.com/apache/commons-collections/pull/328 Added tests between shapes of different length for "or", "and" and "xor" operations. -- 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-825) BloomFilter: drop SimpleHasher.getDefaultIncrement
[ https://issues.apache.org/jira/browse/COLLECTIONS-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claude Warren resolved COLLECTIONS-825. --- Fix Version/s: 4.5 Resolution: Fixed > BloomFilter: drop SimpleHasher.getDefaultIncrement > --- > > Key: COLLECTIONS-825 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-825 > Project: Commons Collections > Issue Type: Improvement >Reporter: Claude Warren >Assignee: Claude Warren >Priority: Major > Labels: bloom-filter > Fix For: 4.5 > > > {noformat} > src/main/java/org/apache/commons/collections4/bloomfilter/SimpleHasher.java > * > * @return The default increment to use when the requested increment is > zero. > */ > public long getDefaultIncrement() { > Member > {noformat} > @aherbert aherbert on 27 Feb > I think this should be dropped. The default increment will fix the rare case > 1 in 2^64 that the increment is zero. But it does not fix the more common > case (1 in nbits) that the increment for the shape will be zero. Dropping > this simplifies the constructor. A zero increment can be handled later. > @Claude-at-Instaclustr Claude-at-Instaclustr on 10 Mar > This is to handle the case where an existing implementation has chosen a > different default value while still allowing the commons code to drop in > place. -- This message was sent by Atlassian Jira (v8.20.10#820010)