Rename method.
This commit is contained in:
parent
8f5bec1311
commit
eb6960969d
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue