[MOBY-guts] biomoby commit
senger@ebi.ac.uk
senger at pub.open-bio.org
Thu Apr 1 16:41:03 UTC 2004
senger
Thu Apr 1 11:41:03 EST 2004
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv6373/src/Clients
Modified Files:
MobyGraphs.java
Log Message:
moby-live/Java/src/Clients MobyGraphs.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java 2003/11/25 13:18:10 1.3
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java 2004/04/01 16:41:03 1.4
@@ -179,13 +179,18 @@
}
edges = FilterServices.filter (edges, authorities, serviceNames, depth);
- String[] pathEnds = cmd.getParam ("-path", 2);
- if (pathEnds.length == 2)
+ if (cmd.hasParam ("-path")) {
+ String[] pathEnds = cmd.getParam ("-path", 2);
+ if (pathEnds[0] == null || pathEnds[1] == null) {
+ System.err.println ("Missing value for parameter '-path'. It should be followed by two service names.");
+ System.exit (1);
+ }
edges = FilterServices.pathes (edges, pathEnds[0], pathEnds[1]);
- if (edges == null) {
- System.err.println ("No connection found between '" +
- pathEnds[0] + "' and '" + pathEnds[1] + "'");
- System.exit(1);
+ if (edges == null) {
+ System.err.println ("No connection found between '" +
+ pathEnds[0] + "' and '" + pathEnds[1] + "'");
+ System.exit(1);
+ }
}
// create a graph (in whatever format)
More information about the MOBY-guts
mailing list