JIRA: OVSDB-492
Add the null check to avoid the SouthboundUtils.compareDbVersionToMinVersion()
throwing the NPE.
By any chance if the method is getting triggered with one of the parameter as null,
throws the NPE.
Signed-off-by: Chandra Shekar S <chandra.shekar.s@ericsson.com>
Change-Id: Ibd29fe283fec7376baec56c0fbbb35529e157dbb
}
public static boolean compareDbVersionToMinVersion(final String dbVersion, final String minVersion) {
+ if (dbVersion == null || minVersion == null) {
+ LOG.error("Invalid DB version {} or minVersion {}", dbVersion, minVersion);
+ return false;
+ }
final Matcher dbVersionMatcher = PATTERN.matcher(dbVersion);
final Matcher minVersionMatcher = PATTERN.matcher(minVersion);
LOG.debug("dbVersion {}, minVersion {}", dbVersion, minVersion);