Add some @Nullable annotations
Making it easier to tell where API contracts allow nulls, where it's otherwise unclear without reading the implementation.
This commit is contained in:
@@ -184,6 +184,12 @@
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.web.bind.ServletRequestUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -314,6 +315,7 @@ public class StreamController {
|
||||
return duration * (long)maxBitRate * 1000L / 8L;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private HttpRange getRange(HttpServletRequest request, MediaFile file) {
|
||||
|
||||
// First, look for "Range" HTTP header.
|
||||
@@ -332,6 +334,7 @@ public class StreamController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private HttpRange parseAndConvertOffsetSeconds(String offsetSeconds, MediaFile file) {
|
||||
if (offsetSeconds == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user