Skip to content

Commit 2c0d3d7

Browse files
authored
Merge branch 'dconeybe/dataconnect/CiPostMessageImprovements' into dconeybe/dataconnect/CiNotifyPython
2 parents ee19c58 + 4cef939 commit 2c0d3d7

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.github/workflows/dataconnect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
issue_from_pr_body=$(gh issue view "$pr_number" --json body --jq '.body' -R ${{ github.repository }} | sed -En 's#(\s|^)trksmnkncd_notification_issue=([0-9]+)(\s|$)#\2#p')
356356
fi
357357
358-
if [[ -v $issue_from_pr_body ]] && [[ -n $issue_from_pr_body ]] ; then
358+
if [[ -v issue_from_pr_body ]] && [[ -n $issue_from_pr_body ]] ; then
359359
issue="$issue_from_pr_body"
360360
elif [[ '${{ github.event_name }}' == 'schedule' ]] ; then
361361
# See https://github.com/firebase/firebase-android-sdk/issues/6857

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/common/SessionReportingCoordinator.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.google.firebase.crashlytics.internal.send.DataTransportCrashlyticsReportSender;
3737
import com.google.firebase.crashlytics.internal.settings.SettingsProvider;
3838
import com.google.firebase.crashlytics.internal.stacktrace.StackTraceTrimmingStrategy;
39+
import java.io.BufferedInputStream;
3940
import java.io.ByteArrayOutputStream;
4041
import java.io.File;
4142
import java.io.IOException;
@@ -427,13 +428,15 @@ private static CrashlyticsReport.ApplicationExitInfo convertApplicationExitInfo(
427428
@VisibleForTesting
428429
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
429430
public static String convertInputStreamToString(InputStream inputStream) throws IOException {
430-
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
431-
byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];
432-
int length;
433-
while ((length = inputStream.read(bytes)) != -1) {
434-
byteArrayOutputStream.write(bytes, 0, length);
431+
try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
432+
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
433+
byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];
434+
int length;
435+
while ((length = bufferedInputStream.read(bytes)) != -1) {
436+
byteArrayOutputStream.write(bytes, 0, length);
437+
}
438+
return byteArrayOutputStream.toString(StandardCharsets.UTF_8.name());
435439
}
436-
return byteArrayOutputStream.toString(StandardCharsets.UTF_8.name());
437440
}
438441

439442
/** Finds the first ANR ApplicationExitInfo within the session. */

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ firebaseAppdistributionGradle = "5.1.1"
2727
firebaseCommon = "21.0.0"
2828
firebaseComponents = "18.0.0"
2929
firebaseCrashlyticsGradle = "3.0.2"
30-
glide = "4.11.0"
30+
glide = "4.16.0"
3131
googleApiClient = "1.30.9"
3232
googleServices = "4.3.15"
3333
gradleErrorpronePlugin = "3.1.0"

smoke-tests/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ android {
5454
}
5555

5656
compileOptions {
57+
coreLibraryDesugaringEnabled true
5758
sourceCompatibility 1.8
5859
targetCompatibility 1.8
5960
}
@@ -97,6 +98,9 @@ dependencies {
9798
// Common utilities (instrumentation side)
9899
androidTestImplementation "androidx.test:runner:1.4.0"
99100
androidTestImplementation libs.junit
101+
102+
// Desugaring library
103+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
100104
}
101105

102106
clean.doLast {

0 commit comments

Comments
 (0)