if (parentJFC != null && parentJFC.includeBackupFiles)
{
Iterator<String> it = filters.keySet().iterator();
- while (it.hasNext())
+ EXTENSION: while (it.hasNext())
{
String ext = it.next();
+ // quick negative test
+ if (!f.getName().contains(ext))
+ {
+ continue EXTENSION;
+ }
+
BackupFilenameParts bfp = BackupFilenameParts
.currentBackupFilenameParts(f.getName(), ext, true);
if (bfp.isBackupFile())
if (type == null)
{
Iterator<String> it = extensions.keySet().iterator();
- while (it.hasNext())
+ EXTENSION: while (it.hasNext())
{
String ext = it.next();
+
+ // quick negative test
+ if (!f.getName().contains(ext))
+ {
+ continue EXTENSION;
+ }
+
BackupFilenameParts bfp = BackupFilenameParts
.currentBackupFilenameParts(f.getName(), ext, true);
if (bfp.isBackupFile())