Compare commits

...

2 Commits

Author SHA1 Message Date
roman.voievidko
ca9971cb18 patch(TPS-3447): add release notes 2019-10-10 11:41:42 +03:00
Roman
d197689219 fix(TDI-42969): change logic to retrieve detailed filename (#3964)
* fix(TDI-42969): change logic to retrieve detailed filename

* fix(TDI-42969): improve filenames processing with set
2019-10-10 11:35:05 +03:00
2 changed files with 81 additions and 10 deletions

66
PATCH_RELEASE_NOTE.md Normal file
View File

@@ -0,0 +1,66 @@
---
version: 7.2.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-3447
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20191010_TPS-3447\_v1-7.2.1 |
| Release Date | 2019-10-10 |
| Target Version | 20190620\_1446-V7.2.1 |
| Product affected | Talend Studio |
## Introduction
This is a self-contained patch.
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
## Fixed issues
This patch contains the following fixes:
- TPS-3447 [7.2.1] tftpfilelist throws array index out of bounds exception (TDI-42969)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 7.2.1 must be installed.
## Installation
### Installing the patch using Software update
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
### Installing the patch using Talend Studio
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
### Installing the patch using Commandline
Execute the following commands:
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}
## Uninstallation
Backup the Affected files list below. Uninstall the patch by restore the backup files.
## Affected files for this patch
The following files are installed by this patch:
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_7.2.1.20190614\_0309/components/tFTPFileList/tFTPFileList\_begin.javajet

View File

@@ -433,8 +433,8 @@ if (sftp) {// *** sftp *** //
<%}%>
String remotedir_<%=cid %> = (<%=remotedir%>).replaceAll("\\\\","/");
ftp_<%=cid %>.chdir(remotedir_<%=cid %>);
String[] fileList_<%=cid %> = ftp_<%=cid %>.dir(null, true);
String[] fileListwithNames_<%=cid %> = ftp_<%=cid %>.dir(null, false);
com.enterprisedt.net.ftp.FTPFile[] fileList_<%=cid %> = ftp_<%=cid %>.dirDetails(null);
String[] arrayWithNames_<%=cid %> = ftp_<%=cid %>.dir(null, false);
<%
if (("true").equals(useExistingConn)) {
if(!moveToCurrentDir){
@@ -445,17 +445,22 @@ if (sftp) {// *** sftp *** //
}
%>
List<String> fileListTemp_<%=cid %> = new java.util.ArrayList<String>();
List<String> fileListTempWithNames_<%=cid %> = new java.util.ArrayList<String>();
List<String> fileListTempWithNames_<%=cid %> = new java.util.ArrayList<String>();
for (String filemask_<%=cid %> : maskList_<%=cid %>) {
java.util.regex.Pattern fileNamePattern_<%=cid %> = java.util.regex.Pattern.compile(filemask_<%=cid %>.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*"));
for (int i_<%=cid%> = 0; i_<%=cid%> < fileList_<%=cid%>.length; i_<%=cid%>++){
String filemaskTemp_<%=cid%> = fileList_<%=cid%>[i_<%=cid%>];
String filemaskTempName_<%=cid%> = fileListwithNames_<%=cid%>[i_<%=cid%>];
if (fileNamePattern_<%=cid %>.matcher(filemaskTempName_<%=cid %>).matches()) {
fileListTemp_<%=cid %>.add(filemaskTemp_<%=cid %>);
fileListTempWithNames_<%=cid%>.add(fileListwithNames_<%=cid%>[i_<%=cid%>]);
java.util.Set<String> setWithNames_<%=cid %> = new java.util.HashSet<>(java.util.Arrays.asList(arrayWithNames_<%=cid %>));
for (com.enterprisedt.net.ftp.FTPFile ftpFile : fileList_<%=cid %>){
String filemaskTemp_<%=cid%> = "";
String filemaskTempName_<%=cid%> = "";
if (setWithNames_<%=cid %>.contains(ftpFile.getName())){
filemaskTemp_<%=cid%> = ftpFile.getRaw();
filemaskTempName_<%=cid%> = ftpFile.getName();
if (fileNamePattern_<%=cid %>.matcher(filemaskTempName_<%=cid %>).matches()) {
fileListTemp_<%=cid %>.add(filemaskTemp_<%=cid %>);
fileListTempWithNames_<%=cid%>.add(filemaskTempName_<%=cid%>);
}
}
}
}