Skip to content

Commit c41ae4c

Browse files
committed
cleanup, notes in readme
1 parent 2f41f6a commit c41ae4c

File tree

6 files changed

+14
-264
lines changed

6 files changed

+14
-264
lines changed

tda/src/main/java/de/grimmfrost/tda/parser/AbstractDumpParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import javax.swing.tree.TreePath;
3535

3636
/**
37-
* abstract dump parser class, contains all generic dump parser
37+
* Abstract dump parser class, contains all generic dump parser
3838
* stuff, which doesn't have any jdk specific parsing code.
3939
*
4040
* All Dump Parser should extend from this class as it already provides

tda/src/main/java/de/grimmfrost/tda/parser/BeaJDKParser.java

Lines changed: 0 additions & 253 deletions
This file was deleted.

tda/src/main/java/de/grimmfrost/tda/parser/DumpParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public interface DumpParser {
4141

4242
public void close() throws IOException;
4343

44-
public void findLongRunningThreads(DefaultMutableTreeNode root, Map dumpStore, TreePath[] paths, int minOccurence, String regex);
44+
public void findLongRunningThreads(DefaultMutableTreeNode root, Map<String, Map<String, String>> dumpStore, TreePath[] paths, int minOccurrence, String regex);
4545

46-
public void mergeDumps(DefaultMutableTreeNode root, Map dumpStore, TreePath[] dumps, int minOccurence, String regex);
46+
public void mergeDumps(DefaultMutableTreeNode root, Map<String, Map<String, String>> dumpStore, TreePath[] dumps, int minOccurrence, String regex);
4747

4848
public boolean isFoundClassHistograms();
4949

tda/src/main/java/de/grimmfrost/tda/parser/JCmdJSONParser.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.io.BufferedReader;
1212
import java.io.IOException;
1313
import java.io.InputStream;
14+
import java.util.Arrays;
1415
import java.util.Map;
1516
import java.util.logging.Level;
1617
import java.util.logging.Logger;
@@ -27,9 +28,9 @@ public class JCmdJSONParser extends AbstractDumpParser {
2728
private boolean hasMore = true;
2829
private int counter = 1;
2930

30-
private Map threadStore;
31+
private Map<String, Map<String, String>> threadStore;
3132

32-
public JCmdJSONParser(BufferedReader bis, Map threadStore, int lineCounter, DateMatcher dm) {
33+
public JCmdJSONParser(BufferedReader bis, Map<String, Map<String, String>> threadStore, int lineCounter, DateMatcher dm) {
3334
super(bis, dm);
3435
this.threadStore = threadStore;
3536
}
@@ -113,8 +114,8 @@ protected String[] getThreadTokens(String title) {
113114
String[] tokens = new String[7];
114115
// Minimal implementation for now, matching SunJDKParser's structure if possible
115116
// tokens: 0: name, 1: type, 2: prio, 3: tid, 4: nid, 5: state, 6: address
116-
117-
for (int i = 0; i < tokens.length; i++) tokens[i] = "";
117+
118+
Arrays.fill(tokens, "");
118119

119120
if (title.startsWith("\"")) {
120121
int endQuote = title.indexOf("\"", 1);

tda/src/main/java/de/grimmfrost/tda/parser/WrappedSunJDKParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class WrappedSunJDKParser extends SunJDKParser {
3232
* Creates a new instance of WrappedSunJDKParser: A SunJDKParser reading a log
3333
* file created by the Tanuki Service Wrapper.
3434
*/
35-
public WrappedSunJDKParser(BufferedReader bis, Map threadStore, int lineCounter,
35+
public WrappedSunJDKParser(BufferedReader bis, Map<String, Map<String, String>> threadStore, int lineCounter,
3636
boolean withCurrentTimeStamp, int startCounter, DateMatcher dm) {
3737
super(bis, threadStore, lineCounter, withCurrentTimeStamp, startCounter, dm);
3838
}
@@ -46,7 +46,7 @@ public WrappedSunJDKParser(BufferedReader bis, Map threadStore, int lineCounter,
4646
*/
4747
public static boolean checkForSupportedThreadDump(String logLine) {
4848
return logLine.startsWith("INFO | jvm ")
49-
&& logLine.trim().indexOf(" | Full thread dump") >= 0;
49+
&& logLine.trim().contains(" | Full thread dump");
5050
}
5151

5252
protected String getNextLine() throws IOException {

tda/src/main/resources/de/grimmfrost/tda/doc/README

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ TDA - Thread Dump Analyzer -- Version 2.7
66
Note: This is the 2.7 release of the software, for an usage overview see Help/Overview.
77

88
Changes from 2.6 are:
9+
Features:
910
* Introduced logging for easier debugging in MCP mode, added red dot in UI mode if error
1011
occurred with tooltip to check logfile.
11-
* Fixed address range parsing in thread titles for newer JVMs.
12-
* Fixed missing protocolVersion in MCP, which broke the Cursor Integration.
1312
* Experimental support for JSON based jmap thread dumps.
1413
* Support for SMR parsing in thread dumps (Java 11+)
1514
* Detect stuck Carrier Threads used by Virtual Threads in Java 21+ thread dumps.
@@ -19,6 +18,9 @@ Changes from 2.6 are:
1918
* Reworked the thread dump summary to provide information in a more compact way.
2019
* MacOS Binary is now provided.
2120
* Use flatplaf for a modern look and feel.
21+
Bugfixes:
22+
* Fixed address range parsing in thread titles for newer JVMs.
23+
* Fixed missing protocolVersion in MCP, which broke the Cursor Integration.
2224

2325
Changes from 2.5 are:
2426
* TDA now is compiled with JDK 11, it requires Java 11 or higher to run, but still

0 commit comments

Comments
 (0)