Skip to content

Commit d24e4e1

Browse files
Tweaks again
- Spacing in Javadoc - Precise caught exception - Implicit UTF8
1 parent 86edc29 commit d24e4e1

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/main/java/fr/bl/drit/flow/agent/AgentMain.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@
4040
* <li>ids (optional) -> path to existing method ID mapping file
4141
* </ul>
4242
*
43-
* <pre>
44-
* <code class="language-properties">
43+
* <pre><code class="language-properties">
4544
* Minimal example: target=com.myapp.,out=/tmp/flow/
46-
* </code>
47-
* </pre>
45+
* </code></pre>
4846
*
4947
* Use the {@code optimize} argument to optimize method IDs by leveraging an existing mapping of
5048
* method IDs and flow files. Method IDs are natural numbers. Those that are called more frequently
@@ -54,12 +52,10 @@
5452
* using the {@code ids} argument. Refer to the {@link MethodIdRemapper} class comment for more
5553
* details about the optimization process.
5654
*
57-
* <pre>
58-
* <code class="language-properties">
55+
* <pre><code class="language-properties">
5956
* Example with optimization: target=com.myapp.,optimize=/tmp/flow/,out=/tmp/optimized-flow/
6057
* Then reuse optimized mapping: target=com.myapp.,ids=/tmp/optimized-flow/ids.properties,out=/tmp/optimized-flow-2/
61-
* </code>
62-
* </pre>
58+
* </code></pre>
6359
*/
6460
public class AgentMain {
6561

@@ -182,7 +178,7 @@ private static void init(String agentArgs, Instrumentation inst) {
182178
}
183179

184180
System.out.println("[flow-agent] Flow written to " + outputDir);
185-
} catch (Exception e) {
181+
} catch (IOException e) {
186182
System.err.println("[flow-agent] Failed to write flow: " + e);
187183
e.printStackTrace();
188184
}

src/main/java/fr/bl/drit/flow/agent/JsonlThreadRecorder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.io.IOException;
55
import java.io.OutputStreamWriter;
66
import java.io.Writer;
7-
import java.nio.charset.StandardCharsets;
87
import java.nio.file.Files;
98
import java.nio.file.Path;
109
import java.nio.file.StandardOpenOption;
@@ -39,8 +38,7 @@ public JsonlThreadRecorder(Path outputDir) throws IOException {
3938
outputDir.resolve(this.fileName),
4039
StandardOpenOption.CREATE,
4140
StandardOpenOption.WRITE,
42-
StandardOpenOption.TRUNCATE_EXISTING),
43-
StandardCharsets.UTF_8),
41+
StandardOpenOption.TRUNCATE_EXISTING)),
4442
64 * 1024);
4543
}
4644

0 commit comments

Comments
 (0)