summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-09-13 15:18:53 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-14 08:44:50 +0300
commitcaf41dbac44b53c475e20ccc621c80c754033df9 (patch)
tree54f8260fb352be4ef3822ccd430f7e60e5c963ac /shared
parentce25750a8fd3642cf1ed7d0dac708517d5bfd226 (diff)
downloadvaadin-framework-caf41dbac44b53c475e20ccc621c80c754033df9.tar.gz
vaadin-framework-caf41dbac44b53c475e20ccc621c80c754033df9.zip
Simplify conditional logic.
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/util/SharedUtil.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
index 974c45ae02..d1b7cf0b22 100644
--- a/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
+++ b/shared/src/main/java/com/vaadin/shared/util/SharedUtil.java
@@ -93,13 +93,10 @@ public class SharedUtil implements Serializable {
} else if (!Character.isUpperCase(camelCaseString.charAt(i - 1))) {
// Word ends if previous char wasn't upper case
return true;
- } else if (i + 1 < camelCaseString.length()
- && !Character.isUpperCase(camelCaseString.charAt(i + 1))) {
- // Word ends if next char isn't upper case
- return true;
- } else {
- return false;
}
+ // Word ends if next char isn't upper case
+ return i + 1 < camelCaseString.length()
+ && !Character.isUpperCase(camelCaseString.charAt(i + 1));
}
/**