Skip to content

Commit fb9d0a1

Browse files
Minor fixes found by IntelliJ IDEA. (#9862)
1 parent 5f3aeab commit fb9d0a1

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

dd-java-agent/agent-iast/src/main/java/com/datadog/iast/propagation/StringModuleImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public void onStringConcatFactory(
205205
int offset = 0;
206206
for (int item : recipeOffsets) {
207207
if (item < 0) {
208-
offset += -item;
208+
offset -= item;
209209
} else {
210210
final String argument = args[item];
211211
final Range[] ranges = getRanges(getTainted(taintedObjects, argument));

dd-java-agent/benchmark-integration/jetty-perftest/src/main/java/datadog/perftest/jetty/JettyPerftest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected void doGet(final HttpServletRequest request, final HttpServletResponse
4848
throw new RuntimeException("some sync error");
4949
}
5050
final String workVal = request.getParameter("workTimeMS");
51-
long workTimeMS = 0l;
51+
long workTimeMS = 0L;
5252
if (null != workVal) {
5353
workTimeMS = Long.parseLong(workVal);
5454
}

dd-java-agent/cws-tls/src/main/java/datadog/cws/tls/ErpcTls.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void registerTls() {
120120

121121
pointer.setLong(0, TLS_FORMAT);
122122
pointer.setLong(Native.LONG_SIZE, maxThreads);
123-
pointer.setPointer(Native.LONG_SIZE * 2, tls);
123+
pointer.setPointer(Native.LONG_SIZE * 2L, tls);
124124

125125
sendRequest(request);
126126
}

dd-java-agent/load-generator/src/main/java/datadog/loadgenerator/LoadGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public Integer call() throws Exception {
6868
}
6969

7070
while (true) {
71-
Thread.sleep(printInterval * 1000);
71+
Thread.sleep(printInterval * 1000L);
7272

7373
final long currentTracesSent = tracesSent.get();
7474
final long intervalEnd = System.currentTimeMillis();

dd-smoke-tests/jersey-3/src/main/java/smoketest/MainApp.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public static void main(String[] args) {
7171
}
7272
}));
7373

74-
System.out.println(String.format("Application started.%nStop the application using CTRL+C"));
74+
System.out.println("Application started.");
75+
System.out.println("Stop the application using CTRL+C");
7576

7677
// block and wait shut down signal, like CTRL+C
7778
Thread.currentThread().join();

internal-api/src/main/java/datadog/trace/api/Config.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
23822382
remoteConfigMaxPayloadSize =
23832383
configProvider.getInteger(
23842384
REMOTE_CONFIG_MAX_PAYLOAD_SIZE, DEFAULT_REMOTE_CONFIG_MAX_PAYLOAD_SIZE)
2385-
* 1024;
2385+
* 1024L;
23862386
remoteConfigTargetsKeyId =
23872387
configProvider.getString(
23882388
REMOTE_CONFIG_TARGETS_KEY_ID, DEFAULT_REMOTE_CONFIG_TARGETS_KEY_ID);
@@ -2442,7 +2442,7 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
24422442
configProvider.getInteger(
24432443
DYNAMIC_INSTRUMENTATION_MAX_PAYLOAD_SIZE,
24442444
DEFAULT_DYNAMIC_INSTRUMENTATION_MAX_PAYLOAD_SIZE)
2445-
* 1024;
2445+
* 1024L;
24462446
dynamicInstrumentationVerifyByteCode =
24472447
configProvider.getBoolean(
24482448
DYNAMIC_INSTRUMENTATION_VERIFY_BYTECODE,

0 commit comments

Comments
 (0)