Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a55219fb
authored
Feb 17, 2022
by
olly
Committed by
Ian Baker
Feb 18, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix a potential NPE in test_utils WebServerDispatcher
PiperOrigin-RevId: 429338648
parent
a2337adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
testutils/src/main/java/com/google/android/exoplayer2/testutil/WebServerDispatcher.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/WebServerDispatcher.java
View file @
a55219fb
...
@@ -28,6 +28,7 @@ import androidx.annotation.IntDef;
...
@@ -28,6 +28,7 @@ import androidx.annotation.IntDef;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
@@ -239,7 +240,7 @@ public class WebServerDispatcher extends Dispatcher {
...
@@ -239,7 +240,7 @@ public class WebServerDispatcher extends Dispatcher {
/** Returns the path for a given {@link RecordedRequest}, stripping any query parameters. */
/** Returns the path for a given {@link RecordedRequest}, stripping any query parameters. */
public
static
String
getRequestPath
(
RecordedRequest
request
)
{
public
static
String
getRequestPath
(
RecordedRequest
request
)
{
return
Util
.
splitAtFirst
(
request
.
getPath
(
),
"\\?"
)[
0
];
return
Util
.
splitAtFirst
(
Strings
.
nullToEmpty
(
request
.
getPath
()
),
"\\?"
)[
0
];
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment