Fixes for some minor checkstyle complaints
MODIFY
dd-java-agent/instrumentation/datastax-cassandra-3.2/src/main/java/datadog/trace/instrumentation/datastax/cassandra/CassandraClientInstrumentation.java
dd-java-agent/instrumentation/datastax-cassandra-3.2/src/main/java/datadog/trace/instrumentation/datastax/cassandra/CassandraClientInstrumentation.java
@@ -58,8 +58,7 @@ public class CassandraClientInstrumentation extends Instrumenter.Default {
* com.datastax.driver.core.Cluster$Manager.newSession() method is called. The opentracing
* contribution is a simple wrapper, so we just have to wrap the new session.
*
- * @param session The fresh session to patch
- * @return A new tracing session
+ * @param session The fresh session to patch. This session is replaced with new session
* @throws Exception
*/
@Advice.OnMethodExit(suppress = Throwable.class)

MODIFY
dd-java-agent/src/main/java/datadog/trace/agent/TracingAgent.java
dd-java-agent/src/main/java/datadog/trace/agent/TracingAgent.java
@@ -155,12 +155,19 @@ public class TracingAgent {
private static ClassLoader getPlatformClassLoader()
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
- // must invoke ClassLoader.getPlatformClassLoader by reflection to remain compatible with java 7
- // + 8.
+ /*
+ Must invoke ClassLoader.getPlatformClassLoader by reflection to remain
+ compatible with java 7 + 8.
+ */
final Method method = ClassLoader.class.getDeclaredMethod("getPlatformClassLoader");
return (ClassLoader) method.invoke(null);
}
+ /**
+ * Main entry point.
+ *
+ * @param args command line agruments
+ */
public static void main(final String... args) {
try {
System.out.println(getAgentVersion());
@@ -184,7 +191,9 @@ public class TracingAgent {
new InputStreamReader(
TracingAgent.class.getResourceAsStream("/dd-java-agent.version"), "UTF-8");
output = new BufferedReader(input);
- for (int c = output.read(); c != -1; c = output.read()) sb.append((char) c);
+ for (int c = output.read(); c != -1; c = output.read()) {
+ sb.append((char) c);
+ }
} finally {
if (null != input) {
input.close();

Fixes for some minor checkstyle complaints