Rename method.

This commit is contained in:
Michael Lipp 2023-07-25 12:53:35 +02:00
parent 8f5bec1311
commit eb6960969d
2 changed files with 2 additions and 2 deletions

View file

@ -245,7 +245,7 @@ public class GsonPtr {
* @param value the value * @param value the value
* @return the Gson pointer * @return the Gson pointer
*/ */
public GsonPtr computeIfAbsent(Object selector, String value) { public GsonPtr getOrSet(Object selector, String value) {
computeIfAbsent(selector, () -> new JsonPrimitive(value)); computeIfAbsent(selector, () -> new JsonPrimitive(value));
return this; return this;
} }

View file

@ -118,7 +118,7 @@ public class Reconciler extends Component {
pvcDef.to("spec").computeIfAbsent("accessModes", pvcDef.to("spec").computeIfAbsent("accessModes",
() -> GsonPtr.to(new JsonArray()).set(0, "ReadWriteOnce") () -> GsonPtr.to(new JsonArray()).set(0, "ReadWriteOnce")
.get()); .get());
pvcDef.to("spec").computeIfAbsent("volumeMode", "Block"); pvcDef.to("spec").getOrSet("volumeMode", "Block");
pvcApi.create(pvcObject); pvcApi.create(pvcObject);
} else { } else {
// spec is immutable, so mix in existing spec // spec is immutable, so mix in existing spec