You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/02/14 21:26:04 UTC

[05/10] cxf git commit: Fix problem of new logging with JMS based JAXRS services

Fix problem of new logging with JMS based JAXRS services


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/02ed4018
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/02ed4018
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/02ed4018

Branch: refs/heads/3.1.x-fixes
Commit: 02ed4018428aff46d46b384aff1ea4571dc551e3
Parents: f56aa14
Author: Daniel Kulp <dk...@apache.org>
Authored: Thu Feb 9 11:04:52 2017 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Feb 14 09:53:24 2017 -0500

----------------------------------------------------------------------
 .../org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/02ed4018/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
----------------------------------------------------------------------
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
index f48629f..66082bc 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
@@ -258,8 +258,9 @@ public class DefaultLogEventMapper implements LogEventMapper {
         String requestUri = safeGet(message, Message.REQUEST_URI);
         if (requestUri != null) {
             String basePath = safeGet(message, Message.BASE_PATH);
-            int baseUriLength = (basePath != null) ? basePath.length() : 0;
-            path = requestUri.substring(baseUriLength);
+            if (basePath != null && requestUri.startsWith(basePath)) {
+                path = requestUri.substring(basePath.length());
+            }
             if (path.isEmpty()) {
                 path = "/";
             }