[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -135,9 +135,9 @@ class OpenHabToDeviceConverter {
|
||||
final String manufacturer = StringUtils.isEmpty(properties.get("Manufacturer")) ? "openHAB"
|
||||
: properties.get("Manufacturer");
|
||||
|
||||
final Integer standbyDelay = parseInteger(properties.get("Standby Command Delay"));
|
||||
final Integer switchDelay = parseInteger(properties.get("Source Switch Delay"));
|
||||
final Integer shutDownDelay = parseInteger(properties.get("Shutdown Delay"));
|
||||
final Integer standbyDelay = parseInteger(properties.getOrDefault("Standby Command Delay", "0"));
|
||||
final Integer switchDelay = parseInteger(properties.getOrDefault("Source Switch Delay", "0"));
|
||||
final Integer shutDownDelay = parseInteger(properties.getOrDefault("Shutdown Delay", "0"));
|
||||
|
||||
final NeeoDeviceTiming timing = new NeeoDeviceTiming(standbyDelay, switchDelay, shutDownDelay);
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@ public class HttpRequest implements AutoCloseable {
|
||||
content.close();
|
||||
}
|
||||
} catch (IOException | IllegalStateException | ProcessingException e) {
|
||||
return new HttpResponse(HttpStatus.SERVICE_UNAVAILABLE_503, e.getMessage());
|
||||
String message = e.getMessage();
|
||||
return new HttpResponse(HttpStatus.SERVICE_UNAVAILABLE_503, message != null ? message : "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +101,8 @@ public class HttpRequest implements AutoCloseable {
|
||||
content.close();
|
||||
}
|
||||
} catch (IOException | IllegalStateException | ProcessingException e) {
|
||||
return new HttpResponse(HttpStatus.SERVICE_UNAVAILABLE_503, e.getMessage());
|
||||
String message = e.getMessage();
|
||||
return new HttpResponse(HttpStatus.SERVICE_UNAVAILABLE_503, message != null ? message : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public class HttpResponse {
|
||||
return "";
|
||||
}
|
||||
|
||||
return new String(contents, StandardCharsets.UTF_8);
|
||||
return new String(localContents, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user