|
8 | 8 |
|
9 | 9 | public class RunnerContext extends AbstractContext
|
10 | 10 | {
|
11 |
| - private Map missingProperties; |
| 11 | + private Map<String, Object> missingProperties = new HashMap<>(); |
12 | 12 | private Object prematureResult;
|
13 | 13 | private String eventContext;
|
14 |
| - private Map<String, Object> crossHandlerData; |
| 14 | + private Map<String, Object> crossHandlerData = new HashMap<>(); |
15 | 15 |
|
16 | 16 | public String getAppId()
|
17 | 17 | {
|
@@ -75,14 +75,17 @@ public void setUserRole( List<String> userRole )
|
75 | 75 | this.userRoles = userRole;
|
76 | 76 | }
|
77 | 77 |
|
78 |
| - public Map getMissingProperties() |
| 78 | + public Map<String, Object> getMissingProperties() |
79 | 79 | {
|
80 | 80 | return missingProperties;
|
81 | 81 | }
|
82 | 82 |
|
83 |
| - public void setMissingProperties( Map missingProperties ) |
| 83 | + public void setMissingProperties( Map<String, Object> missingProperties ) |
84 | 84 | {
|
85 |
| - this.missingProperties = missingProperties; |
| 85 | + if( missingProperties == null ) |
| 86 | + this.missingProperties = new HashMap<>(); |
| 87 | + else |
| 88 | + this.missingProperties = missingProperties; |
86 | 89 | }
|
87 | 90 |
|
88 | 91 | public Object getPrematureResult()
|
@@ -122,14 +125,14 @@ public Map<String, Object> getCrossHandlerData()
|
122 | 125 |
|
123 | 126 | public void setCrossHandlerData( Map<String, Object> crossHandlerData )
|
124 | 127 | {
|
125 |
| - this.crossHandlerData = crossHandlerData; |
| 128 | + if( crossHandlerData == null ) |
| 129 | + this.crossHandlerData = new HashMap<>(); |
| 130 | + else |
| 131 | + this.crossHandlerData = crossHandlerData; |
126 | 132 | }
|
127 | 133 |
|
128 | 134 | public void addCrossHandlerData( String key, Object value )
|
129 | 135 | {
|
130 |
| - if( this.crossHandlerData == null ) |
131 |
| - this.crossHandlerData = new HashMap<>(); |
132 |
| - |
133 | 136 | this.crossHandlerData.put( key, value );
|
134 | 137 | }
|
135 | 138 |
|
|
0 commit comments