Yicong-Huang opened a new issue, #4811: URL: https://github.com/apache/texera/issues/4811
### 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? ```scala 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) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
