Package org.apache.camel.util
Class PackageHelper
java.lang.Object
org.apache.camel.util.PackageHelper
Some helper methods for working with Java packages and versioning.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidVersion
(String packageName, double minimumVersion) Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version.
-
Method Details
-
isValidVersion
Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version. For package names which include multiple dots, dots after the leftmost are removed. So for example a spring version of 2.5.1 is converted to 2.51 so you can assert that it's >= 2.51 (so above 2.50 and less than 2.52 etc).- Parameters:
packageName
- the Java package name to compareminimumVersion
- the minimum version number- Returns:
- true if the package name can be determined and if it's greater than or equal to the minimum value
-