[Swift-commit] r5414 - branches/release-0.93/src/org/griphyn/vdl/mapping
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Wed Dec 14 13:34:34 CST 2011
Author: hategan
Date: 2011-12-14 13:34:34 -0600 (Wed, 14 Dec 2011)
New Revision: 5414
Modified:
branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
Log:
backported code from trunk to allow returning a null mapper for non-mapped data instead of throwing a NPE
Modified: branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
===================================================================
--- branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-12-14 19:22:58 UTC (rev 5413)
+++ branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2011-12-14 19:34:34 UTC (rev 5414)
@@ -30,7 +30,7 @@
this.params = params;
if (this.params == null) {
initialized();
- }
+ }
else {
innerInit();
}
@@ -99,8 +99,12 @@
if (initialized) {
return mapper;
}
- assert(waitingMapperParam != null);
- throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
+ if (waitingMapperParam == null) {
+ return null;
+ }
+ else {
+ throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
+ }
}
public Mapper getActualMapper() {
Modified: branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
===================================================================
--- branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-12-14 19:22:58 UTC (rev 5413)
+++ branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java 2011-12-14 19:34:34 UTC (rev 5414)
@@ -209,8 +209,12 @@
if (initialized) {
return mapper;
}
- assert (waitingMapperParam != null);
- throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
+ if (waitingMapperParam == null) {
+ return null;
+ }
+ else {
+ throw new FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
+ }
}
public Mapper getActualMapper() {
More information about the Swift-commit
mailing list