Skip to content

Commit f3709ba

Browse files
authored
Fixing Bad File descriptor IOException to avoid app crashes. (firebase#1521)
* Dropping guava and appcompat dependency from FIS SDK. * Fixing Bad File descriptor IOException to avoid app crashes. * Adding link as Rayo suggested
1 parent 33ae17f commit f3709ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

firebase-installations/src/main/java/com/google/firebase/installations/CrossProcessLock.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ static CrossProcessLock acquire(Context appContext, String lockName) {
5151
// This method blocks until it can retrieve the lock.
5252
lock = channel.lock();
5353
return new CrossProcessLock(channel, lock);
54-
} catch (IOException e) {
54+
} catch (IOException | Error e) {
5555
// Certain conditions can cause file locking to fail, such as out of disk or bad permissions.
5656
// In any case, the acquire will fail and return null instead of a held lock.
57+
// NOTE: In Java 7 & 8, FileKey creation failure might wrap IOException into Error. See
58+
// https://bugs.openjdk.java.net/browse/JDK-8025619 for details.
5759
Log.e(TAG, "encountered error while creating and acquiring the lock, ignoring", e);
5860

5961
// Clean up any dangling resources

0 commit comments

Comments
 (0)