summaryrefslogtreecommitdiffstats
path: root/idrop-lite
diff options
context:
space:
mode:
authorLISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-03-26 19:36:42 (GMT)
committer LISA STILLWELL <lisa@dhcp152-54-6-218.wireless.europa.renci.org>2012-03-26 19:36:42 (GMT)
commita9cd4ba917e65aa0403795741de4a86ffee5e9d4 (patch)
tree944d400168cf88a1f65d3559a6cf8d6ab5507251 /idrop-lite
parent54a9f66a2e478f6f6458ccdc9a1badd0e8105559 (diff)
downloadQCG-Data-a9cd4ba917e65aa0403795741de4a86ffee5e9d4.zip
QCG-Data-a9cd4ba917e65aa0403795741de4a86ffee5e9d4.tar.gz
QCG-Data-a9cd4ba917e65aa0403795741de4a86ffee5e9d4.tar.bz2
[#678] add code to start without items in cart or key defined - give error message
Diffstat (limited to 'idrop-lite')
-rw-r--r--idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
index 77be9a8..5d39e18 100644
--- a/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
+++ b/idrop-lite/src/main/java/org/irods/jargon/idrop/lite/iDropLiteApplet.java
@@ -1273,7 +1273,14 @@ public class iDropLiteApplet extends javax.swing.JApplet implements TransferStat
iDropCore.getIrodsFileSystem().getIRODSAccessObjectFactory(), iDropCore.getIrodsAccount(),
dataCacheServiceFactory);
log.info("getting cart as logged in user, key: {}", this.key);
- cart = shoppingCartService.retreiveShoppingCartAsLoggedInUser(this.key);
+ if ((this.mode == 2) && (this.key != null) && (this.key != "undefined")) {
+ cart = shoppingCartService.retreiveShoppingCartAsLoggedInUser(this.key);
+ }
+ else {
+ log.error("could not create shopping cart");
+ showMessageFromOperation("Cannot retrieve files from shopping cart");
+ return cartContents;
+ }
// for testing
//cart = FileShoppingCart.instance();