[Swift-commit] r6637 - trunk/src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Wed Jul 10 20:36:09 CDT 2013
Author: hategan
Date: 2013-07-10 20:36:08 -0500 (Wed, 10 Jul 2013)
New Revision: 6637
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java
Log:
fixed potential NPE
Modified: trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2013-07-11 01:35:43 UTC (rev 6636)
+++ trunk/src/org/griphyn/vdl/karajan/lib/TCProfile.java 2013-07-11 01:36:08 UTC (rev 6637)
@@ -178,13 +178,15 @@
private void addEnvironment(Stack stack, BoundContact bc) {
Map<String,Object> props = bc.getProperties();
- for (Map.Entry<String,Object> e : props.entrySet()) {
- String name = e.getKey();
- FQN fqn = new FQN(name);
- String value = (String) e.getValue();
- if (Profile.ENV.equalsIgnoreCase(fqn.getNamespace())) {
- cr_environment.append(stack, new Entry(fqn.getName(), value));
- }
+ if (props != null) {
+ for (Map.Entry<String,Object> e : props.entrySet()) {
+ String name = e.getKey();
+ FQN fqn = new FQN(name);
+ String value = (String) e.getValue();
+ if (Profile.ENV.equalsIgnoreCase(fqn.getNamespace())) {
+ cr_environment.append(stack, new Entry(fqn.getName(), value));
+ }
+ }
}
}
More information about the Swift-commit
mailing list