Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When upgrading project from 6.4 to 7.2.1, a job started to fail due to arrayoutofbounds error. I isolated this to the tFTPFileList component. When reviewing the generation code and comparing it to the prior version it appears there is a bug in the logic.
Is this the proper venue to report this or is there a SOP for doing so?
6.4.0 code: The loop for pulling the data from the FTP dir method was slightly different.
for (String filemask_tFTPFileList_1 : maskList_tFTPFileList_1) {
java.util.regex.Pattern fileNamePattern_tFTPFileList_1 = java.util.regex.Pattern
.compile(filemask_tFTPFileList_1
.replaceAll("\\.", "\\\\.")
.replaceAll("\\*", ".*"));
for (String filemaskTemp_tFTPFileList_1 : fileList_tFTPFileList_1) {
if (fileNamePattern_tFTPFileList_1
.matcher(
filemaskTemp_tFTPFileList_1)
.matches()) {
fileListTemp_tFTPFileList_1
.add(filemaskTemp_tFTPFileList_1);
}
}
}
7.1.1 code: Issue is that the ftp_tFTPFileList_1.dir(null, true) and ftp_tFTPFileList_1.dir(null, false) bring back different sized arrays, and the looping logic is based off of the larger array.
String[] fileList_tFTPFileList_1 = ftp_tFTPFileList_1.dir(null, true);
String[] fileListwithNames_tFTPFileList_1 = ftp_tFTPFileList_1.dir(null, false);
ftp_tFTPFileList_1.chdir(rootDir_tFTPFileList_1);
List<String> fileListTemp_tFTPFileList_1 = new java.util.ArrayList<String>();
List<String> fileListTempWithNames_tFTPFileList_1 = new java.util.ArrayList<String>();
for (String filemask_tFTPFileList_1 : maskList_tFTPFileList_1) {
java.util.regex.Pattern fileNamePattern_tFTPFileList_1 = java.util.regex.Pattern
.compile(filemask_tFTPFileList_1.replaceAll("\\.", "\\\\.")
.replaceAll("\\*", ".*"));
for (int i_tFTPFileList_1 = 0; i_tFTPFileList_1 < fileList_tFTPFileList_1.length; i_tFTPFileList_1++) {
String filemaskTemp_tFTPFileList_1 = fileList_tFTPFileList_1[i_tFTPFileList_1];
String filemaskTempName_tFTPFileList_1 = fileListwithNames_tFTPFileList_1[i_tFTPFileList_1];
if (fileNamePattern_tFTPFileList_1.matcher(filemaskTempName_tFTPFileList_1)
.matches()) {
fileListTemp_tFTPFileList_1.add(filemaskTemp_tFTPFileList_1);
fileListTempWithNames_tFTPFileList_1
.add(fileListwithNames_tFTPFileList_1[i_tFTPFileList_1]);
}
}
}
This issue will be fixed in 7.3.1 Release. Please wait for the new version.