This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/master by this push:
new 733b950 [KARAF-5796] Use .hprof extension for heap dump
new 0612d75 [KARAF-5796] This closes #537
733b950 is described below
commit 733b950f6ba86542bfbdbdbda8f03633661e0f05
Author: Matt Pavlovich <[email protected]>
AuthorDate: Thu Jun 28 16:56:12 2018 -0500
[KARAF-5796] Use .hprof extension for heap dump
---
.../org/apache/karaf/diagnostic/core/providers/HeapDumpProvider.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/HeapDumpProvider.java
b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/HeapDumpProvider.java
index cff6bfa..1675c53 100644
---
a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/HeapDumpProvider.java
+++
b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/HeapDumpProvider.java
@@ -41,7 +41,7 @@ public class HeapDumpProvider implements DumpProvider {
Object diagnosticMXBean =
ManagementFactory.newPlatformMXBeanProxy(mBeanServer,
"com.sun.management:type=HotSpotDiagnostic",
diagnosticMXBeanClass);
- heapDumpFile = File.createTempFile("heapdump", ".txt");
+ heapDumpFile = File.createTempFile("heapdump", ".hprof");
heapDumpFile.delete();
Method method = diagnosticMXBeanClass.getMethod("dumpHeap",
String.class, boolean.class);
@@ -49,7 +49,7 @@ public class HeapDumpProvider implements DumpProvider {
// copy the dump in the destination
in = new FileInputStream(heapDumpFile);
- out = destination.add("heapdump.txt");
+ out = destination.add("heapdump.hprof");
byte[] buffer = new byte[2048];
int l;
while (((l = in.read(buffer)) != -1)) {