What happened?
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/lineChart/LineChartOpDesc.scala declares var lines: util.List[LineConfig] = _, which defaults to null. createPlotlyFigure then calls lines.asScala.map(...) without a null check, so generatePythonCode on a freshly constructed LineChartOpDesc raises java.lang.NullPointerException at LineChartOpDesc.scala:68 — quite different from the explicit AssertionError paths used by sibling visualizers (e.g. HeatMapOpDesc, BarChartOpDesc).
The fix is either to default lines to an empty list, or to null-guard / assert nonEmpty before the .asScala.map(...) call.
How to reproduce?
import org.apache.texera.amber.operator.visualization.lineChart.LineChartOpDesc
new LineChartOpDesc().generatePythonCode()
// java.lang.NullPointerException
// at LineChartOpDesc.createPlotlyFigure(LineChartOpDesc.scala:68)
// at LineChartOpDesc.generatePythonCode(LineChartOpDesc.scala:122)
Version
1.1.0-incubating (Pre-release/Master)
What happened?
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/lineChart/LineChartOpDesc.scaladeclaresvar lines: util.List[LineConfig] = _, which defaults tonull.createPlotlyFigurethen callslines.asScala.map(...)without a null check, sogeneratePythonCodeon a freshly constructedLineChartOpDescraisesjava.lang.NullPointerExceptionatLineChartOpDesc.scala:68— quite different from the explicitAssertionErrorpaths used by sibling visualizers (e.g.HeatMapOpDesc,BarChartOpDesc).The fix is either to default
linesto an empty list, or to null-guard / assert nonEmpty before the.asScala.map(...)call.How to reproduce?
Version
1.1.0-incubating (Pre-release/Master)