You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2019/12/04 17:23:16 UTC

[cxf] branch master updated: It seems that the ending slash should be remved but current code does nothing at all. (#609)

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

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new e0021c4  It seems that the ending slash should be remved but current code does nothing at all. (#609)
e0021c4 is described below

commit e0021c47b65f9328fb57229c4b9e91fbf36d92d7
Author: Fabian Barney <fa...@users.noreply.github.com>
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);
---
 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;
                 }