Skip to content

Commit

Permalink
Log resource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Eichar committed Jan 26, 2015
1 parent 5f37559 commit 602ee46
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -4,6 +4,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import org.fao.geonet.Constants;
import org.fao.geonet.utils.Log;

import java.io.IOException;
import java.io.PrintWriter;
Expand Down Expand Up @@ -49,7 +50,9 @@ public static synchronized void printExceptions(int numExceptionsToPrint) throws
printExceptions(out, numExceptionsToPrint);
}

System.out.println("Write first " + numExceptionsToPrint + " of " + openResources.size() + " open file stacktraces to: " + log);
final String message = "Resource Leak detected: First " + numExceptionsToPrint + " of " + openResources.size() + " open file stacktraces to: " + log;
System.out.println(message);
Log.error(Log.JEEVES, message);
}

public static synchronized void printExceptions(PrintWriter out, int numExceptionsToPrint) throws IOException {
Expand Down

0 comments on commit 602ee46

Please sign in to comment.