Skip to content

Commit

Permalink
Fix of intermittent hang when building Aar files. This is an untested…
Browse files Browse the repository at this point in the history
… fix because the hang cannot be reproduced on demand, but not calling System.exit() has caused the same problem previously in both AndroidResourceProcessingAction and AarGeneratorAction. Mimics the exception handling behavior in AndroidResourceProcessingAction, which is not known to cause any hangs.

--
MOS_MIGRATED_REVID=96911485
  • Loading branch information
apelle03 authored and hanwen committed Jun 26, 2015
1 parent 11475c2 commit a1c7944
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.hash.Hashing;
import com.google.devtools.build.android.Converters.DependencyAndroidDataListConverter;
Expand All @@ -43,6 +42,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
Expand Down Expand Up @@ -162,7 +162,8 @@ public static void main(String[] args) {
String.format("Packaging finished at %dms", timer.elapsed(TimeUnit.MILLISECONDS)));

} catch (IOException | MergingException e) {
throw Throwables.propagate(e);
logger.log(Level.SEVERE, "Error during merging resources", e);
System.exit(1);
}
System.exit(0);
}
Expand Down

0 comments on commit a1c7944

Please sign in to comment.