Harden Java runtime compiler caching, I/O safety, and documentation/agent guidance #166
Quality Gate passed
Annotations
Check warning on line 339 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Use "java.nio.file.Files#delete" here for better messages on error conditions.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYuD&open=AZqoFy16r_FBMQ7znYuD&pullRequest=166
Check failure on line 27 in src/test/java/mytest/RuntimeCompileTest.java
sonarqubecloud / SonarCloud Code Analysis
Rename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy0Sr_FBMQ7znYt5&open=AZqoFy0Sr_FBMQ7znYt5&pullRequest=166
Check warning on line 215 in src/test/java/net/openhft/compiler/CompilerUtilsIoTest.java
sonarqubecloud / SonarCloud Code Analysis
Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyzWr_FBMQ7znYtx&open=AZqoFyzWr_FBMQ7znYtx&pullRequest=166
Check warning on line 279 in src/test/java/net/openhft/compiler/CompilerTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyw2r_FBMQ7znYtt&open=AZqoFyw2r_FBMQ7znYtt&pullRequest=166
Check failure on line 150 in src/test/java/net/openhft/compiler/CompilerUtilsIoTest.java
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyzWr_FBMQ7znYtu&open=AZqoFyzWr_FBMQ7znYtu&pullRequest=166
Check warning on line 49 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYt_&open=AZqoFy16r_FBMQ7znYt_&pullRequest=166
Check warning on line 176 in src/test/java/net/openhft/compiler/CachedCompilerAdditionalTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyz2r_FBMQ7znYt3&open=AZqoFyz2r_FBMQ7znYt3&pullRequest=166
Check failure on line 29 in src/test/java/eg/FooBarTee.java
sonarqubecloud / SonarCloud Code Analysis
Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy01r_FBMQ7znYt7&open=AZqoFy01r_FBMQ7znYt7&pullRequest=166
Check warning on line 339 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Merge this if statement with the enclosing one.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy15r_FBMQ7znYt8&open=AZqoFy15r_FBMQ7znYt8&pullRequest=166
Check warning on line 162 in src/test/java/net/openhft/compiler/CachedCompilerAdditionalTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyz2r_FBMQ7znYt2&open=AZqoFyz2r_FBMQ7znYt2&pullRequest=166
Check failure on line 324 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Change this "try" to a try-with-resources.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYuE&open=AZqoFy16r_FBMQ7znYuE&pullRequest=166
Check warning on line 49 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Rename this field "s_compiler" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYt9&open=AZqoFy16r_FBMQ7znYt9&pullRequest=166
Check warning on line 329 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Use "java.nio.file.Files#delete" here for better messages on error conditions.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYuC&open=AZqoFy16r_FBMQ7znYuC&pullRequest=166
Check warning on line 48 in src/main/java/net/openhft/compiler/CachedCompiler.java
sonarqubecloud / SonarCloud Code Analysis
Refactor this repetition that can lead to a stack overflow for large inputs.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy3Ur_FBMQ7znYuH&open=AZqoFy3Ur_FBMQ7znYuH&pullRequest=166
Check warning on line 65 in src/test/java/net/openhft/compiler/CachedCompilerAdditionalTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyz2r_FBMQ7znYtz&open=AZqoFyz2r_FBMQ7znYtz&pullRequest=166
Check warning on line 60 in src/main/java/net/openhft/compiler/CachedCompiler.java
sonarqubecloud / SonarCloud Code Analysis
Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy3Ur_FBMQ7znYuG&open=AZqoFy3Ur_FBMQ7znYuG&pullRequest=166
Check warning on line 37 in src/test/java/mytest/RuntimeCompileTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy0Sr_FBMQ7znYt6&open=AZqoFy0Sr_FBMQ7znYt6&pullRequest=166
Check warning on line 337 in src/main/java/net/openhft/compiler/CachedCompiler.java
sonarqubecloud / SonarCloud Code Analysis
Replace this use of System.err by a logger.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy3Ur_FBMQ7znYuI&open=AZqoFy3Ur_FBMQ7znYuI&pullRequest=166
Check warning on line 79 in src/test/java/net/openhft/compiler/CachedCompilerAdditionalTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyz2r_FBMQ7znYt0&open=AZqoFyz2r_FBMQ7znYt0&pullRequest=166
Check failure on line 307 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYuB&open=AZqoFy16r_FBMQ7znYuB&pullRequest=166
Check warning on line 50 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYuA&open=AZqoFy16r_FBMQ7znYuA&pullRequest=166
Check warning on line 50 in src/main/java/net/openhft/compiler/CompilerUtils.java
sonarqubecloud / SonarCloud Code Analysis
Rename this field "s_standardJavaFileManager" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFy16r_FBMQ7znYt-&open=AZqoFy16r_FBMQ7znYt-&pullRequest=166
Check warning on line 195 in src/test/java/net/openhft/compiler/CompilerUtilsIoTest.java
sonarqubecloud / SonarCloud Code Analysis
Remove this call to a deprecated class, it has been marked for removal.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyzWr_FBMQ7znYtw&open=AZqoFyzWr_FBMQ7znYtw&pullRequest=166
Check failure on line 108 in src/test/java/net/openhft/compiler/CompilerTest.java
sonarqubecloud / SonarCloud Code Analysis
Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyw2r_FBMQ7znYts&open=AZqoFyw2r_FBMQ7znYts&pullRequest=166
Check failure on line 159 in src/test/java/net/openhft/compiler/CompilerUtilsIoTest.java
sonarqubecloud / SonarCloud Code Analysis
Add at least one assertion to this test case.
See more on https://sonarcloud.io/project/issues?id=OpenHFT_Java-Runtime-Compiler&issues=AZqoFyzWr_FBMQ7znYtv&open=AZqoFyzWr_FBMQ7znYtv&pullRequest=166