Tells whether or not the given version range is valid. @param versionRange the version range to test. @return true if the version range is valid, false otherwise. @since 2.7.0 @see #matches(String)
(String versionRange)
| 115 | * @see #matches(String) |
| 116 | */ |
| 117 | public static boolean isValidVersionRange(String versionRange) { |
| 118 | try { |
| 119 | ExpressionParser.newInstance().parse(versionRange); |
| 120 | return true; |
| 121 | } catch (com.github.zafarkhaja.semver.ParseException ignore) { |
| 122 | // Ignore. |
| 123 | } |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | @Override |
| 128 | public int hashCode() { |
no test coverage detected