Author: paperwing
Date: 2012-05-18 17:21:59 -0700 (Fri, 18 May 2012)
New Revision: 29300
Modified:
csplugins/trunk/toronto/yuedong/app_manager/impl/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppParser.java
Log:
Updated regexp for recognizing app version and compatible Cytoscape versions
from the app jar's manifest file to be more lenient
Modified:
csplugins/trunk/toronto/yuedong/app_manager/impl/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppParser.java
===================================================================
---
csplugins/trunk/toronto/yuedong/app_manager/impl/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppParser.java
2012-05-18 23:57:24 UTC (rev 29299)
+++
csplugins/trunk/toronto/yuedong/app_manager/impl/app-impl/src/main/java/org/cytoscape/app/internal/manager/AppParser.java
2012-05-19 00:21:59 UTC (rev 29300)
@@ -38,15 +38,17 @@
private static final String APP_COMPATIBLE_TAG =
"Cytoscape-App-Works-With";
/**
- * A regular expression representing valid app versions, which are in
the format major.minor.patch[-tag]
+ * A regular expression representing valid app versions, which are in
the format major.minor[.patch][-tag],
+ * eg. 3.0.0-SNAPSHOT, or 3.0.
*/
- private static final String APP_VERSION_TAG_REGEX =
"(0|([1-9]+\\d*))(\\.\\d+)+(-.*)?";
+ private static final String APP_VERSION_TAG_REGEX =
"(0|([1-9]+\\d*))\\.(\\d)+(\\.(\\d)+)?(-.*)?";
/**
* A regular expression representing valid values for the entry
containing the major versions of Cytoscape
- * that the app is known to work with in, in comma-delimited form.
+ * that the app is known to work with in, in comma-delimited form.
Examples that work are "3.0, 3.1" or "2, 3.0".
+ * Examples that do not match are "1.0b" and "v1, v2", as these contain
non-digit characters.
*/
- private static final String APP_COMPATIBLE_TAG_REGEX =
"(\\d+(\\.\\d+)+\\s*)(,\\s*\\d+(\\.\\d+)+\\s*)*";
+ private static final String APP_COMPATIBLE_TAG_REGEX =
"(\\d+(\\.\\d+)?\\s*)(,\\s*\\d+(\\.\\d+)?\\s*)*";
/**
* Attempt to parse a given {@link File} object as an {@link App}
object.
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.