Skip to content

Commit 8d810d3

Browse files
authored
Merge pull request #2040 from idodeclare/feature/log_nonaccept
Log some additional places where !accept()ed
2 parents daaeefa + 900a720 commit 8d810d3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/org/opensolaris/opengrok/index/IndexDatabase.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,14 +757,15 @@ private static void cleanupResources(Document doc) {
757757
*/
758758
private boolean accept(File file) {
759759

760+
String absolutePath = file.getAbsolutePath();
761+
760762
if (!includedNames.isEmpty()
761763
&& // the filter should not affect directory names
762764
(!(file.isDirectory() || includedNames.match(file)))) {
765+
LOGGER.log(Level.FINER, "not including {0}", absolutePath);
763766
return false;
764767
}
765768

766-
String absolutePath = file.getAbsolutePath();
767-
768769
if (ignoredNames.ignore(file)) {
769770
LOGGER.log(Level.FINER, "ignoring {0}", absolutePath);
770771
return false;
@@ -807,7 +808,13 @@ private boolean accept(File file) {
807808
}
808809

809810
// this is an unversioned file, check if it should be indexed
810-
return !RuntimeEnvironment.getInstance().isIndexVersionedFilesOnly();
811+
RuntimeEnvironment env = RuntimeEnvironment.getInstance();
812+
boolean res = !env.isIndexVersionedFilesOnly();
813+
if (!res) {
814+
LOGGER.log(Level.FINER, "not accepting unversioned {0}",
815+
absolutePath);
816+
}
817+
return res;
811818
}
812819

813820
private boolean accept(File parent, File file) {

0 commit comments

Comments
 (0)