leehaut opened a new pull request, #6065: URL: https://github.com/apache/hop/pull/6065
Fix https://github.com/apache/hop/issues/6060 -- show filenames button throws an error in Get Data From XML **Fix**: - Corrected the initialization order of the five `PdOption` instances, which previously could remain uninitialized and lead to NPEs during option access. ```java public GetXmlDataDialog( Shell parent, IVariables variables, GetXmlDataMeta transformMeta, PipelineMeta pipelineMeta) { super(parent, variables, transformMeta, pipelineMeta); input = transformMeta; // Initialize options and set default values. This prevents a potential NPE in get() methods. // if getLoopPathList() is not triggered and these 5 options remain uninitialized. // Call option.resetOption() before using any option instance. this.readFilePdOption = new PdOption(); this.readUrlPdOption = new PdOption(); this.readXmlPdOption = new PdOption(); this.readHopVfsPdOption = new PdOption(); this.readSnippetPdOption = new PdOption(); } ``` - Added missing initializations for two lists in the `GetXmlDataMeta` constructor, preventing NPEs when the metadata is accessed before these lists are created. ```java public GetXmlDataMeta() { // allocate BaseTransformMeta super(); // init files, inputFields list if (this.filesList == null) { this.filesList = new ArrayList<>(); } if (this.inputFields == null) { this.inputFields = new ArrayList<>(); } } ``` -- 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]
