Source:
public VaultSettings read(JsonReader in) throws IOException { String id = null; String path = null; String mountName = null; String individualMountPath = null; String winDriveLetter = null; boolean unlockAfterStartup = VaultSettings.DEFAULT_UNLOCK_AFTER_STARTUP; boolean revealAfterMount = VaultSettings.DEFAULT_REAVEAL_AFTER_MOUNT; boolean usesIndividualMountPath = VaultSettings.DEFAULT_USES_CUSTOM_MOUNTPATH; in.beginObject(); while (in.hasNext()) { String name = in.nextName(); switch (name) { case "id": id = in.nextString(); break; case "path": path = in.nextString(); break; case "mountName": mountName = in.nextString(); break; case "winDriveLetter": winDriveLetter = in.nextString(); break; case "unlockAfterStartup": unlockAfterStartup = in.nextBoolean(); break; case "revealAfterMount": revealAfterMount = in.nextBoolean(); break; case "usesCustomMountPath": usesIndividualMountPath = in.nextBoolean(); break; case "customMountPath": individualMountPath = in.nextString(); break; default: LOG.warn("Unsupported vault setting found in JSON: " + name); in.skipValue(); } } in.endObject(); VaultSettings vaultSettings = (id == null) ? VaultSettings.withRandomId() : new VaultSettings(id); vaultSettings.mountName().set(mountName); vaultSettings.path().set(Paths.get(path)); vaultSettings.winDriveLetter().set(winDriveLetter); vaultSettings.unlockAfterStartup().set(unlockAfterStartup); vaultSettings.revealAfterMount().set(revealAfterMount); vaultSettings.usesCustomMountPath().set(usesIndividualMountPath); vaultSettings.customMountPath().set(individualMountPath); return vaultSettings; }

Target:
public VaultSettings read(JsonReader in) throws IOException { String id = null; String path = null; String mountName = null; String individualMountPath = null; String winDriveLetter = null; boolean unlockAfterStartup = VaultSettings.DEFAULT_UNLOCK_AFTER_STARTUP; boolean revealAfterMount = VaultSettings.DEFAULT_REAVEAL_AFTER_MOUNT; boolean usesIndividualMountPath = VaultSettings.DEFAULT_USES_INDIVIDUAL_MOUNTPATH; in.beginObject(); while (in.hasNext()) { String name = in.nextName(); switch (name) { case "id": id = in.nextString(); break; case "path": path = in.nextString(); break; case "mountName": mountName = in.nextString(); break; case "winDriveLetter": winDriveLetter = in.nextString(); break; case "unlockAfterStartup": unlockAfterStartup = in.nextBoolean(); break; case "revealAfterMount": revealAfterMount = in.nextBoolean(); break; case "usesIndividualMountPath": usesIndividualMountPath = in.nextBoolean(); break; case "individualMountPath": individualMountPath = in.nextString(); break; default: LOG.warn("Unsupported vault setting found in JSON: " + name); in.skipValue(); } } in.endObject(); VaultSettings vaultSettings = (id == null) ? VaultSettings.withRandomId() : new VaultSettings(id); vaultSettings.mountName().set(mountName); vaultSettings.path().set(Paths.get(path)); vaultSettings.winDriveLetter().set(winDriveLetter); vaultSettings.unlockAfterStartup().set(unlockAfterStartup); vaultSettings.revealAfterMount().set(revealAfterMount); vaultSettings.usesIndividualMountPath().set(usesIndividualMountPath); vaultSettings.individualMountPath().set(individualMountPath); return vaultSettings; }