[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Mon Apr 26 16:29:13 UTC 2010
gordonp
Mon Apr 26 12:29:13 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv25739/src/main/ca/ucalgary/seahawk/gui
Modified Files:
MobyContentPane.java MobyPayloadCreator.java
Log Message:
Account for possibility of null peer elements list
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.30,1.31 MobyPayloadCreator.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java 2010/04/23 05:20:00 1.30
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java 2010/04/26 16:29:13 1.31
@@ -1237,7 +1237,7 @@
// note that getPeerElements() will modify the userData to reflect the semantic of the requested peer mode
mobyData.setUserData(origUserData);
NodeList peerElements = DataUtils.getPeerElements(getCurrentDoc(), mobyData, getFilteredData(), peerMode);
- if(peerElements.getLength() <= 1){
+ if(peerElements == null || peerElements.getLength() <= 1){
continue; // no 'for each' option if only one to process...
}
String each = "each <i>(" + peerElements.getLength() + " total)</i>";
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyPayloadCreator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyPayloadCreator.java 2010/04/18 00:33:56 1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyPayloadCreator.java 2010/04/26 16:29:13 1.5
@@ -85,8 +85,12 @@
NodeList peerElements = DataUtils.getPeerElements(doc, mobyDataContext,
xptrsToFilter, DataUtils.DATATYPE_PEERS_MODE);
- // find the peers of defined by the userData selection constraints and put them into a MobyContentInstance
MobyContentInstance payload = new MobyContentInstance();
+ if(peerElements == null){
+ return payload;
+ }
+
+ // find the peers of defined by the userData selection constraints and put them into a MobyContentInstance
Map<String,Integer> jobPrefixes = new LinkedHashMap<String,Integer>();
logger.log(Level.FINE, "Loading MobyContentInstance with "+peerElements.getLength()+" elements for xpath "+selectionXPath);
More information about the MOBY-guts
mailing list