cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6592] Using pre-configured baseURI
Date Tue, 15 Sep 2015 12:58:18 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e30839db7 -> 6e67ffc60


[CXF-6592] Using pre-configured baseURI


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

Branch: refs/heads/master
Commit: 6e67ffc606fe598407a33480628023575f406ff0
Parents: e30839d
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Sep 15 13:58:04 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Sep 15 13:58:04 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6e67ffc6/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 39997bd..5758aa0 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -252,10 +252,10 @@ public class WadlGenerator implements ContainerRequestFilter {
     private boolean isJson(MediaType mt) {
         return mt == MediaType.APPLICATION_JSON_TYPE;
     }
-    private String getStylesheetInstructionData(Message m, UriInfo ui) {
+    private String getStylesheetInstructionData(String baseURI) {
         String theStylesheetReference = stylesheetReference;
         if (!keepRelativeDocLinks) {
-            theStylesheetReference = UriBuilder.fromUri(getBaseURI(m, ui))
+            theStylesheetReference = UriBuilder.fromUri(baseURI)
                 .path(theStylesheetReference).build().toString();
         }
         return "type=\"text/xsl\" href=\"" + theStylesheetReference + "\"";
@@ -267,7 +267,7 @@ public class WadlGenerator implements ContainerRequestFilter {
                                        UriInfo ui) {
         StringBuilder sbMain = new StringBuilder();
         if (!isJson && stylesheetReference != null && !applyStylesheetLocally)
{
-            sbMain.append("<?xml-stylesheet " + getStylesheetInstructionData(m, ui) +
"?>");
+            sbMain.append("<?xml-stylesheet " + getStylesheetInstructionData(baseURI)
+ "?>");
         }
         sbMain.append("<application");
         if (!isJson) {
@@ -1199,7 +1199,7 @@ public class WadlGenerator implements ContainerRequestFilter {
         if (stylesheetReference != null) {
             if (!applyStylesheetLocally) {
                 ProcessingInstruction pi = wadlDoc.createProcessingInstruction("xml-stylesheet",

-                                              getStylesheetInstructionData(m, ui));
+                                              getStylesheetInstructionData(getBaseURI(m,
ui)));
                 wadlDoc.insertBefore(pi, wadlDoc.getDocumentElement());
                 entity = copyDOMToString(wadlDoc);
             } else {


Mime
View raw message