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
f5789b74
authored
Nov 29, 2021
by
samrobinson
Committed by
tonihei
Dec 02, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make use of try with-resources to auto close file.
PiperOrigin-RevId: 412901581
parent
83408d06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
library/transformer/src/androidTest/java/com/google/android/exoplayer2/transformer/mh/AndroidTestUtil.java
library/transformer/src/androidTest/java/com/google/android/exoplayer2/transformer/mh/AndroidTestUtil.java
View file @
f5789b74
...
@@ -117,22 +117,19 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -117,22 +117,19 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
throws
IOException
{
throws
IOException
{
File
analysisFile
=
File
analysisFile
=
createExternalCacheFile
(
context
,
/* fileName= */
result
.
testId
+
"-result.txt"
);
createExternalCacheFile
(
context
,
/* fileName= */
result
.
testId
+
"-result.txt"
);
FileWriter
fileWriter
=
new
FileWriter
(
analysisFile
);
try
(
FileWriter
fileWriter
=
new
FileWriter
(
analysisFile
))
{
String
fileContents
=
String
fileContents
=
"test="
"test="
+
result
.
testId
+
result
.
testId
+
", deviceBrand="
+
", deviceBrand="
+
Build
.
MANUFACTURER
+
Build
.
MANUFACTURER
+
", deviceModel="
+
", deviceModel="
+
Build
.
MODEL
+
Build
.
MODEL
+
", sdkVersion="
+
", sdkVersion="
+
Build
.
VERSION
.
SDK_INT
+
Build
.
VERSION
.
SDK_INT
+
", outputSizeBytes="
+
", outputSizeBytes="
+
result
.
outputSizeBytes
;
+
result
.
outputSizeBytes
;
try
{
fileWriter
.
write
(
fileContents
);
fileWriter
.
write
(
fileContents
);
}
finally
{
fileWriter
.
close
();
}
}
}
}
...
...
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