You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2023/04/18 07:18:34 UTC
[hop] branch master updated: check nulll values before opening dialog. fixes #2825
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 333d9dfdfb check nulll values before opening dialog. fixes #2825
new 27380181c0 Merge pull request #2826 from bamaer/2825
333d9dfdfb is described below
commit 333d9dfdfb1d9b920f2382089fa6df50ccb0a521
Author: Bart Maertens <ba...@know.bi>
AuthorDate: Mon Apr 17 14:01:25 2023 +0200
check nulll values before opening dialog. fixes #2825
---
.../propertyinput/PropertyInputDialog.java | 34 +++++++++++++++++-----
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/plugins/transforms/propertyinput/src/main/java/org/apache/hop/pipeline/transforms/propertyinput/PropertyInputDialog.java b/plugins/transforms/propertyinput/src/main/java/org/apache/hop/pipeline/transforms/propertyinput/PropertyInputDialog.java
index 37f5dcdaac..64ec21121e 100644
--- a/plugins/transforms/propertyinput/src/main/java/org/apache/hop/pipeline/transforms/propertyinput/PropertyInputDialog.java
+++ b/plugins/transforms/propertyinput/src/main/java/org/apache/hop/pipeline/transforms/propertyinput/PropertyInputDialog.java
@@ -20,6 +20,8 @@ package org.apache.hop.pipeline.transforms.propertyinput;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Iterator;
+
+import org.apache.commons.lang.StringUtils;
import org.apache.hop.core.Const;
import org.apache.hop.core.Props;
import org.apache.hop.core.ResultFile;
@@ -1323,14 +1325,30 @@ public class PropertyInputDialog extends BaseTransformDialog implements ITransfo
wFields.removeEmptyRows();
wFields.setRowNums();
wFields.optWidth(true);
- wShortFileFieldName.setText(in.getShortFileFieldName());
- wPathFieldName.setText(in.getPathFieldName());
- wIsHiddenName.setText(in.getHiddenFieldName());
- wLastModificationTimeName.setText(in.getLastModificationTimeFieldName());
- wUriName.setText(in.getUriNameFieldName());
- wRootUriName.setText(in.getRootUriNameFieldName());
- wExtensionFieldName.setText(in.getExtensionFieldName());
- wSizeFieldName.setText(in.getSizeFieldName());
+ if(!StringUtils.isEmpty(in.getShortFileFieldName())){
+ wShortFileFieldName.setText(in.getShortFileFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getPathFieldName())){
+ wPathFieldName.setText(in.getPathFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getHiddenFieldName())){
+ wIsHiddenName.setText(in.getHiddenFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getLastModificationTimeFieldName())){
+ wLastModificationTimeName.setText(in.getLastModificationTimeFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getUriNameFieldName())){
+ wUriName.setText(in.getUriNameFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getRootUriNameFieldName())){
+ wRootUriName.setText(in.getRootUriNameFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getExtensionFieldName())){
+ wExtensionFieldName.setText(in.getExtensionFieldName());
+ }
+ if(!StringUtils.isEmpty(in.getSizeFieldName())){
+ wSizeFieldName.setText(in.getSizeFieldName());
+ }
setIncludeFilename();
setIncludeRowNum();