Issue #3181 Add check for valid array index.
Change-Id: I8e0a37bdd094b341da2ce42922a16d840d1ab468 (cherry picked from commit466bfed41e
[formerlyfb4ac9acc7
] [formerlya1f25b8748
] [formerlyadf6d95c01
[formerlya1f25b8748
[formerly ca01934f9e9d355dd4159fd472e2aa9bc0918898]]]) Former-commit-id:54bdfef65a
[formerly359b835955
[formerly 743bfc070e5e0c82ed445afec08e294220c31018]] Former-commit-id: eb9788f9e364adb7986c16e1e6840ed28163260e [formerly359b835955
] Former-commit-id:332dd7a557
This commit is contained in:
parent
fe58e839d9
commit
ee1116f5bb
1 changed files with 9 additions and 0 deletions
|
@ -97,6 +97,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
||||||
* Mar 21, 2014 2835 rjpeter Optimized getDisplayData to only scan directories to the depth required to
|
* Mar 21, 2014 2835 rjpeter Optimized getDisplayData to only scan directories to the depth required to
|
||||||
* populate the display label.
|
* populate the display label.
|
||||||
* Apr 29, 2014 3036 rferrel Check for missing archive root directories.
|
* Apr 29, 2014 3036 rferrel Check for missing archive root directories.
|
||||||
|
* May 22, 2014 3181 rferrel Add check for valid array index.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rferrel
|
* @author rferrel
|
||||||
|
@ -658,6 +659,14 @@ public class ArchiveConfigManager {
|
||||||
tmpDirs.clear();
|
tmpDirs.clear();
|
||||||
int subExprIndex = 0;
|
int subExprIndex = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Will never match when pattern's directories shorter then
|
||||||
|
* directories being scanned.
|
||||||
|
*/
|
||||||
|
if ((tokens.length - rootFileDepth) > subExpr.length) {
|
||||||
|
continue DIR_PATTERN_LOOP;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = rootFileDepth; i < tokens.length; i++) {
|
for (int i = rootFileDepth; i < tokens.length; i++) {
|
||||||
Pattern subPattern = Pattern.compile("^"
|
Pattern subPattern = Pattern.compile("^"
|
||||||
+ subExpr[subExprIndex++] + "$");
|
+ subExpr[subExprIndex++] + "$");
|
||||||
|
|
Loading…
Add table
Reference in a new issue