Author: loleary
Date: 2009-04-23 16:57:07 -0400 (Thu, 23 Apr 2009)
New Revision: 835
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
Log:
TEIID-531: Fixed clone() to check outpuCols to prevent NPE.
Reviewed by: ghelblin
Modified:
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2009-04-23
18:52:50 UTC (rev 834)
+++
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/RelationalPlan.java 2009-04-23
20:57:07 UTC (rev 835)
@@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -131,7 +132,7 @@
public Object clone(){
RelationalPlan plan = new RelationalPlan((RelationalNode)root.clone());
- plan.setOutputElements(new ArrayList(outputCols));
+ plan.setOutputElements(new ArrayList(( outputCols != null ? outputCols :
Collections.EMPTY_LIST )));
return plan;
}
Show replies by date