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:54 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes de9070aec -> 6d0242c03


[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/6d0242c0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6d0242c0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6d0242c0

Branch: refs/heads/3.0.x-fixes
Commit: 6d0242c038556a5e82e4d8f4b77ac458e4db55ef
Parents: de9070a
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:40 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/6d0242c0/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 b33a696..add0394 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
@@ -253,10 +253,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 + "\"";
@@ -268,7 +268,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) {
@@ -1200,7 +1200,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