[Swift-commit] r3467 - trunk/src/org/griphyn/vdl/mapping/file
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Fri Jul 23 23:22:18 CDT 2010
Author: hategan
Date: 2010-07-23 23:22:18 -0500 (Fri, 23 Jul 2010)
New Revision: 3467
Modified:
trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java
Log:
user friendly error vs. NPE
Modified: trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2010-07-24 04:16:02 UTC (rev 3466)
+++ trunk/src/org/griphyn/vdl/mapping/file/ArrayFileMapper.java 2010-07-24 04:22:18 UTC (rev 3467)
@@ -21,6 +21,9 @@
public Collection existing() {
List l = new ArrayList();
DSHandle dn = (DSHandle) PARAM_FILES.getRawValue(this);
+ if (dn == null) {
+ throw new RuntimeException("Missing 'files' mapper attribute");
+ }
Map m = dn.getArrayValue();
Set s = m.keySet();
Iterator i = s.iterator();
@@ -32,7 +35,6 @@
}
public PhysicalFormat map(Path path) {
-
if (path.isEmpty()) {
throw new IllegalArgumentException("Path cannot be empty");
}
More information about the Swift-commit
mailing list