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
|
||||
* @return the Gson pointer
|
||||
*/
|
||||
public GsonPtr computeIfAbsent(Object selector, String value) {
|
||||
public GsonPtr getOrSet(Object selector, String value) {
|
||||
computeIfAbsent(selector, () -> new JsonPrimitive(value));
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public class Reconciler extends Component {
|
|||
pvcDef.to("spec").computeIfAbsent("accessModes",
|
||||
() -> GsonPtr.to(new JsonArray()).set(0, "ReadWriteOnce")
|
||||
.get());
|
||||
pvcDef.to("spec").computeIfAbsent("volumeMode", "Block");
|
||||
pvcDef.to("spec").getOrSet("volumeMode", "Block");
|
||||
pvcApi.create(pvcObject);
|
||||
} else {
|
||||
// spec is immutable, so mix in existing spec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue