diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-25 07:29:53 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-25 07:29:53 +0200 |
commit | 0490ef100d0568dd372fa60e86990c4e4f94a6e5 (patch) | |
tree | dac90777aa75db44f35dc558e2fe143d19ae1d50 /container-core/src/main/java/com/yahoo/processing | |
parent | aa90841e3e36242d286f79a1f53ae84a0e9ff216 (diff) |
removal suppression
Diffstat (limited to 'container-core/src/main/java/com/yahoo/processing')
-rw-r--r-- | container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java | 2 | ||||
-rw-r--r-- | container-core/src/main/java/com/yahoo/processing/request/Properties.java | 22 |
2 files changed, 9 insertions, 15 deletions
diff --git a/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java b/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java index 738e6c32c8b..cb1b2d6888c 100644 --- a/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java +++ b/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java @@ -79,7 +79,7 @@ public class CloneHelper { return arrayClone; } - @SuppressWarnings("deprecation") + @SuppressWarnings({"removal"}) protected Object objectClone(Object object) { // Fastpath for our commonly used classes if (object instanceof FreezableClass) diff --git a/container-core/src/main/java/com/yahoo/processing/request/Properties.java b/container-core/src/main/java/com/yahoo/processing/request/Properties.java index b4a619f11fb..ac43f99472e 100644 --- a/container-core/src/main/java/com/yahoo/processing/request/Properties.java +++ b/container-core/src/main/java/com/yahoo/processing/request/Properties.java @@ -149,7 +149,6 @@ public class Properties implements Cloneable { /** * Gets a named value from the first chained instance which has one, * or the default value if no value is set, or if the first value encountered is explicitly set to null. - * * This default implementation simply forwards to the chained instance, or returns the default if none. * * @param name the name of the property to return @@ -164,7 +163,6 @@ public class Properties implements Cloneable { /** * Gets a named value from the first chained instance which has one, * or the default value if no value is set, or if the first value encountered is explicitly set to null. - * * This default implementation simply forwards to the chained instance, or returns the default if none. * * @param name the name of the property to return @@ -176,7 +174,6 @@ public class Properties implements Cloneable { /** * Sets a value to the first chained instance which accepts it. - * * This default implementation forwards to the chained instance or throws * a RuntimeException if there is not chained instance. * @@ -193,7 +190,6 @@ public class Properties implements Cloneable { /** * Sets a value to the first chained instance which accepts it. - * * This default implementation forwards to the chained instance or throws * a RuntimeException if there is not chained instance. * @@ -325,16 +321,14 @@ public class Properties implements Cloneable { String s = value.toString(); int sz = s.length(); - switch (sz) { - case 0: - return true; - case 4: - return ((s.charAt(0) | 0x20) == 't') && - ((s.charAt(1) | 0x20) == 'r') && - ((s.charAt(2) | 0x20) == 'u') && - ((s.charAt(3) | 0x20) == 'e'); - } - return false; + return switch (sz) { + case 0: yield true; + case 4: yield ((s.charAt(0) | 0x20) == 't') && + ((s.charAt(1) | 0x20) == 'r') && + ((s.charAt(2) | 0x20) == 'u') && + ((s.charAt(3) | 0x20) == 'e'); + default: yield false; + }; } /** |