pentaho-labs / pentaho-cpython-plugin

This is a PDI plugin that allows execution of Python code.
Apache License 2.0
32 stars 19 forks source link

Fix null pointer exception in calls to setText #12

Closed JohnLockwood closed 6 years ago

JohnLockwood commented 6 years ago

Konstantin Lofichenko mentioned the issue below on M. Hall's blog, which also occurred in my environment. Will submit a pull request. Fix is simply some defensive null checks ahead of calls to setText.

Thanks a lot for wonderful job. It is amazing opportunity ti incorporate pure Python script inside PDI. I use PDI 7.0 Community Edition on iOS X and Ubuntu. But sometimes I got a error after saving and trying to open CPythonExecutor step. "Enable to open dialog for this step" Argument cannot be null java.lang.IllegalArgumentException: Argument cannot be null at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.widgets.Widget.error(Unknown Source) at org.eclipse.swt.widgets.Text.setText(Unknown Source) at org.pentaho.di.ui.core.widget.TextVar.setText(TextVar.java:210) at org.pentaho.di.ui.trans.steps.cpythonscriptexecutor.CPythonScriptExecutorDialog.getData(CPythonScriptExecutorDialog.java:886) at