Fix su stbGestSetup nulle
This commit is contained in:
parent
5e52d83c40
commit
df48ea3b32
@ -413,16 +413,19 @@ public class SettingsManager {
|
|||||||
|
|
||||||
StbGestSetup value = Stream.of(stbGestSetupList)
|
StbGestSetup value = Stream.of(stbGestSetupList)
|
||||||
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
||||||
.findFirstOrElse(new StbGestSetup());
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
if (clazz == String.class) {
|
if(value != null) {
|
||||||
return clazz.cast(value.getValue());
|
if (clazz == String.class) {
|
||||||
} else if (clazz == Boolean.class) {
|
return clazz.cast(value.getValue());
|
||||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
} else if (clazz == Boolean.class) {
|
||||||
} else if (clazz == Integer.class && value.getValue() != null) {
|
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
} else if (clazz == Integer.class && value.getValue() != null) {
|
||||||
} else return defaultValue;
|
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user