8000 Not necessary · DataDog/dd-trace-java@638b0b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 638b0b5

Browse files
committed
Not necessary
1 parent 78d28d6 commit 638b0b5

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

dd-java-agent/appsec/src/main/java/com/datadog/appsec/gateway/AppSecRequestContext.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public class AppSecRequestContext implements DataBundle, Closeable {
129129
private volatile int raspInternalErrors;
130130
private volatile int raspInvalidObjectErrors;
131131
private volatile int raspInvalidArgumentErrors;
132-
private volatile int raspRuleSkipped;
133132
private volatile int wafInternalErrors;
134133
private volatile int wafInvalidObjectErrors;
135134
private volatile int wafInvalidArgumentErrors;
@@ -160,8 +159,6 @@ public class AppSecRequestContext implements DataBundle, Closeable {
160159
RASP_INVALID_ARGUMENT_ERRORS_UPDATER =
161160
AtomicIntegerFieldUpdater.newUpdater(
162161
AppSecRequestContext.class, "raspInvalidArgumentErrors");
163-
private static final AtomicIntegerFieldUpdater<AppSecRequestContext> RASP_RULE_SKIPPED_UPDATER =
164-
AtomicIntegerFieldUpdater.newUpdater(AppSecRequestContext.class, "raspRuleSkipped");
165162

166163
private static final AtomicIntegerFieldUpdater<AppSecRequestContext> WAF_INTERNAL_ERRORS_UPDATER =
167164
AtomicIntegerFieldUpdater.newUpdater(AppSecRequestContext.class, "wafInternalErrors");
@@ -223,10 +220,6 @@ public void increaseRaspTimeouts() {
223220
RASP_TIMEOUTS_UPDATER.incrementAndGet(this);
224221
}
225222

226-
public void increaseRuleSkipped() {
227-
RASP_RULE_SKIPPED_UPDATER.incrementAndGet(this);
228-
}
229-
230223
public void increaseRaspErrorCode(int code) {
231224
switch (code) {
232225
case DD_WAF_RUN_INTERNAL_ERROR:
@@ -267,10 +260,6 @@ public int getRaspTimeouts() {
267260
return raspTimeouts;
268261
}
269262

270-
public int getRaspRuleSkipped() {
271-
return raspRuleSkipped;
272-
}
273-
274263
public int getRaspError(int code) {
275264
switch (code) {
276265
case DD_WAF_RUN_INTERNAL_ERROR:

dd-java-agent/appsec/src/test/groovy/com/datadog/appsec/gateway/AppSecRequestContextSpecification.groovy

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import io.sqreen.powerwaf.Additive
1515
import io.sqreen.powerwaf.Powerwaf
1616
import io.sqreen.powerwaf.PowerwafContext
1717

18-
class AppSecRequestContextSpecification extends DDSpecification {
18+
class AppSecRequestContextSpecification extends DDSpecification {
1919

2020
AppSecRequestContext ctx = new AppSecRequestContext()
2121

@@ -319,15 +319,6 @@ class AppSecRequestContextSpecification extends DDSpecification {
319319
ctx.getWafError(0) == 0
320320
}
321321

322-
def "test increase and get raspRuleSkipped"() {
323-
when:
324-
ctx.increaseRuleSkipped()
325-
ctx.increaseRuleSkipped()
326-
327-
then:
328-
ctx.getRaspRuleSkipped() == 2
329-
}
330-
331322
void 'close logs if request end was not called'() {
332323
given:
333324
TestLogCollector.enable()

0 commit comments

Comments
 (0)
0