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
2f8bd42b
authored
Jun 19, 2019
by
olly
Committed by
Oliver Woodman
Jun 21, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove Utils.equals() check for object equality that is fragile.
PiperOrigin-RevId: 254046126
parent
ba5e2a4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java
extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java
View file @
2f8bd42b
...
...
@@ -32,7 +32,6 @@ import com.google.android.exoplayer2.util.Clock;
import
com.google.android.exoplayer2.util.ConditionVariable
;
import
com.google.android.exoplayer2.util.Log
;
import
com.google.android.exoplayer2.util.Predicate
;
import
com.google.android.exoplayer2.util.Util
;
import
java.io.IOException
;
import
java.net.SocketTimeoutException
;
import
java.net.UnknownHostException
;
...
...
@@ -750,6 +749,7 @@ public class CronetDataSource extends BaseDataSource implements HttpDataSource {
* @param buffer The ByteBuffer into which the read data is stored. Must be a direct ByteBuffer.
* @throws HttpDataSourceException If an error occurs reading from the source.
*/
@SuppressWarnings
(
"ReferenceEquality"
)
private
void
readInternal
(
ByteBuffer
buffer
)
throws
HttpDataSourceException
{
castNonNull
(
currentUrlRequest
).
read
(
buffer
);
try
{
...
...
@@ -759,7 +759,7 @@ public class CronetDataSource extends BaseDataSource implements HttpDataSource {
}
catch
(
InterruptedException
e
)
{
// The operation is ongoing so replace buffer to avoid it being written to by this
// operation during a subsequent request.
if
(
Util
.
areEqual
(
buffer
,
readBuffer
)
)
{
if
(
buffer
==
readBuffer
)
{
readBuffer
=
null
;
}
Thread
.
currentThread
().
interrupt
();
...
...
@@ -770,7 +770,7 @@ public class CronetDataSource extends BaseDataSource implements HttpDataSource {
}
catch
(
SocketTimeoutException
e
)
{
// The operation is ongoing so replace buffer to avoid it being written to by this
// operation during a subsequent request.
if
(
Util
.
areEqual
(
buffer
,
readBuffer
)
)
{
if
(
buffer
==
readBuffer
)
{
readBuffer
=
null
;
}
throw
new
HttpDataSourceException
(
...
...
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