ArchiveFilter shows errors it should not

Issue #641 resolved
YvesS created an issue

In the ArchiveFilter, when a file not in the list of file to process is found, we get an error in the log saying that no filter was created because no configuration existed for ''.

The issue is that the getSubFilter() return null correctly, but only after having trying to instantiate a filter.

the code:

    String configId = "";
    for (int i = 0; i < fileNames.length; i++) {
        String fname = fileNames[i];
        if (StringUtil.matchesWildcard(name, fname, true)) {
            configId = configIds[i];
            break;
        }
    }
    // Create sub-filter        
    return getFilterConfigurationMapper().createFilter(configId);

should be something like this:

    String configId = "";
    for (int i = 0; i < fileNames.length; i++) {
        String fname = fileNames[i];
        if (StringUtil.matchesWildcard(name, fname, true)) {
            // Create sub-filter
            return getFilterConfigurationMapper().createFilter(configIds[i]);
        }
    }
    return null; // File not to extract

Comments (3)

  1. Log in to comment