[jira] [Commented] (NET-718) "Unsupported or unrecognized SSL message" for FTPS via proxy

2023-03-14 Thread Gary D. Gregory (Jira)


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

Gary D. Gregory commented on NET-718:
-

I should be able to take a look this weekend. 

> "Unsupported or unrecognized SSL message" for FTPS via proxy
> 
>
> Key: NET-718
> URL: https://issues.apache.org/jira/browse/NET-718
> Project: Commons Net
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Sebastian Alfers
>Priority: Major
>
> After bumping from commons-net 3.8 to 3.9, we started to see this error.
> I happens only when using FTPS via a proxy, and it is likely that this change 
> may have introduced. 
>  
> Any recommendation how to bring back the pre-3.9 behavior? This is the full 
> stacktrace:
> {code:java}
> Start of log messages of test that failed with assertion failed: 
> fishForMessage(OnNext(_) or OnComplete) found unexpected message 
> OnError(javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
>     at 
> java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:451)
>     at 
> java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:175)
>     at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
>     at 
> org.apache.commons.net.ftp.FTPSClient.openDataConnection(FTPSClient.java:278)
>     at 
> org.apache.commons.net.ftp.FTPClient._retrieveFileStream(FTPClient.java:915)
>     at 
> org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:2841)
>     at 
> akka.stream.alpakka.ftp.impl.CommonFtpOperations.$anonfun$retrieveFileInputStream$1(CommonFtpOperations.scala:71)
>     at scala.util.Try$.apply(Try.scala:210) {code}
>  
>  
>  
>  



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


[jira] [Commented] (NET-718) "Unsupported or unrecognized SSL message" for FTPS via proxy

2023-03-14 Thread Sebastian Alfers (Jira)


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

Sebastian Alfers commented on NET-718:
--

[~ggregory] Any idea on my reproducer?

> "Unsupported or unrecognized SSL message" for FTPS via proxy
> 
>
> Key: NET-718
> URL: https://issues.apache.org/jira/browse/NET-718
> Project: Commons Net
>  Issue Type: Bug
>Affects Versions: 3.9.0
>Reporter: Sebastian Alfers
>Priority: Major
>
> After bumping from commons-net 3.8 to 3.9, we started to see this error.
> I happens only when using FTPS via a proxy, and it is likely that this change 
> may have introduced. 
>  
> Any recommendation how to bring back the pre-3.9 behavior? This is the full 
> stacktrace:
> {code:java}
> Start of log messages of test that failed with assertion failed: 
> fishForMessage(OnNext(_) or OnComplete) found unexpected message 
> OnError(javax.net.ssl.SSLException: Unsupported or unrecognized SSL message
>     at 
> java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:451)
>     at 
> java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:175)
>     at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
>     at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
>     at 
> org.apache.commons.net.ftp.FTPSClient.openDataConnection(FTPSClient.java:278)
>     at 
> org.apache.commons.net.ftp.FTPClient._retrieveFileStream(FTPClient.java:915)
>     at 
> org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:2841)
>     at 
> akka.stream.alpakka.ftp.impl.CommonFtpOperations.$anonfun$retrieveFileInputStream$1(CommonFtpOperations.scala:71)
>     at scala.util.Try$.apply(Try.scala:210) {code}
>  
>  
>  
>  



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


[GitHub] [commons-parent] garydgregory merged pull request #237: Bump maven-surefire-report-plugin from 3.0.0-M9 to 3.0.0

2023-03-14 Thread via GitHub


garydgregory merged PR #237:
URL: https://github.com/apache/commons-parent/pull/237


-- 
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-parent] garydgregory commented on pull request #237: Bump maven-surefire-report-plugin from 3.0.0-M9 to 3.0.0

2023-03-14 Thread via GitHub


garydgregory commented on PR #237:
URL: https://github.com/apache/commons-parent/pull/237#issuecomment-1468733168

   @dependabot rebase


-- 
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-parent] garydgregory merged pull request #236: Bump maven-surefire-plugin from 3.0.0-M9 to 3.0.0

2023-03-14 Thread via GitHub


garydgregory merged PR #236:
URL: https://github.com/apache/commons-parent/pull/236


-- 
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-parent] garydgregory merged pull request #235: Bump maven-failsafe-plugin from 3.0.0-M9 to 3.0.0

2023-03-14 Thread via GitHub


garydgregory merged PR #235:
URL: https://github.com/apache/commons-parent/pull/235


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (LANG-1643) Initialize ArrayList in EqualsBuilder constructor with size 1

2023-03-14 Thread Gary D. Gregory (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory resolved LANG-1643.
---
Fix Version/s: 3.13.0
   Resolution: Fixed

> Initialize ArrayList in EqualsBuilder constructor with size 1
> -
>
> Key: LANG-1643
> URL: https://issues.apache.org/jira/browse/LANG-1643
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.builder.*
> Environment: {code}
> :~$ java -version
> openjdk version "11.0.9.1" 2020-11-04
> OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
> OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, 
> sharing)
> :~$ uname -a
> Linux ubuntu 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 
> 2021 x86_64 x86_64 x86_64 GNU/Linux
> Apache commons lang3 version 3.11
> {code}
>Reporter: Alexander van de Rovaart
>Priority: Minor
>  Labels: EqualsBuilder, improvement
> Fix For: 3.13.0
>
> Attachments: image-2021-02-04-11-45-47-437.png, screenshot-1.png
>
>
> In the constructor the EqualsBuilder the variabele 
> {{bypassReflectionClasses}} is initialized with an {{new ArrayList()}} and 
> immidiately after that a vaue is added. This will result in an 
> ArrayList.grow() because the contructor of ArrayList will initialize is with 
> a zero length array. See attached screenshots for a stacktrace from a flight 
> recording.
> My suggestion would be to initialize the arraylist with a length of 1 (or the 
> default of 10 that is used in {{java.util.ArrayList}} when it is initially 
> grown on the first add.) So the calls to {{ArrayList.grow}} and 
> {{ArrayList.newCapacity}} and {{Arrays.copyOf}} won't be called when calling 
> the add function after construction.
>  
> So the code sample of the constructor would be:
> {code:java}
> public EqualsBuilder() {
> // set up default classes to bypass reflection for
> bypassReflectionClasses = new ArrayList<>(1);
> bypassReflectionClasses.add(String.class); //hashCode field being 
> lazy but not transient
> }
> {code}
> !image-2021-02-04-11-45-47-437.png!
>  !screenshot-1.png! 



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


[GitHub] [commons-lang] garydgregory commented on pull request #1041: [LANG-1643] Construct ArrayList with better default size

2023-03-14 Thread via GitHub


garydgregory commented on PR #1041:
URL: https://github.com/apache/commons-lang/pull/1041#issuecomment-1468522178

   https://issues.apache.org/jira/browse/LANG-1643


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory merged pull request #1041: [LANG-1643] Construct ArrayList with better default size

2023-03-14 Thread via GitHub


garydgregory merged PR #1041:
URL: https://github.com/apache/commons-lang/pull/1041


-- 
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] laurentschoelens commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


laurentschoelens commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468505709

   > > @garydgregory : got an exemple for you of usage `5 * ((6 * 7 + 2) * 3)` 
Actual method will return `(6 * 7 + 2` where we would like to have `(6 * 7 + 2) 
* 3` with params `"(", ")"`
   > 
   > Hello @laurentschoelens I hope that's a random made up example because 
it's not a good one ;-) Expression parsing should not be hand-coded IMO, that's 
what Antlr and JavaCC are for...
   
   Yes that is hand made but it's only to point that there could be some usage 😀


-- 
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] (NUMBERS-193) Add support for extended precision floating-point numbers

2023-03-14 Thread Gilles Sadowski (Jira)


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

Gilles Sadowski commented on NUMBERS-193:
-

{quote}
{code}
// New instance method
DD add(DD y) {
return add(hi, lo, y.hi, y.lo, new DD());
{code}
{quote}

I'm lost here: This is not the immutable version, is it?

> Add support for extended precision floating-point numbers
> -
>
> Key: NUMBERS-193
> URL: https://issues.apache.org/jira/browse/NUMBERS-193
> Project: Commons Numbers
>  Issue Type: New Feature
>Reporter: Alex Herbert
>Priority: Major
>  Labels: full-time, gsoc2023, part-time
>
> Add implementations of extended precision floating point numbers.
> An extended precision floating point number is a series of floating-point 
> numbers that are non-overlapping such that:
> {noformat}
> double-double (a, b):
> |a| > |b|
> a == a + b{noformat}
> Common representations are double-double and quad-double (see for example 
> David Bailey's paper on a quad-double library: 
> [QD|https://www.davidhbailey.com/dhbpapers/qd.pdf]).
> Many computations in the Commons Numbers and Statistics libraries use 
> extended precision computations where the accumulated error of a double would 
> lead to complete cancellation of all significant bits; or create intermediate 
> overflow of integer values.
> This project would formalise the code underlying these use cases with a 
> generic library applicable for use in the case where the result is expected 
> to be a finite value and using Java's BigDecimal and/or BigInteger negatively 
> impacts performance.
> An example would be the average of long values where the intermediate sum 
> overflows or the conversion to a double loses bits:
> {code:java}
> long[] values = {Long.MAX_VALUE, Long.MAX_VALUE}; 
> System.out.println(Arrays.stream(values).average().getAsDouble()); 
> System.out.println(Arrays.stream(values).mapToObj(BigDecimal::valueOf)
> .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values.length)).doubleValue());
> long[] values2 = {Long.MAX_VALUE, Long.MIN_VALUE}; 
> System.out.println(Arrays.stream(values2).asDoubleStream().average().getAsDouble());
>  System.out.println(Arrays.stream(values2).mapToObj(BigDecimal::valueOf)
>     .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values2.length)).doubleValue());
> {code}
> Outputs:
> {noformat}
> -1.0
> 9.223372036854776E18
> 0.0
> -0.5{noformat}



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


[GitHub] [commons-lang] garydgregory commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


garydgregory commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468500322

   > @garydgregory : got an exemple for you of usage `5 * ((6 * 7 + 2) * 3)` 
Actual method will return `(6 * 7 + 2` where we would like to have `(6 * 7 + 2) 
* 3` with params `"(", ")"`
   
   Hello @laurentschoelens 
   I hope that's a random made up example because it's not a good one ;-) 
Expression parsing should not be hand-coded IMO, that's what Antlr and JavaCC 
are for...


-- 
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] (NET-719) FTPS protocal timing problems behind WAF (F5) firewall

2023-03-14 Thread Gary D. Gregory (Jira)


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

Gary D. Gregory commented on NET-719:
-

Hi [~skaptara] 

Creating a reproducible test for complex use cases is always a challenge but 
critical if we expect code changes to keep functioning as intended without 
unintentional future regressions.

I can only offer generalities: 
 # As previously mentioned, a test for a fix or change should fail if the 
changes to the main source tree are not applied. This proves that the main 
changes do fix something.
 # You can embed and configure a proxy of some kind in the test; Apache 
HttpComponents provides examples of proxies using HttpCore.
 # You can use a mocking library like Mockito or Powermock to simulate a proxy 
or origin server.
 # A combination of all the above

It is likely that you may spend as much time if not more creating the test than 
the fix (see point 1 above).

HTH

> FTPS protocal timing problems behind WAF (F5) firewall
> --
>
> Key: NET-719
> URL: https://issues.apache.org/jira/browse/NET-719
> Project: Commons Net
>  Issue Type: Improvement
>  Components: FTP
>Affects Versions: 3.9.0
>Reporter: Stefan Kuhr
>Priority: Major
> Attachments: FTPSClient_RETR_Timing_diagram_current_impl-1.png, 
> FTPSClient_RETR_Timing_diagram_problem.png, 
> FTPSClient_RETR_Timing_diagram_solution.png
>
>
> A working data exchange setup stopped working, after the server (vsftpd / 
> RedHat) was moved behind a WAF (F5) web application firewall. The client uses 
> PASV mode and the operation resulted in a socket timeout on the client side, 
> as soon as the data channel came into play (LIST/RETR/STOR).
> A FileZilla client does not exhibit this problem. By looking at the protocol 
> exchanges and laying them down in timing diagrams the problem seems to be, 
> that the WAF expects the client to fully establish the data-channel, after 
> the data-command is send over the control-channel. The current FTPS client on 
> the other hand expects the server reply directly after the command is sent.
> A pull request will be provided.
>  



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


[jira] [Commented] (NUMBERS-193) Add support for extended precision floating-point numbers

2023-03-14 Thread Alex Herbert (Jira)


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

Alex Herbert commented on NUMBERS-193:
--

I do not think you have misunderstood.

The performance benchmark would compare the current mutable implementation 
against a variant that is immutable. So it would involve copying the current 
class and changing all the required methods to return a new instance of the 
class for each operation.

As Gilles noted, we cannot be certain that the performance benchmark is 
representative of an immutable class unless it really is immutable (with final 
member fields). Thus adding object-orientated methods to the current 
implementation, although far simpler to do, is not an ideal comparison. This 
could also be done for a reference point with the current mutable class given 
it is a lot of the following type of code:
{code:java}
// Existing static API with mutable result for each operation
static DD add(double x, double xx, double y, double yy, DD result) {
   // compute ...
   return result;
}

// New instance method
DD add(DD y) {
return add(hi, lo, y.hi, y.lo, new DD());
}{code}
The two classes (mutable and immutable) can be asserted to return exactly the 
same result given random input to each function. 

The key point the benchmark would be trying to address is whether the creation 
of intermediate objects is a significant performance overhead.

 

> Add support for extended precision floating-point numbers
> -
>
> Key: NUMBERS-193
> URL: https://issues.apache.org/jira/browse/NUMBERS-193
> Project: Commons Numbers
>  Issue Type: New Feature
>Reporter: Alex Herbert
>Priority: Major
>  Labels: full-time, gsoc2023, part-time
>
> Add implementations of extended precision floating point numbers.
> An extended precision floating point number is a series of floating-point 
> numbers that are non-overlapping such that:
> {noformat}
> double-double (a, b):
> |a| > |b|
> a == a + b{noformat}
> Common representations are double-double and quad-double (see for example 
> David Bailey's paper on a quad-double library: 
> [QD|https://www.davidhbailey.com/dhbpapers/qd.pdf]).
> Many computations in the Commons Numbers and Statistics libraries use 
> extended precision computations where the accumulated error of a double would 
> lead to complete cancellation of all significant bits; or create intermediate 
> overflow of integer values.
> This project would formalise the code underlying these use cases with a 
> generic library applicable for use in the case where the result is expected 
> to be a finite value and using Java's BigDecimal and/or BigInteger negatively 
> impacts performance.
> An example would be the average of long values where the intermediate sum 
> overflows or the conversion to a double loses bits:
> {code:java}
> long[] values = {Long.MAX_VALUE, Long.MAX_VALUE}; 
> System.out.println(Arrays.stream(values).average().getAsDouble()); 
> System.out.println(Arrays.stream(values).mapToObj(BigDecimal::valueOf)
> .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values.length)).doubleValue());
> long[] values2 = {Long.MAX_VALUE, Long.MIN_VALUE}; 
> System.out.println(Arrays.stream(values2).asDoubleStream().average().getAsDouble());
>  System.out.println(Arrays.stream(values2).mapToObj(BigDecimal::valueOf)
>     .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values2.length)).doubleValue());
> {code}
> Outputs:
> {noformat}
> -1.0
> 9.223372036854776E18
> 0.0
> -0.5{noformat}



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


[jira] [Commented] (NUMBERS-193) Add support for extended precision floating-point numbers

2023-03-14 Thread Gilles Sadowski (Jira)


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

Gilles Sadowski commented on NUMBERS-193:
-

bq. From here, I understood that the DD class would be implemented in an 
immutable class.

Sure, that would be the ideal outcome for several reasons, one of them being 
that all "number" types currently implemented in [Numbers] ({{Fraction}}, 
{{BigFraction}}, {{Complex}}, {{Quaternion}}) are immutable, on the same 
rationale that e.g. {{Double}}, in the JDK is also immutable.

bq. The reason for changing from a mutable class to an immutable class is that 
I believe encapsulation prevents the use of unnormalized double-double numbers.

I don't understand the relationship...

bq. And when implemented in an immutable class, performance becomes an issue 
apart from the benefit of encapsulation.
In particular, each method requires a process to create a new instance, which 
may degrade performance.

Yes, but there are other benefits, and maybe some JVM optimizations can be only 
be performed on objects guaranteed to be immutable...

bq. Therefore, before changing to the immutable class, we wanted to investigate 
the impact of object creation and garbage collection on performance by 
evaluating performance with and without adding a method that creates a new 
instance.

Yes, but my point was that the benchmark could be biased if the class is 
mutable but does not takes advantage of it, and creates new instances instead 
(in effect taking the worst of both worlds).  The comparison should be between
* mutability and not creating instances
* immutability and (necessarily) creating new instances

bq. What do both implementations mean, the original DD class and the other?

Yes. Because the current "DD" was meant for performance but uses an unsafe API. 
 For most usage, top performance might not be required; if the trade-off is 
acceptable for the increased precision.

bq. If not a change to an immutable class,

In my understanding, the immutable class is the "other" implementation.



> Add support for extended precision floating-point numbers
> -
>
> Key: NUMBERS-193
> URL: https://issues.apache.org/jira/browse/NUMBERS-193
> Project: Commons Numbers
>  Issue Type: New Feature
>Reporter: Alex Herbert
>Priority: Major
>  Labels: full-time, gsoc2023, part-time
>
> Add implementations of extended precision floating point numbers.
> An extended precision floating point number is a series of floating-point 
> numbers that are non-overlapping such that:
> {noformat}
> double-double (a, b):
> |a| > |b|
> a == a + b{noformat}
> Common representations are double-double and quad-double (see for example 
> David Bailey's paper on a quad-double library: 
> [QD|https://www.davidhbailey.com/dhbpapers/qd.pdf]).
> Many computations in the Commons Numbers and Statistics libraries use 
> extended precision computations where the accumulated error of a double would 
> lead to complete cancellation of all significant bits; or create intermediate 
> overflow of integer values.
> This project would formalise the code underlying these use cases with a 
> generic library applicable for use in the case where the result is expected 
> to be a finite value and using Java's BigDecimal and/or BigInteger negatively 
> impacts performance.
> An example would be the average of long values where the intermediate sum 
> overflows or the conversion to a double loses bits:
> {code:java}
> long[] values = {Long.MAX_VALUE, Long.MAX_VALUE}; 
> System.out.println(Arrays.stream(values).average().getAsDouble()); 
> System.out.println(Arrays.stream(values).mapToObj(BigDecimal::valueOf)
> .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values.length)).doubleValue());
> long[] values2 = {Long.MAX_VALUE, Long.MIN_VALUE}; 
> System.out.println(Arrays.stream(values2).asDoubleStream().average().getAsDouble());
>  System.out.println(Arrays.stream(values2).mapToObj(BigDecimal::valueOf)
>     .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values2.length)).doubleValue());
> {code}
> Outputs:
> {noformat}
> -1.0
> 9.223372036854776E18
> 0.0
> -0.5{noformat}



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


[GitHub] [commons-lang] laurentschoelens commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


laurentschoelens commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468443524

   @garydgregory : got an exemple for you of usage
   `5 * ((6 * 7 + 2) * 3)`
   Actual method will return `(6 * 7 + 2` where we would lire to have `(6 * 7 + 
2) * 3` with params `"("), ")"`


-- 
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] (NUMBERS-193) Add support for extended precision floating-point numbers

2023-03-14 Thread Sentaro Onizuka (Jira)


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

Sentaro Onizuka commented on NUMBERS-193:
-

I may have misunderstood Alex's suggestion. Please let me know if I 
misunderstand any of the following.


{quote}
The DD class would be a more general number to be used as you would use a 
double or a BigDecimal. I would imagine the API would consist of methods acting 
on the current instance and returning a new instance:
{quote}
>From here, I understood that the DD class would be implemented in an immutable 
>class.


{quote}
The key point of the current API is that it requires no memory allocation 
within the class. As such the class has been written to be mutable. All methods 
act on primitives and write results to an output argument. However this does 
not fully encapsulate the functionality and methods may be called with 
arguments that are not normalised double-double numbers.
{quote}
Also, from here,
The reason for changing from a mutable class to an immutable class is that I 
believe encapsulation prevents the use of unnormalized double-double numbers.

And when implemented in an immutable class, performance becomes an issue apart 
from the benefit of encapsulation.
In particular, each method requires a process to create a new instance, which 
may degrade performance.
Therefore, before changing to the immutable class, we wanted to investigate the 
impact of object creation and garbage collection on performance by evaluating 
performance with and without adding a method that creates a new instance.


{quote}
I would have thought of the reverse: How would one measure relative performance 
before having implemented the two alternative APIs?
{quote}
As described above, I considered comparing performance with and without adding 
a method that creates a new instance.
Of course, after implementing the DD class in the immutable class, I believe a 
comparison with the original DD class will also be necessary.


{quote}
However, I'd think that it's safer and simpler to first ensure that both 
implementations are correct through unit testing
{quote}
What do both implementations mean, the original DD class and the other?
If not a change to an immutable class, what changes are necessary?

> Add support for extended precision floating-point numbers
> -
>
> Key: NUMBERS-193
> URL: https://issues.apache.org/jira/browse/NUMBERS-193
> Project: Commons Numbers
>  Issue Type: New Feature
>Reporter: Alex Herbert
>Priority: Major
>  Labels: full-time, gsoc2023, part-time
>
> Add implementations of extended precision floating point numbers.
> An extended precision floating point number is a series of floating-point 
> numbers that are non-overlapping such that:
> {noformat}
> double-double (a, b):
> |a| > |b|
> a == a + b{noformat}
> Common representations are double-double and quad-double (see for example 
> David Bailey's paper on a quad-double library: 
> [QD|https://www.davidhbailey.com/dhbpapers/qd.pdf]).
> Many computations in the Commons Numbers and Statistics libraries use 
> extended precision computations where the accumulated error of a double would 
> lead to complete cancellation of all significant bits; or create intermediate 
> overflow of integer values.
> This project would formalise the code underlying these use cases with a 
> generic library applicable for use in the case where the result is expected 
> to be a finite value and using Java's BigDecimal and/or BigInteger negatively 
> impacts performance.
> An example would be the average of long values where the intermediate sum 
> overflows or the conversion to a double loses bits:
> {code:java}
> long[] values = {Long.MAX_VALUE, Long.MAX_VALUE}; 
> System.out.println(Arrays.stream(values).average().getAsDouble()); 
> System.out.println(Arrays.stream(values).mapToObj(BigDecimal::valueOf)
> .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values.length)).doubleValue());
> long[] values2 = {Long.MAX_VALUE, Long.MIN_VALUE}; 
> System.out.println(Arrays.stream(values2).asDoubleStream().average().getAsDouble());
>  System.out.println(Arrays.stream(values2).mapToObj(BigDecimal::valueOf)
>     .reduce(BigDecimal.ZERO, BigDecimal::add)
> .divide(BigDecimal.valueOf(values2.length)).doubleValue());
> {code}
> Outputs:
> {noformat}
> -1.0
> 9.223372036854776E18
> 0.0
> -0.5{noformat}



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


[GitHub] [commons-lang] laurentschoelens opened a new pull request, #1041: LANG-1643 : init ArrayList with good default size

2023-03-14 Thread via GitHub


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

   As pointed by LANG-1643, the `ArrayList<>()` constructor creates an empty 
List which will always grow at first add, which is done in the next line of 
code in `EqualsBuilder`


-- 
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] (LANG-1682) Adding StringUtils.startsWithAnyIgnoreCase method

2023-03-14 Thread Laurent SCHOELENS (Jira)


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

Laurent SCHOELENS commented on LANG-1682:
-

Provided a PR for that new feature 
[https://github.com/apache/commons-lang/pull/1040]

> Adding StringUtils.startsWithAnyIgnoreCase method
> -
>
> Key: LANG-1682
> URL: https://issues.apache.org/jira/browse/LANG-1682
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.*
>Reporter: Ruslan Sibgatullin
>Priority: Minor
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Adding `StringUtils.startsWithAnyIgnoreCase` to have more flexibility.
> Based on the existing `startsWith` method



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


[GitHub] [commons-lang] laurentschoelens opened a new pull request, #1040: LANG-1682 : adding new startsWithAnyIgnoreCase method and tests cases

2023-03-14 Thread via GitHub


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

   Adding new method startsWithAnyIgnoreCase method for case-insensitive 
version of startsWithAny


-- 
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] laurentschoelens commented on pull request #1039: LANG-1682 : adding new startsWithAnyIgnoreCase method and tests cases

2023-03-14 Thread via GitHub


laurentschoelens commented on PR #1039:
URL: https://github.com/apache/commons-lang/pull/1039#issuecomment-1468106712

   Closing as non-wanted commits in PR


-- 
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] laurentschoelens closed pull request #1039: LANG-1682 : adding new startsWithAnyIgnoreCase method and tests cases

2023-03-14 Thread via GitHub


laurentschoelens closed pull request #1039: LANG-1682 : adding new 
startsWithAnyIgnoreCase method and tests cases
URL: https://github.com/apache/commons-lang/pull/1039


-- 
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] laurentschoelens opened a new pull request, #1039: LANG-1682 : adding new startsWithAnyIgnoreCase method and tests cases

2023-03-14 Thread via GitHub


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

   Adding new method `startsWithAnyIgnoreCase` method for case-insensitive 
version of `startsWithAny`


-- 
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] laurentschoelens commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


laurentschoelens commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468077988

   seen build failed due to checkstyle violation (not having checkstyle 
activated on my IDE), added a fix for this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #1021: Created a new function for the StringUtils class.

2023-03-14 Thread via GitHub


garydgregory closed pull request #1021: Created a new function for the 
StringUtils class.
URL: https://github.com/apache/commons-lang/pull/1021


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1021: Created a new function for the StringUtils class.

2023-03-14 Thread via GitHub


garydgregory commented on PR #1021:
URL: https://github.com/apache/commons-lang/pull/1021#issuecomment-1468054253

   No feedback, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #982: Remove unnecessary else conditions.

2023-03-14 Thread via GitHub


garydgregory commented on PR #982:
URL: https://github.com/apache/commons-lang/pull/982#issuecomment-1468053498

   No feedback, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #982: Remove unnecessary else conditions.

2023-03-14 Thread via GitHub


garydgregory closed pull request #982: Remove unnecessary else conditions.
URL: https://github.com/apache/commons-lang/pull/982


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory merged pull request #980: Make a non-access modifier local variables.

2023-03-14 Thread via GitHub


garydgregory merged PR #980:
URL: https://github.com/apache/commons-lang/pull/980


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #930: Fixed incorrect documentation

2023-03-14 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #930: Fixed incorrect documentation

2023-03-14 Thread via GitHub


garydgregory commented on PR #930:
URL: https://github.com/apache/commons-lang/pull/930#issuecomment-1468048696

   No reply, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on a diff in pull request #956: Improve JavaDocs

2023-03-14 Thread via GitHub


garydgregory commented on code in PR #956:
URL: https://github.com/apache/commons-lang/pull/956#discussion_r1135493662


##
src/main/java/org/apache/commons/lang3/BitField.java:
##
@@ -281,7 +281,7 @@ public byte setByte(final byte holder) {
 }
 
 /**
- * Sets a boolean BitField.
+ * Sets a {@code boolean} BitField.

Review Comment:
   Hi @arturobernalg 
   In this case, the bit field is a `short`, not a `boolean`, right? It's the 
bits in the bit field that represent booleans. I think If we are going to touch 
Javadocs we should make sure they are correct first ;-) See the other setters 
as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #1008: Make java.desktop module optional

2023-03-14 Thread via GitHub


garydgregory closed pull request #1008: Make java.desktop module optional
URL: https://github.com/apache/commons-lang/pull/1008


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1008: Make java.desktop module optional

2023-03-14 Thread via GitHub


garydgregory commented on PR #1008:
URL: https://github.com/apache/commons-lang/pull/1008#issuecomment-1468040942

   Broken build, no updates, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #1029: Added empty string example for appendIfMissing method

2023-03-14 Thread via GitHub


garydgregory closed pull request #1029: Added empty string example for 
appendIfMissing method
URL: https://github.com/apache/commons-lang/pull/1029


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1029: Added empty string example for appendIfMissing method

2023-03-14 Thread via GitHub


garydgregory commented on PR #1029:
URL: https://github.com/apache/commons-lang/pull/1029#issuecomment-1468038736

   No feedback, closing.


-- 
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] laurentschoelens commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


laurentschoelens commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468008183

   HI @garydgregory thanks for the review and comment.
   Someone thought the stringBetween works like taking the substring between 
two string, with last argument taken as far as possible, and maybe there is 
some use-cases, and the documentation is not clear on that.
   
   If not adding the new function, maybe updating the documentation to make it 
clear what it does should be enough :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1025: Bump junit-pioneer from 1.9.1 to 2.0.0

2023-03-14 Thread via GitHub


garydgregory commented on PR #1025:
URL: https://github.com/apache/commons-lang/pull/1025#issuecomment-1468004486

   Leaving it open as a reminder to update when the time comes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory closed pull request #1030: Added new example for containsAny method

2023-03-14 Thread via GitHub


garydgregory closed pull request #1030: Added new example for containsAny method
URL: https://github.com/apache/commons-lang/pull/1030


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1030: Added new example for containsAny method

2023-03-14 Thread via GitHub


garydgregory commented on PR #1030:
URL: https://github.com/apache/commons-lang/pull/1030#issuecomment-1468003381

   No feedback, closing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [commons-lang] garydgregory commented on pull request #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


garydgregory commented on PR #1038:
URL: https://github.com/apache/commons-lang/pull/1038#issuecomment-1468002870

   I am -1 for this new feature which feels like a super niche use case which 
overcomplicates the code base. I'm curious to hear what others think.


-- 
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] (NET-719) FTPS protocal timing problems behind WAF (F5) firewall

2023-03-14 Thread Stefan Kuhr (Jira)


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

Stefan Kuhr commented on NET-719:
-

[~ggregory] : thanks for the advise, can you please make a suggestion how to 
provide a testcase in this scenario, as the test depends on the server being 
behind the WAF, which I cannot provide in a simple test. Do I have to implement 
a server, simulating the behavior of the WAF?

> FTPS protocal timing problems behind WAF (F5) firewall
> --
>
> Key: NET-719
> URL: https://issues.apache.org/jira/browse/NET-719
> Project: Commons Net
>  Issue Type: Improvement
>  Components: FTP
>Affects Versions: 3.9.0
>Reporter: Stefan Kuhr
>Priority: Major
> Attachments: FTPSClient_RETR_Timing_diagram_current_impl-1.png, 
> FTPSClient_RETR_Timing_diagram_problem.png, 
> FTPSClient_RETR_Timing_diagram_solution.png
>
>
> A working data exchange setup stopped working, after the server (vsftpd / 
> RedHat) was moved behind a WAF (F5) web application firewall. The client uses 
> PASV mode and the operation resulted in a socket timeout on the client side, 
> as soon as the data channel came into play (LIST/RETR/STOR).
> A FileZilla client does not exhibit this problem. By looking at the protocol 
> exchanges and laying them down in timing diagrams the problem seems to be, 
> that the WAF expects the client to fully establish the data-channel, after 
> the data-command is send over the control-channel. The current FTPS client on 
> the other hand expects the server reply directly after the command is sent.
> A pull request will be provided.
>  



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


[jira] [Commented] (NET-719) FTPS protocal timing problems behind WAF (F5) firewall

2023-03-14 Thread Gary D. Gregory (Jira)


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

Gary D. Gregory commented on NET-719:
-

Hello [~skaptara] 

Make sure your PR includes a test that fails when main changes are not applied, 
otherwise this will be a regression waiting to happen. 

> FTPS protocal timing problems behind WAF (F5) firewall
> --
>
> Key: NET-719
> URL: https://issues.apache.org/jira/browse/NET-719
> Project: Commons Net
>  Issue Type: Improvement
>  Components: FTP
>Affects Versions: 3.9.0
>Reporter: Stefan Kuhr
>Priority: Major
> Attachments: FTPSClient_RETR_Timing_diagram_current_impl-1.png, 
> FTPSClient_RETR_Timing_diagram_problem.png, 
> FTPSClient_RETR_Timing_diagram_solution.png
>
>
> A working data exchange setup stopped working, after the server (vsftpd / 
> RedHat) was moved behind a WAF (F5) web application firewall. The client uses 
> PASV mode and the operation resulted in a socket timeout on the client side, 
> as soon as the data channel came into play (LIST/RETR/STOR).
> A FileZilla client does not exhibit this problem. By looking at the protocol 
> exchanges and laying them down in timing diagrams the problem seems to be, 
> that the WAF expects the client to fully establish the data-channel, after 
> the data-command is send over the control-channel. The current FTPS client on 
> the other hand expects the server reply directly after the command is sent.
> A pull request will be provided.
>  



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


[jira] [Created] (NET-719) FTPS protocal timing problems behind WAF (F5) firewall

2023-03-14 Thread Stefan Kuhr (Jira)
Stefan Kuhr created NET-719:
---

 Summary: FTPS protocal timing problems behind WAF (F5) firewall
 Key: NET-719
 URL: https://issues.apache.org/jira/browse/NET-719
 Project: Commons Net
  Issue Type: Improvement
  Components: FTP
Affects Versions: 3.9.0
Reporter: Stefan Kuhr
 Attachments: FTPSClient_RETR_Timing_diagram_current_impl-1.png, 
FTPSClient_RETR_Timing_diagram_problem.png, 
FTPSClient_RETR_Timing_diagram_solution.png

A working data exchange setup stopped working, after the server (vsftpd / 
RedHat) was moved behind a WAF (F5) web application firewall. The client uses 
PASV mode and the operation resulted in a socket timeout on the client side, as 
soon as the data channel came into play (LIST/RETR/STOR).

A FileZilla client does not exhibit this problem. By looking at the protocol 
exchanges and laying them down in timing diagrams the problem seems to be, that 
the WAF expects the client to fully establish the data-channel, after the 
data-command is send over the control-channel. The current FTPS client on the 
other hand expects the server reply directly after the command is sent.

A pull request will be provided.

 



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


[jira] [Commented] (LANG-1687) java Document update

2023-03-14 Thread Laurent SCHOELENS (Jira)


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

Laurent SCHOELENS commented on LANG-1687:
-

Hi [~typark] 

The documentation is correct, the goal of `substringBetween` is to return the 
first substring between the first occurence of second parameter and the first 
occurence of the third parameter (after the index of second parameter)

I guess we could add a substringBetween(String, String, String, boolean) with a 
fourth parameter that could do what you want (get the last occurence of the 
third parameter) : PR done https://github.com/apache/commons-lang/pull/1038

> java Document update
> 
>
> Key: LANG-1687
> URL: https://issues.apache.org/jira/browse/LANG-1687
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.*
>Reporter: taeyongpark
>Priority: Minor
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The example of java document is incorrect.
>  
> This is not incorrect: 
> {code:java}
> StringUtils.substringBetween("yabczyabcz", "y", "z")   = "abc"{code}
> This is correct: 
> {code:java}
> StringUtils.substringBetween("yabczyabcz", "y", "z")   = "abczyabc"{code}



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


[GitHub] [commons-lang] laurentschoelens opened a new pull request, #1038: LANG-1687 : Propose update from substringBetween doc and new method

2023-03-14 Thread via GitHub


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

   Propose an update to documentation of substringBetween (treat LANG-1687) and 
add new method to have behaviour wanted by the user


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