Skip to content

Commit 3c86e83

Browse files
committed
System Touch
1 parent 8c86740 commit 3c86e83

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

source/national/NationalDriver.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class NationalDriver
1717
public static synchronized void record(String reference)
1818
{
1919
if (reference == null) return;
20+
2021
STARTUP_REFERENCES.add(reference);
2122
}
2223

@@ -25,20 +26,24 @@ protected static String extractClassName(String reference)
2526
if (reference == null) return "";
2627

2728
int idx = reference.indexOf("[Current:");
29+
2830
if (idx < 0) return "";
2931

3032
int start = idx + "[Current:".length();
33+
3134
int end = reference.indexOf(']', start);
35+
3236
if (end < 0) end = Math.min(reference.length(), start + 200);
3337

3438
String inner = reference.substring(start, end).trim();
35-
// inner begins with the class simple name (we padded it earlier). Remove any extra spaces.
36-
// If inner contains spaces, first token is the class name.
39+
3740
int firstSpace = inner.indexOf(' ');
41+
3842
if (firstSpace > 0)
3943
{
4044
return inner.substring(0, firstSpace).trim();
4145
}
46+
4247
return inner;
4348
}
4449

0 commit comments

Comments
 (0)