findbugs: String.split() will not return nulls by contract

(cherry picked from commit 7b105917584da7cc0ad4cd9a3e6391c6ae433c78)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Daan Hoogland 2015-04-29 16:07:38 +02:00 committed by Rohit Yadav
parent 031d7a9c43
commit 6e87337d52

View File

@ -868,7 +868,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
if (cpuFeatures != null) {
_cpuFeatures = new ArrayList<String>();
for (String feature: cpuFeatures.split(" ")) {
if (feature != null || !feature.isEmpty()) {
if (!feature.isEmpty()) {
_cpuFeatures.add(feature);
}
}