[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -248,7 +248,7 @@ public class MediaRendererService implements UpnpIOParticipant, SamsungTvService
|
||||
|
||||
try {
|
||||
newValue = DataConverters.convertCommandToIntValue(command, 0, 100,
|
||||
Integer.valueOf(stateMap.get("CurrentVolume")));
|
||||
Integer.valueOf(stateMap.getOrDefault("CurrentVolume", "")));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new NumberFormatException("Command '" + command + "' not supported");
|
||||
}
|
||||
@@ -281,7 +281,7 @@ public class MediaRendererService implements UpnpIOParticipant, SamsungTvService
|
||||
|
||||
try {
|
||||
newValue = DataConverters.convertCommandToIntValue(command, 0, 100,
|
||||
Integer.valueOf(stateMap.get("CurrentBrightness")));
|
||||
Integer.valueOf(stateMap.getOrDefault("CurrentBrightness", "")));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new NumberFormatException("Command '" + command + "' not supported");
|
||||
}
|
||||
@@ -297,7 +297,7 @@ public class MediaRendererService implements UpnpIOParticipant, SamsungTvService
|
||||
|
||||
try {
|
||||
newValue = DataConverters.convertCommandToIntValue(command, 0, 100,
|
||||
Integer.valueOf(stateMap.get("CurrentContrast")));
|
||||
Integer.valueOf(stateMap.getOrDefault("CurrentContrast", "")));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new NumberFormatException("Command '" + command + "' not supported");
|
||||
}
|
||||
@@ -313,7 +313,7 @@ public class MediaRendererService implements UpnpIOParticipant, SamsungTvService
|
||||
|
||||
try {
|
||||
newValue = DataConverters.convertCommandToIntValue(command, 0, 100,
|
||||
Integer.valueOf(stateMap.get("CurrentSharpness")));
|
||||
Integer.valueOf(stateMap.getOrDefault("CurrentSharpness", "")));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new NumberFormatException("Command '" + command + "' not supported");
|
||||
}
|
||||
@@ -329,7 +329,7 @@ public class MediaRendererService implements UpnpIOParticipant, SamsungTvService
|
||||
|
||||
try {
|
||||
newValue = DataConverters.convertCommandToIntValue(command, 0, 4,
|
||||
Integer.valueOf(stateMap.get("CurrentColorTemperature")));
|
||||
Integer.valueOf(stateMap.getOrDefault("CurrentColorTemperature", "")));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new NumberFormatException("Command '" + command + "' not supported");
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ServiceFactory {
|
||||
* @param serviceName Name of the service
|
||||
* @return Class of the service
|
||||
*/
|
||||
public static Class<? extends SamsungTvService> getClassByServiceName(String serviceName) {
|
||||
public static @Nullable Class<? extends SamsungTvService> getClassByServiceName(String serviceName) {
|
||||
return SERVICEMAP.get(serviceName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user