You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/01/15 21:23:53 UTC
[isis] branch master updated: ISIS-2158: WebAppContextPath,
more code-quality
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 8a9d1d2 ISIS-2158: WebAppContextPath, more code-quality
8a9d1d2 is described below
commit 8a9d1d21d5af8777136673df07ae6f69a641dedb
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Jan 15 22:23:41 2020 +0100
ISIS-2158: WebAppContextPath, more code-quality
---
.../isis/core/config/viewer/wicket/WebAppContextPath.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/core/config/src/main/java/org/apache/isis/core/config/viewer/wicket/WebAppContextPath.java b/core/config/src/main/java/org/apache/isis/core/config/viewer/wicket/WebAppContextPath.java
index a8eda71..24ffbbc 100644
--- a/core/config/src/main/java/org/apache/isis/core/config/viewer/wicket/WebAppContextPath.java
+++ b/core/config/src/main/java/org/apache/isis/core/config/viewer/wicket/WebAppContextPath.java
@@ -60,7 +60,7 @@ public class WebAppContextPath implements Serializable {
* @param contextPath - any form allowed: leading or trailing '/',
* no matter what, gets normalized
*/
- public void setContextPath(final String contextPath) {
+ public void setContextPath(@Nullable final String contextPath) {
this.contextPath = normalizeContextPath(contextPath);
}
@@ -75,7 +75,7 @@ public class WebAppContextPath implements Serializable {
* @param localPath - last part of an URL to be prefixed (nullable)
* @return (non-null)
*/
- public String prependContextPath(@Nullable String localPath) {
+ public String prependContextPath(@Nullable final String localPath) {
if(localPath==null) {
return getContextPath();
}
@@ -90,7 +90,7 @@ public class WebAppContextPath implements Serializable {
* identity operator otherwise
*/
@Nullable
- public String prependContextPathIfLocal(@Nullable String urlOrLocalPath) {
+ public String prependContextPathIfLocal(@Nullable final String urlOrLocalPath) {
if(urlOrLocalPath==null) {
return null;
}
@@ -107,7 +107,7 @@ public class WebAppContextPath implements Serializable {
/**
* make sure result is either empty or has a leading slash followed by a non-empty string
*/
- private String normalizeContextPath(final String contextPath) {
+ private String normalizeContextPath(@Nullable final String contextPath) {
if(contextPath == null) {
return "";
}
@@ -123,7 +123,8 @@ public class WebAppContextPath implements Serializable {
return ensureLeadingSlash(path);
}
- private String ensureLeadingSlash(String url) {
+ @Nullable
+ private String ensureLeadingSlash(@Nullable final String url) {
if(url==null || url.length()<2) {
return url;
}