cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: use safeHTML in logbrowser
Date Tue, 26 Aug 2014 08:15:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5fa0cbed4 -> 0c25f5ee5


use safeHTML in logbrowser


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

Branch: refs/heads/master
Commit: 0c25f5ee5b66f5d0733ad444c63ed43c48576523
Parents: 5fa0cbe
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Tue Aug 26 10:14:27 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Tue Aug 26 10:15:28 2014 +0200

----------------------------------------------------------------------
 .../browser/client/ui/browser/ViewerViewImpl.java   | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0c25f5ee/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
index b427af1..4b7f6cb 100644
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
+++ b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
@@ -20,12 +20,14 @@
 package org.apache.cxf.management.web.browser.client.ui.browser;
 
 import java.util.List;
+
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.safehtml.shared.SafeHtmlUtils;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.uibinder.client.UiHandler;
@@ -103,16 +105,10 @@ public class ViewerViewImpl extends Composite implements ViewerView
{
             return;
         }
 
-        StringBuilder sb = new StringBuilder();
-
-        if (entry.getMessage() != null) {
-            sb.append(entry.getMessage()).append("\n");
-        }
-        if (entry.getThrowable() != null) {
-            sb.append(entry.getThrowable());
-        }
-
-        entryDetails.setHTML(sb.toString());
+        String val = entry.getMessage() != null 
+            ? entry.getMessage() : entry.getThrowable() != null
+            ? entry.getThrowable() : "";
+        entryDetails.setHTML(SafeHtmlUtils.fromString(val));
     }
 
     public void setLinks(@Nonnull final Links links) {


Mime
View raw message