This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit bfc1d712ea2d5ab32aa0f4cab532e423591fd395
Author: Fabian Barney <[email protected]>
AuthorDate: Wed Dec 4 18:23:06 2019 +0100

    It seems that the ending slash should be remved but current code does 
nothing at all. (#609)
    
    The following code always dows nothing at all:
    address = address.substring(0, address.length());
    
    It seems that the ending slash should be removed in some cases:
    address = address.substring(0, address.length() - 1);
    
    (cherry picked from commit e0021c47b65f9328fb57229c4b9e91fbf36d92d7)
---
 core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java 
b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
index d3f9be2..48feaf2 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -129,7 +129,7 @@ public class LoggingInInterceptor extends 
AbstractLoggingInterceptor {
             if (uri != null && uri.startsWith("/")) {
                 if (address != null && !address.startsWith(uri)) {
                     if (address.endsWith("/") && address.length() > 1) {
-                        address = address.substring(0, address.length());
+                        address = address.substring(0, address.length() - 1);
                     }
                     uri = address + uri;
                 }

Reply via email to