Skip to content

Commit e2713ea

Browse files
committed
Solve Bugs
1 parent b4b9ad0 commit e2713ea

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ configure(allprojects - project(':ui:linuxLauncher')) {
155155

156156

157157
dependencies {
158+
compile group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1'
158159
testCompile group: 'net.jodah', name: 'concurrentunit', version: '0.4.2'
159160
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
160161
testCompile group: 'junit', name: 'junit', version: '4.12'

core/src/main/java/edu/wpi/grip/core/operations/composite/PublishVideoOperation.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
import com.google.common.collect.ImmutableList;
1111

12+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
13+
1214
import org.bytedeco.javacpp.BytePointer;
1315
import org.bytedeco.javacpp.IntPointer;
1416

@@ -133,6 +135,7 @@ public class PublishVideoOperation implements Operation {
133135
};
134136

135137
@SuppressWarnings("JavadocMethod")
138+
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
136139
public PublishVideoOperation(InputSocket.Factory inputSocketFactory) {
137140
if (numSteps != 0) {
138141
throw new IllegalStateException("Only one instance of PublishVideoOperation may exist");

core/src/main/java/edu/wpi/grip/core/operations/network/http/DataHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import com.google.inject.Inject;
1313
import com.google.inject.Singleton;
1414

15+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
16+
1517
import org.eclipse.jetty.server.Request;
1618

1719
import java.io.IOException;
@@ -69,6 +71,7 @@ public final class DataHandler extends PedanticHandler {
6971
}
7072

7173
@Override
74+
@SuppressFBWarnings("UW_UNCOND_WAIT")
7275
protected void handleIfPassed(String target,
7376
Request baseRequest,
7477
HttpServletRequest request,

core/src/main/java/edu/wpi/grip/core/util/SafeShutdown.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package edu.wpi.grip.core.util;
22

3+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4+
35
import javax.annotation.Nullable;
46

57
/**
@@ -16,8 +18,10 @@ public final class SafeShutdown {
1618
* flagging a shutdown
1719
* that we can't control.
1820
*/
21+
1922
Runtime.getRuntime().addShutdownHook(new Thread() {
2023
@Override
24+
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
2125
public void run() {
2226
SafeShutdown.stopping = true;
2327
}

findBugsSuppressions.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
<Match>
66
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
77
</Match>
8+
<Match>
9+
<Bug pattern="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION" />
10+
</Match>
811
</FindBugsFilter>

0 commit comments

Comments
 (0)