Skip to content

Commit

Permalink
TEIIDDES-2464 tweaked VDB server validation version check to show
Browse files Browse the repository at this point in the history
warning if default minor version is > max supported minor version.
  • Loading branch information
blafond committed Apr 7, 2015
1 parent 0aa486b commit 577ed32
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,21 @@ private static void validateVdbVersion(final IFile theVdbFile, Collection<IStatu
statuses.add( new Status(IStatus.WARNING, VdbConstants.PLUGIN_ID,
VdbPlugin.UTIL.getString("vdbValidationWarning_differentValidationVersions", validationVersion, defaultTeiidVersion)) ); //$NON-NLS-1$

if (validationVersion.isGreaterThan(maxDesignerVersion))
/* Vdb version is greater than the tested Designer Teiid Version which means all bets are off! */
statuses.add( new Status(IStatus.ERROR, VdbConstants.PLUGIN_ID,
if (validationVersion.isGreaterThan(maxDesignerVersion) && !sameMinorVersion(validationVersion, maxDesignerVersion) )
/* Vdb version is greater than the fully-suppported Designer Teiid Version which means all bets are off! */
statuses.add( new Status(IStatus.WARNING, VdbConstants.PLUGIN_ID,
VdbPlugin.UTIL.getString("vdbValidationError_validationVersionUnsupported")) ); //$NON-NLS-1$
}

/**
* Checks to see if 2 server versions have the same major and minor versions
* @param version_1
* @param version_2
* @return
*/
public static boolean sameMinorVersion(ITeiidServerVersion version_1, ITeiidServerVersion version_2) {
return version_1.getMajor().equals(version_2.getMajor()) && version_1.getMinor().equals(version_2.getMinor());
}

/**
* Simple check to see if the model file is in the vdb
Expand Down

0 comments on commit 577ed32

Please sign in to comment.