Skip to content
Permalink
Browse files
Add extra check on SingleServerApplianceToImage function in case the…
… osFamily is null
  • Loading branch information
alibazlamit authored and nacx committed May 30, 2017
1 parent b3da4b3 commit 3b8f5c607dfe8a31fc2945e4fc85a55867a76117
Showing 1 changed file with 6 additions and 0 deletions.
@@ -71,6 +71,9 @@ static boolean is64Bit(int architecture) {
}

private static Optional<OsFamily> findInStandardFamilies(final String osFamily) {
if (osFamily == null) {
return Optional.absent();
}
return tryFind(asList(OsFamily.values()), new Predicate<OsFamily>() {
@Override
public boolean apply(OsFamily input) {
@@ -80,6 +83,9 @@ public boolean apply(OsFamily input) {
}

private static Optional<OsFamily> findInOtherOSMap(final String label) {
if (label == null) {
return Optional.absent();
}
return tryFind(OTHER_OS_MAP.keySet(), new Predicate<String>() {
@Override
public boolean apply(String input) {

0 comments on commit 3b8f5c6

Please sign in to comment.