[GitHub] [commons-collections] aherbert commented on a diff in pull request #320: Collections 824: Optimize SimpleHasher.forEachIndex and SimpleHasher name change

2022-08-04 Thread GitBox


aherbert commented on code in PR #320:
URL: 
https://github.com/apache/commons-collections/pull/320#discussion_r937459355


##
src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java:
##
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.collections4.bloomfilter;
+
+import java.util.Objects;
+import java.util.function.IntPredicate;
+
+/**
+ * A Hasher that implements combinatorial hashing as as described by
+ * https://www.eecs.harvard.edu/~michaelm/postscripts/tr-02-05.pdf";>Krisch 
and Mitzenmacher using the enhanced double hashing technique
+ * described in the wikipedia article  https://en.wikipedia.org/wiki/Double_hashing#Enhanced_double_hashing";>Double
 Hashing.
+ * 
+ * Common use for this hasher is to generate bit indices from a byte array 
output of a hashing
+ * or MessageDigest algorithm.
+ *
+ * Thoughts on the hasher input
+ *
+ *Note that it is worse to create smaller numbers for the 
initial and increment. If the initial is 
smaller than
+ * the number of bits in a filter then hashing will start at the same point 
when the size increases; likewise the increment will be
+ * the same if it remains smaller than the number of bits in the filter and so 
the first few indices will be the same if the number of bits
+ * changes (but is still larger than the increment). In a worse 
case scenario with small initial and increment for
+ * all items, hashing may not create indices that fill the full region within 
a much larger filter. Imagine hashers created with initial
+ * and increment values less than 255 with a filter size of 3 
and number of hash functions as 5. Ignoring the
+ * tetrahedral addition (a maximum of 20 for k=5) the max index is 255 * 4 + 
255 = 1275, this covers 4.25% of the filter. This also
+ * ignores the negative wrapping but the behaviour is the same, some bits 
cannot be reached.
+ * 
+ * So this needs to be avoided as the filter probability assumptions will be 
void. If the initial and increment are larger
+ * than the number of bits then the modulus will create a 'random' position 
and increment within the size.
+ * 
+ *
+ * @since 4.5
+ */
+public class EnhancedDoubleHasher implements Hasher {
+
+/**
+ * The initial hash value.
+ */
+private final long initial;
+
+/**
+ * The value to increment the hash value by.
+ */
+private final long increment;
+
+/**
+ * Convert bytes to big-endian long filling with zero bytes as necessary..
+ * @param byteArray the byte array to extract the values from.
+ * @param offset the offset to start extraction from.
+ * @param len the length of the extraction, may be longer than 8.
+ * @return
+ */
+private static long toLong(byte[] byteArray, int offset, int len) {
+long val = 0;
+len = Math.min(len, Long.BYTES);
+int shift = Long.SIZE;
+for (int i = 0; i < len; i++) {
+shift -=  Byte.SIZE;
+val |= ((long) (byteArray[offset + i] & 0x00FF) << shift);

Review Comment:
   `0xff` or `0xFF`: no need for the leading zeros



##
src/main/java/org/apache/commons/collections4/bloomfilter/EnhancedDoubleHasher.java:
##
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.collections4.bloomfilter;
+
+import java.util.Objects;
+import java.util.function.IntPredicate;
+
+/**
+ * 

[jira] [Commented] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jiangwei Liu (Jira)


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575136#comment-17575136
 ] 

Jiangwei Liu commented on IO-770:
-

Hi Sita Geßner ,

I investigated this problem, the following may be helpful to you:

It is because that the result of the method 
FilenameUtils.isRFC3986HostName("sub_1.example.com") is false.
the pattern of the hostname is "^[a-zA-Z0-9][a-zA-Z0-9-]*$", and defined as:
Pattern REG_NAME_PART_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9-]*$");

FYI:
"sub_1.example.com" is not a valid host name according to RFC 3986,
because the underscore(_) is not legal in domain names per RFC 1034.

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getSubFolderFromFile(new 
> File("sub_1.example.com\\path\\subfolder\\test.pdf"));
> // Fails in common-io:2.11.0 b/c result is null.
> System.out.println("result should be \"subfolder\", but it is: " + 
> result);
> }
> private static String getSubFolderFromFile(final File file) {
> return 
> FilenameUtils.getBaseName(FilenameUtils.getFullPathNoEndSeparator(file.getAbsolutePath()));
> }
> {code}
> We know hostnames are not supposed to have underscores, but windows allows it 
> and  unfortunatly we have to deal with this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jira


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575143#comment-17575143
 ] 

Sita Geßner commented on IO-770:


Hi [~ArdenL_Liu]

thanks for investigating.

Like I mentioned in the description, I know that underscore is not valid, but 
windows allows it and unfortunatly I have to deal with this.

It would be nice if you can add underscore in this pattern.

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getSubFolderFromFile(new 
> File("sub_1.example.com\\path\\subfolder\\test.pdf"));
> // Fails in common-io:2.11.0 b/c result is null.
> System.out.println("result should be \"subfolder\", but it is: " + 
> result);
> }
> private static String getSubFolderFromFile(final File file) {
> return 
> FilenameUtils.getBaseName(FilenameUtils.getFullPathNoEndSeparator(file.getAbsolutePath()));
> }
> {code}
> We know hostnames are not supposed to have underscores, but windows allows it 
> and  unfortunatly we have to deal with this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jiangwei Liu (Jira)


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575136#comment-17575136
 ] 

Jiangwei Liu edited comment on IO-770 at 8/4/22 9:07 AM:
-

Hi Sita Geßner ,

I investigated this problem, the following may be helpful to you:

It is because that the result of the method 
FilenameUtils.isRFC3986HostName("sub_1.example.com") is false.
the pattern of the hostname is "^[a-zA-Z0-9][a-zA-Z0-9-]*$", and defined as:
Pattern REG_NAME_PART_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9-]*$");

FYI:
the underscore(_) is not legal in domain names per RFC 1034.


was (Author: JIRAUSER293868):
Hi Sita Geßner ,

I investigated this problem, the following may be helpful to you:

It is because that the result of the method 
FilenameUtils.isRFC3986HostName("sub_1.example.com") is false.
the pattern of the hostname is "^[a-zA-Z0-9][a-zA-Z0-9-]*$", and defined as:
Pattern REG_NAME_PART_PATTERN = Pattern.compile("^[a-zA-Z0-9][a-zA-Z0-9-]*$");

FYI:
"sub_1.example.com" is not a valid host name according to RFC 3986,
because the underscore(_) is not legal in domain names per RFC 1034.

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getSubFolderFromFile(new 
> File("sub_1.example.com\\path\\subfolder\\test.pdf"));
> // Fails in common-io:2.11.0 b/c result is null.
> System.out.println("result should be \"subfolder\", but it is: " + 
> result);
> }
> private static String getSubFolderFromFile(final File file) {
> return 
> FilenameUtils.getBaseName(FilenameUtils.getFullPathNoEndSeparator(file.getAbsolutePath()));
> }
> {code}
> We know hostnames are not supposed to have underscores, but windows allows it 
> and  unfortunatly we have to deal with this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jira


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575143#comment-17575143
 ] 

Sita Geßner edited comment on IO-770 at 8/4/22 9:09 AM:


Hi [~ArdenL_Liu]

thanks for investigating.

Like I mentioned in the description, I know that underscore is not valid, but 
windows allows it and unfortunatly I have to deal with this.

It would be nice if you can add underscore in this pattern. If you don't want 
this, an exception would be helpful to in this case.


was (Author: sgessner):
Hi [~ArdenL_Liu]

thanks for investigating.

Like I mentioned in the description, I know that underscore is not valid, but 
windows allows it and unfortunatly I have to deal with this.

It would be nice if you can add underscore in this pattern.

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getSubFolderFromFile(new 
> File("sub_1.example.com\\path\\subfolder\\test.pdf"));
> // Fails in common-io:2.11.0 b/c result is null.
> System.out.println("result should be \"subfolder\", but it is: " + 
> result);
> }
> private static String getSubFolderFromFile(final File file) {
> return 
> FilenameUtils.getBaseName(FilenameUtils.getFullPathNoEndSeparator(file.getAbsolutePath()));
> }
> {code}
> We know hostnames are not supposed to have underscores, but windows allows it 
> and  unfortunatly we have to deal with this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jiangwei Liu (Jira)


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575149#comment-17575149
 ] 

Jiangwei Liu commented on IO-770:
-

Hi [~sgessner] ,

I think we can't use underscore(_) in hostname, because the two RFC is defained 
the syntax, can't contains the underscore(_):

RFC-1034 -3.5 and RFC-1035 -2.3.1 :

The DNS specifications attempt to be as general as possible in the rules for 
constructing domain names. The idea is that the name of any existing object can 
be expressed as a domain name with minimal changes. However, when assigning a 
domain name for an object, the prudent user will select a name which satisfies 
both the rules of the domain system and any existing rules for the object, 
whether these rules are published or implied by existing programs.

For example, when naming a mail domain, the user should satisfy both the rules 
of this memo and those in RFC-822. When creating a new host name, the old rules 
for HOSTS.TXT should be followed. This avoids problems when old software is 
converted to use domain names.

The following syntax will result in fewer problems with many applications that 
use domain names (e.g., mail, TELNET).

{{ ::=  | " "}}
{{ ::=  |  "." }}
{{ ::=  [ [  ]  ]}}
{{ ::=  |  }}
{{ ::=  | "-"}}
{{ ::=  | }}
{{ ::= any one of the 52 alphabetic characters A through Z in upper 
case and a through z in lower case}}
{{ ::= any one of the ten digits 0 through 9}}

Note that while upper and lower case letters are allowed in domain names, no 
significance is attached to the case. That is, two names with the same spelling 
but different case are to be treated as if identical.

*The labels must follow the rules for ARPANET host names. They must start with 
a letter, end with a letter or digit, and have as interior characters only 
letters, digits, and hyphen. There are also some restrictions on the length. 
Labels must be 63 characters or less.*

For example, the following strings identify hosts in the Internet:

{{A.ISI.EDU XX.LCS.MIT.EDU SRI-NIC.ARPA}}

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getSubFolderFromFile(new 
> File("sub_1.example.com\\path\\subfolder\\test.pdf"));
> // Fails in common-io:2.11.0 b/c result is null.
> System.out.println("result should be \"subfolder\", but it is: " + 
> result);
> }
> private static String getSubFolderFromFile(final File file) {
> return 
> FilenameUtils.getBaseName(FilenameUtils.getFullPathNoEndSeparator(file.getAbsolutePath()));
> }
> {code}
> We know hostnames are not supposed to have underscores, but windows allows it 
> and  unfortunatly we have to deal with this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (IO-770) FilenameUtils#getFullPathNoEndSeparator has issues with windows and underscore in hostname

2022-08-04 Thread Jiangwei Liu (Jira)


[ 
https://issues.apache.org/jira/browse/IO-770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575149#comment-17575149
 ] 

Jiangwei Liu edited comment on IO-770 at 8/4/22 9:23 AM:
-

Hi [~sgessner] ,

I think we can't use underscore({_}) in hostname, because the two RFC defained 
the syntax, can't contains the underscore({_}):

RFC-1034 -3.5 and RFC-1035 -2.3.1 :

The DNS specifications attempt to be as general as possible in the rules for 
constructing domain names. The idea is that the name of any existing object can 
be expressed as a domain name with minimal changes. However, when assigning a 
domain name for an object, the prudent user will select a name which satisfies 
both the rules of the domain system and any existing rules for the object, 
whether these rules are published or implied by existing programs.

For example, when naming a mail domain, the user should satisfy both the rules 
of this memo and those in RFC-822. When creating a new host name, the old rules 
for HOSTS.TXT should be followed. This avoids problems when old software is 
converted to use domain names.

The following syntax will result in fewer problems with many applications that 
use domain names (e.g., mail, TELNET).

{{ ::=  | " "}}
{{ ::=  |  "." }}
{{ ::=  [ [  ]  ]}}
{{ ::=  |  }}
{{ ::=  | "-"}}
{{ ::=  | }}
{{ ::= any one of the 52 alphabetic characters A through Z in upper 
case and a through z in lower case}}
{{ ::= any one of the ten digits 0 through 9}}

Note that while upper and lower case letters are allowed in domain names, no 
significance is attached to the case. That is, two names with the same spelling 
but different case are to be treated as if identical.

*The labels must follow the rules for ARPANET host names. They must start with 
a letter, end with a letter or digit, and have as interior characters only 
letters, digits, and hyphen. There are also some restrictions on the length. 
Labels must be 63 characters or less.*

For example, the following strings identify hosts in the Internet:

{{A.ISI.EDU XX.LCS.MIT.EDU SRI-NIC.ARPA}}


was (Author: JIRAUSER293868):
Hi [~sgessner] ,

I think we can't use underscore(_) in hostname, because the two RFC is defained 
the syntax, can't contains the underscore(_):

RFC-1034 -3.5 and RFC-1035 -2.3.1 :

The DNS specifications attempt to be as general as possible in the rules for 
constructing domain names. The idea is that the name of any existing object can 
be expressed as a domain name with minimal changes. However, when assigning a 
domain name for an object, the prudent user will select a name which satisfies 
both the rules of the domain system and any existing rules for the object, 
whether these rules are published or implied by existing programs.

For example, when naming a mail domain, the user should satisfy both the rules 
of this memo and those in RFC-822. When creating a new host name, the old rules 
for HOSTS.TXT should be followed. This avoids problems when old software is 
converted to use domain names.

The following syntax will result in fewer problems with many applications that 
use domain names (e.g., mail, TELNET).

{{ ::=  | " "}}
{{ ::=  |  "." }}
{{ ::=  [ [  ]  ]}}
{{ ::=  |  }}
{{ ::=  | "-"}}
{{ ::=  | }}
{{ ::= any one of the 52 alphabetic characters A through Z in upper 
case and a through z in lower case}}
{{ ::= any one of the ten digits 0 through 9}}

Note that while upper and lower case letters are allowed in domain names, no 
significance is attached to the case. That is, two names with the same spelling 
but different case are to be treated as if identical.

*The labels must follow the rules for ARPANET host names. They must start with 
a letter, end with a letter or digit, and have as interior characters only 
letters, digits, and hyphen. There are also some restrictions on the length. 
Labels must be 63 characters or less.*

For example, the following strings identify hosts in the Internet:

{{A.ISI.EDU XX.LCS.MIT.EDU SRI-NIC.ARPA}}

> FilenameUtils#getFullPathNoEndSeparator has issues with windows and 
> underscore in hostname
> --
>
> Key: IO-770
> URL: https://issues.apache.org/jira/browse/IO-770
> Project: Commons IO
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.7, 2.8.0, 2.9.0, 2.10.0, 2.11.0
>Reporter: Sita Geßner
>Priority: Major
>
> After updating commons-io to version 2.11.0 there is an issue with 
> FilenameUtils#getFullPathNoEndSeparator only when using Windows.
> When using Linux there are no problems.
> getFullPathNoEndSeparator returns  null if the hostname of the path contains 
> an underscore. This issue occured since version 2.7
> {code:java}
> private static void commonsIo() {
> final String result = getS

[jira] [Commented] (IO-778) FileUtils.copyFile(File srcFile, File destFile): Missing IllegalArgumentException in Javadoc

2022-08-04 Thread Jiangwei Liu (Jira)


[ 
https://issues.apache.org/jira/browse/IO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575180#comment-17575180
 ] 

Jiangwei Liu commented on IO-778:
-

Hi [~rhochreiter] ,

I investigated it as your description, the following may be helpful to you:

java.lang.IllegalArgumentException is a RuntimeException, the method can ignore 
it.

 

> FileUtils.copyFile(File srcFile, File destFile): Missing 
> IllegalArgumentException in Javadoc
> 
>
> Key: IO-778
> URL: https://issues.apache.org/jira/browse/IO-778
> Project: Commons IO
>  Issue Type: Wish
>  Components: Utilities
>Affects Versions: 2.11.0
>Reporter: Rainer Hochreiter
>Priority: Trivial
>
> Method {{FileUtils.copyFile(File srcFile, File destFile)}} throws  
> {{{}IllegalArgumentException{}}}, when called with identical files. This is 
> not documented in Javadoc.
> The {{IllegalArgumentException}} is thrown by 
> {{FileUtils.requireCanonicalPathsNotEquals(File file1, File file2)}} in 
> {{FileUtils.copyFile(File srcFile, File destFile, final CopyOption... 
> copyOptions).}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IO-778) FileUtils.copyFile(File srcFile, File destFile): Missing IllegalArgumentException in Javadoc

2022-08-04 Thread Rainer Hochreiter (Jira)


[ 
https://issues.apache.org/jira/browse/IO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575200#comment-17575200
 ] 

Rainer Hochreiter commented on IO-778:
--

The Javadoc shows that a {{NullPointerException}} may also be thrown, which is 
a {{RuntimeException}} too. A {{NullPointerException}} is more obviously when 
passing {{null}} arguments to the function.

The {{IllegalArgumentException}} is not obiously expected, when called with 
identical files. So it has more benefit to list this exception - even if it is 
a {{{}RuntimeException{}}}.

> FileUtils.copyFile(File srcFile, File destFile): Missing 
> IllegalArgumentException in Javadoc
> 
>
> Key: IO-778
> URL: https://issues.apache.org/jira/browse/IO-778
> Project: Commons IO
>  Issue Type: Wish
>  Components: Utilities
>Affects Versions: 2.11.0
>Reporter: Rainer Hochreiter
>Priority: Trivial
>
> Method {{FileUtils.copyFile(File srcFile, File destFile)}} throws  
> {{{}IllegalArgumentException{}}}, when called with identical files. This is 
> not documented in Javadoc.
> The {{IllegalArgumentException}} is thrown by 
> {{FileUtils.requireCanonicalPathsNotEquals(File file1, File file2)}} in 
> {{FileUtils.copyFile(File srcFile, File destFile, final CopyOption... 
> copyOptions).}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (VFS-683) Thread safety issue in VFSClassLoader - NullPointerException thrown

2022-08-04 Thread Dave MacDonald (Jira)


[ 
https://issues.apache.org/jira/browse/VFS-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575316#comment-17575316
 ] 

Dave MacDonald commented on VFS-683:


Is there any consensus on what to do about the concurrency problem with 
{{{}org.apache.commons.vfs2.impl.VFSClassLoader{}}}?

Removing implementations of ZipFileObject#doAttach and ZipFileObject#doDetach 
prevents the error indicated in the issue description, but I'm not sure that is 
a reasonable long-term fix.

> 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] [Commented] (VFS-683) Thread safety issue in VFSClassLoader - NullPointerException thrown

2022-08-04 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/VFS-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575401#comment-17575401
 ] 

Gary D. Gregory commented on VFS-683:
-

It might be worth for you to create a PR so we can all see if the tests would 
pass at the very least. A PR with a failing test would be good on its own so 
anyone can reproduce the issue simply.

> 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] [Commented] (IO-778) FileUtils.copyFile(File srcFile, File destFile): Missing IllegalArgumentException in Javadoc

2022-08-04 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575403#comment-17575403
 ] 

Gary D. Gregory commented on IO-778:


I'm not sure we want to document runtime exceptions everywhere, that is likely 
to change almost all comments.

> FileUtils.copyFile(File srcFile, File destFile): Missing 
> IllegalArgumentException in Javadoc
> 
>
> Key: IO-778
> URL: https://issues.apache.org/jira/browse/IO-778
> Project: Commons IO
>  Issue Type: Wish
>  Components: Utilities
>Affects Versions: 2.11.0
>Reporter: Rainer Hochreiter
>Priority: Trivial
>
> Method {{FileUtils.copyFile(File srcFile, File destFile)}} throws  
> {{{}IllegalArgumentException{}}}, when called with identical files. This is 
> not documented in Javadoc.
> The {{IllegalArgumentException}} is thrown by 
> {{FileUtils.requireCanonicalPathsNotEquals(File file1, File file2)}} in 
> {{FileUtils.copyFile(File srcFile, File destFile, final CopyOption... 
> copyOptions).}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (VFS-683) Thread safety issue in VFSClassLoader - NullPointerException thrown

2022-08-04 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/VFS-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575401#comment-17575401
 ] 

Gary D. Gregory edited comment on VFS-683 at 8/4/22 9:59 PM:
-

The best thing to do IMO is to document the behavior as not thread safe.


was (Author: garydgregory):
It might be worth for you to create a PR so we can all see if the tests would 
pass at the very least. A PR with a failing test would be good on its own so 
anyone can reproduce the issue simply.

> 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)


[GitHub] [commons-io] dependabot[bot] opened a new pull request, #372: Bump checkstyle from 9.3 to 10.3.2

2022-08-04 Thread GitBox


dependabot[bot] opened a new pull request, #372:
URL: https://github.com/apache/commons-io/pull/372

   Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.3 to 
10.3.2.
   
   Release notes
   Sourced from https://github.com/checkstyle/checkstyle/releases";>checkstyle's 
releases.
   
   checkstyle-10.3.2
   https://checkstyle.org/releasenotes.html#Release_10.3.2";>https://checkstyle.org/releasenotes.html#Release_10.3.2
   Bug fixes:
   https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11736";>#11736
 - MissingJavadocType: Support qualified annotation names
   https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11655";>#11655
 - Update google_checks.xml to have the SuppressionCommentFilter and 
SuppressWarningsHolder modules in the config by default (and by extension, 
SuppressWarningsFilter)
   
   
   ... (truncated)
   
   
   Commits
   
   https://github.com/checkstyle/checkstyle/commit/3aec4ab003909923e18347235d949fd6803cc59a";>3aec4ab
 [maven-release-plugin] prepare release checkstyle-10.3.2
   https://github.com/checkstyle/checkstyle/commit/8054535299ca701de560850697bd013199ae82fe";>8054535
 config: update to 10.3.2-SNAPSHOT
   https://github.com/checkstyle/checkstyle/commit/f7a5a42d515f03e8d8b6a7b43087968199610a93";>f7a5a42
 doc: releasenotes for 10.3.2
   https://github.com/checkstyle/checkstyle/commit/d171482b6213c443fad6a5a1ab9165b8c6dd1cdf";>d171482
 minor: remove SCM-Manager from known tools; site is down, no details
   https://github.com/checkstyle/checkstyle/commit/fe7f456b5ee40dc9cf7f1471a12f70ad70a9afdf";>fe7f456
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/12010";>#12010:
 Update releasenotes to use GitHub Pages execution
   https://github.com/checkstyle/checkstyle/commit/1c03f44fd924cb65013490c3a7157c2bbb900578";>1c03f44
 minor: Modify pitest mutators for pitest-javadoc
   https://github.com/checkstyle/checkstyle/commit/307ae4b294f1a134befc1141f5b6e764db3005c5";>307ae4b
 minor: Modify pitest mutators for pitest-java-ast-visitor
   https://github.com/checkstyle/checkstyle/commit/419a49191455e540fa712523f10e3ad3781ff579";>419a491
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11885";>#11885:
 Allow SuppressWarningHolder to suppress the violation with Name...
   https://github.com/checkstyle/checkstyle/commit/907d73beb44e61f6f19be9d1f5a1726f1e76b8c1";>907d73b
 dependency: bump Saxon-HE from 11.3 to 11.4
   https://github.com/checkstyle/checkstyle/commit/af99318229ad160a41c823a4b9371de1a252ed9e";>af99318
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11720";>#11720:
 Kill surviving mutation in VariableDeclarationUsageDistanceChec...
   Additional commits viewable in https://github.com/checkstyle/checkstyle/compare/checkstyle-9.3...checkstyle-10.3.2";>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.puppycrawl.tools:checkstyle&package-manager=maven&previous-version=9.3&new-version=10.3.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
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

[GitHub] [commons-lang] Arav1229 opened a new pull request, #929: Fixed incorrect documentation

2022-08-04 Thread GitBox


Arav1229 opened a new pull request, #929:
URL: https://github.com/apache/commons-lang/pull/929

   Constructor throws null pointer exception but the javadocs did not reflect 
it. Fixed javadocs to address the issue. 


-- 
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] Arav1229 closed pull request #929: Fixed incorrect documentation

2022-08-04 Thread GitBox


Arav1229 closed pull request #929: Fixed incorrect documentation
URL: https://github.com/apache/commons-lang/pull/929


-- 
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] Arav1229 opened a new pull request, #930: Fixed incorrect documentation

2022-08-04 Thread GitBox


Arav1229 opened a new pull request, #930:
URL: https://github.com/apache/commons-lang/pull/930

   Methods throw null pointer exception but the javadocs did not reflect it. 
Fixed javadocs to address the issue.


-- 
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-dbcp] dependabot[bot] opened a new pull request, #205: Bump checkstyle from 9.3 to 10.3.2

2022-08-04 Thread GitBox


dependabot[bot] opened a new pull request, #205:
URL: https://github.com/apache/commons-dbcp/pull/205

   Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.3 to 
10.3.2.
   
   Release notes
   Sourced from https://github.com/checkstyle/checkstyle/releases";>checkstyle's 
releases.
   
   checkstyle-10.3.2
   https://checkstyle.org/releasenotes.html#Release_10.3.2";>https://checkstyle.org/releasenotes.html#Release_10.3.2
   Bug fixes:
   https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11736";>#11736
 - MissingJavadocType: Support qualified annotation names
   https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11655";>#11655
 - Update google_checks.xml to have the SuppressionCommentFilter and 
SuppressWarningsHolder modules in the config by default (and by extension, 
SuppressWarningsFilter)
   
   
   ... (truncated)
   
   
   Commits
   
   https://github.com/checkstyle/checkstyle/commit/3aec4ab003909923e18347235d949fd6803cc59a";>3aec4ab
 [maven-release-plugin] prepare release checkstyle-10.3.2
   https://github.com/checkstyle/checkstyle/commit/8054535299ca701de560850697bd013199ae82fe";>8054535
 config: update to 10.3.2-SNAPSHOT
   https://github.com/checkstyle/checkstyle/commit/f7a5a42d515f03e8d8b6a7b43087968199610a93";>f7a5a42
 doc: releasenotes for 10.3.2
   https://github.com/checkstyle/checkstyle/commit/d171482b6213c443fad6a5a1ab9165b8c6dd1cdf";>d171482
 minor: remove SCM-Manager from known tools; site is down, no details
   https://github.com/checkstyle/checkstyle/commit/fe7f456b5ee40dc9cf7f1471a12f70ad70a9afdf";>fe7f456
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/12010";>#12010:
 Update releasenotes to use GitHub Pages execution
   https://github.com/checkstyle/checkstyle/commit/1c03f44fd924cb65013490c3a7157c2bbb900578";>1c03f44
 minor: Modify pitest mutators for pitest-javadoc
   https://github.com/checkstyle/checkstyle/commit/307ae4b294f1a134befc1141f5b6e764db3005c5";>307ae4b
 minor: Modify pitest mutators for pitest-java-ast-visitor
   https://github.com/checkstyle/checkstyle/commit/419a49191455e540fa712523f10e3ad3781ff579";>419a491
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11885";>#11885:
 Allow SuppressWarningHolder to suppress the violation with Name...
   https://github.com/checkstyle/checkstyle/commit/907d73beb44e61f6f19be9d1f5a1726f1e76b8c1";>907d73b
 dependency: bump Saxon-HE from 11.3 to 11.4
   https://github.com/checkstyle/checkstyle/commit/af99318229ad160a41c823a4b9371de1a252ed9e";>af99318
 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11720";>#11720:
 Kill surviving mutation in VariableDeclarationUsageDistanceChec...
   Additional commits viewable in https://github.com/checkstyle/checkstyle/compare/checkstyle-9.3...checkstyle-10.3.2";>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.puppycrawl.tools:checkstyle&package-manager=maven&previous-version=9.3&new-version=10.3.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
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.o

[GitHub] [commons-compress] dependabot[bot] opened a new pull request, #304: Bump maven-bundle-plugin from 5.1.7 to 5.1.8

2022-08-04 Thread GitBox


dependabot[bot] opened a new pull request, #304:
URL: https://github.com/apache/commons-compress/pull/304

   Bumps maven-bundle-plugin from 5.1.7 to 5.1.8.
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.felix:maven-bundle-plugin&package-manager=maven&previous-version=5.1.7&new-version=5.1.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


-- 
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-dbcp] codecov-commenter commented on pull request #205: Bump checkstyle from 9.3 to 10.3.2

2022-08-04 Thread GitBox


codecov-commenter commented on PR #205:
URL: https://github.com/apache/commons-dbcp/pull/205#issuecomment-1206019854

   # 
[Codecov](https://codecov.io/gh/apache/commons-dbcp/pull/205?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#205](https://codecov.io/gh/apache/commons-dbcp/pull/205?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (02ea494) into 
[master](https://codecov.io/gh/apache/commons-dbcp/commit/8e8e9e8e32ad2d85d2e17db18fbbfb8132b9b2b7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (8e8e9e8) will **increase** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@ Coverage Diff  @@
   ## master #205  +/-   ##
   
   + Coverage 59.67%   59.68%   +0.01% 
 Complexity 1781 1781  
   
 Files57   57  
 Lines  7415 7415  
 Branches421  421  
   
   + Hits   4425 4426   +1 
   + Misses 2772 2771   -1 
 Partials218  218  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/commons-dbcp/pull/205?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...ache/commons/dbcp2/managed/TransactionContext.java](https://codecov.io/gh/apache/commons-dbcp/pull/205/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvZGJjcDIvbWFuYWdlZC9UcmFuc2FjdGlvbkNvbnRleHQuamF2YQ==)
 | `74.07% <0.00%> (+1.85%)` | :arrow_up: |
   
   :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&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_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-compress] codecov-commenter commented on pull request #304: Bump maven-bundle-plugin from 5.1.7 to 5.1.8

2022-08-04 Thread GitBox


codecov-commenter commented on PR #304:
URL: https://github.com/apache/commons-compress/pull/304#issuecomment-1206020579

   # 
[Codecov](https://codecov.io/gh/apache/commons-compress/pull/304?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#304](https://codecov.io/gh/apache/commons-compress/pull/304?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (a408c4d) into 
[master](https://codecov.io/gh/apache/commons-compress/commit/e2d5331931b2d63f7eb2a2a747887736b3df6751?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (e2d5331) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@ Coverage Diff  @@
   ## master #304  +/-   ##
   
   - Coverage 80.05%   80.05%   -0.01% 
   + Complexity 6622 6621   -1 
   
 Files   339  339  
 Lines 2541625416  
 Branches   4199 4199  
   
   - Hits  2034820346   -2 
   - Misses 3470 3473   +3 
   + Partials   1598 1597   -1 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/commons-compress/pull/304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../commons/compress/compressors/bzip2/BlockSort.java](https://codecov.io/gh/apache/commons-compress/pull/304/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29tcHJlc3MvY29tcHJlc3NvcnMvYnppcDIvQmxvY2tTb3J0LmphdmE=)
 | `84.27% <0.00%> (-0.47%)` | :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&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_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] [Commented] (IO-778) FileUtils.copyFile(File srcFile, File destFile): Missing IllegalArgumentException in Javadoc

2022-08-04 Thread Rainer Hochreiter (Jira)


[ 
https://issues.apache.org/jira/browse/IO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575583#comment-17575583
 ] 

Rainer Hochreiter commented on IO-778:
--

found on 
[Stackoverflow|https://stackoverflow.com/questions/824217/should-methods-that-throw-runtimeexception-indicate-it-in-method-signature]:

_I would not declare an unchecked exception in the signature, since it is 
misleading to the user of that API. It is no longer obvious whether the 
exception has to be explicitly handled._

_*Declaring it in the javadoc is a better approach since it allows someone to 
handle it if they think it is necessary, but knowing they can ignore it if they 
want.* This makes the separation between checked and unchecked clear._

> FileUtils.copyFile(File srcFile, File destFile): Missing 
> IllegalArgumentException in Javadoc
> 
>
> Key: IO-778
> URL: https://issues.apache.org/jira/browse/IO-778
> Project: Commons IO
>  Issue Type: Wish
>  Components: Utilities
>Affects Versions: 2.11.0
>Reporter: Rainer Hochreiter
>Priority: Trivial
>
> Method {{FileUtils.copyFile(File srcFile, File destFile)}} throws  
> {{{}IllegalArgumentException{}}}, when called with identical files. This is 
> not documented in Javadoc.
> The {{IllegalArgumentException}} is thrown by 
> {{FileUtils.requireCanonicalPathsNotEquals(File file1, File file2)}} in 
> {{FileUtils.copyFile(File srcFile, File destFile, final CopyOption... 
> copyOptions).}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)