MCPcopy Create free account
hub / github.com/zaproxy/zaproxy / isValidVersionRange

Method isValidVersionRange

zap/src/main/java/org/zaproxy/zap/Version.java:117–125  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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() {

Callers 1

AddOnDepMethod · 0.95

Calls 2

parseMethod · 0.65
newInstanceMethod · 0.45

Tested by

no test coverage detected