]> source.dussan.org Git - archiva.git/commitdiff
avoid npe
authorolivier lamy <olamy@apache.org>
Sat, 2 Sep 2017 08:56:07 +0000 (18:56 +1000)
committerolivier lamy <olamy@apache.org>
Sat, 2 Sep 2017 08:56:07 +0000 (18:56 +1000)
Signed-off-by: olivier lamy <olamy@apache.org>
archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/enunciate/archiva.fmt
archiva-modules/archiva-web/archiva-web-common/src/enunciate/archiva.fmt

index 2137bfb398f2fdbb16a8cba25c583b2439236c8e..9d8a114b3ba1acb56b387a1a9fc5c73a0a1395b5 100644 (file)
@@ -431,7 +431,7 @@ limitations under the License.
       <ul>
       [#list resourceGroup.resources?sort_by("path") as resource]
 [#list resource.methods as method]
-<li><a href="#${method.slug}">${apiRelativePath}${resourceGroup.contextPath}${resource.path}</a></li>
+        <li><a href="#${method.slug}">${apiRelativePath}${resourceGroup.contextPath!""}${resource.path}</a></li>
 [/#list]
       [/#list]
       </ul>
@@ -452,7 +452,7 @@ limitations under the License.
         [#list resource.methods as method]
 
       <div id="${method.slug}">
-        <h2>${method.label} <small>${resource.path} <a href="${apiRelativePath}${resourceGroup.contextPath}${resource.path}" class="glyphicon glyphicon-new-window" target="_blank"></a></small></h2>
+        <h2>${method.label} <small>${resource.path} <a href="${apiRelativePath}${resourceGroup.contextPath!""}${resource.path}" class="glyphicon glyphicon-new-window" target="_blank"></a></small></h2>
           [#if resourceGroup.deprecated?? || method.deprecated??]
 
         <div class="alert alert-danger">This method has been deprecated. [#if method.deprecated??] ${method.deprecated!""}[#else] ${resource.deprecated!""}[/#if]</div>
@@ -934,4 +934,4 @@ limitations under the License.
   [#else]
 ${metaValue}
   [/#if]
-[/#macro]
\ No newline at end of file
+[/#macro]
index 2137bfb398f2fdbb16a8cba25c583b2439236c8e..e1f2d8430441111b8c8dd1d5d6952907e2997af3 100644 (file)
@@ -431,7 +431,7 @@ limitations under the License.
       <ul>
       [#list resourceGroup.resources?sort_by("path") as resource]
 [#list resource.methods as method]
-<li><a href="#${method.slug}">${apiRelativePath}${resourceGroup.contextPath}${resource.path}</a></li>
+<li><a href="#${method.slug}">${apiRelativePath}${resourceGroup.contextPath!""}${resource.path}</a></li>
 [/#list]
       [/#list]
       </ul>
@@ -452,7 +452,7 @@ limitations under the License.
         [#list resource.methods as method]
 
       <div id="${method.slug}">
-        <h2>${method.label} <small>${resource.path} <a href="${apiRelativePath}${resourceGroup.contextPath}${resource.path}" class="glyphicon glyphicon-new-window" target="_blank"></a></small></h2>
+        <h2>${method.label} <small>${resource.path} <a href="${apiRelativePath}${resourceGroup.contextPath!""}${resource.path}" class="glyphicon glyphicon-new-window" target="_blank"></a></small></h2>
           [#if resourceGroup.deprecated?? || method.deprecated??]
 
         <div class="alert alert-danger">This method has been deprecated. [#if method.deprecated??] ${method.deprecated!""}[#else] ${resource.deprecated!""}[/#if]</div>