Handle older enum raw value
This commit is contained in:
@@ -181,8 +181,14 @@ public class SettingsLoader {
|
|||||||
config.setPassword(password);
|
config.setPassword(password);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((config.getComputeMethod() == null && computeMethod != null) || (computeMethod != null && config.getComputeMethod() != ComputeType.valueOf(computeMethod))) {
|
try {
|
||||||
config.setComputeMethod(ComputeType.valueOf(computeMethod));
|
if ((config.getComputeMethod() == null && computeMethod != null) || (computeMethod != null && config.getComputeMethod() != ComputeType.valueOf(computeMethod))) {
|
||||||
|
config.setComputeMethod(ComputeType.valueOf(computeMethod));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException e) {
|
||||||
|
System.err.println("SettingsLoader::merge failed to handle compute method (raw value: '" + computeMethod + "')");
|
||||||
|
computeMethod = null;
|
||||||
}
|
}
|
||||||
if (config.getGPUDevice() == null && gpu != null) {
|
if (config.getGPUDevice() == null && gpu != null) {
|
||||||
GPUDevice device = GPU.getGPUDevice(gpu);
|
GPUDevice device = GPU.getGPUDevice(gpu);
|
||||||
|
|||||||
Reference in New Issue
Block a user