Filter out OpenJDK warning message am: a9432ee7bd am: a78b3f4225 am: 6edd2fed3d am: 440d1e8089

Original change: https://android-review.googlesource.com/c/platform/external/guice/+/2162361

Change-Id: I97c33c840db0f9844a610dd8e51d8dc1ac388a1d
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/Android.bp b/Android.bp
index 9d2fb68..8a6bb03 100644
--- a/Android.bp
+++ b/Android.bp
@@ -98,6 +98,10 @@
     libs: ["junit"],
 }
 
+// Filter out warnings produced by OpenJDK to stdout, otherwise these warnings
+// make it into generated Java files (b/240131965).
+// TODO: Remove the filter is OpenJDK stops writing the warning to stdout (see
+// https://bugs.openjdk.org/browse/JDK-8270087).
 genrule {
     name: "guice_munged_srcs",
     srcs: [":guice_srcs"],
@@ -108,7 +112,8 @@
     ],
     cmd: "for src in $(in); do " +
         "  mkdir -p $$(dirname $(genDir)/$${src}) && " +
-        "  $(location guice_munge) -DNO_AOP $${src} > $(genDir)/$${src} || exit 1; " +
+        "  $(location guice_munge) -DNO_AOP $${src} | " +
+        "   sed '/Duplicate cpuset controllers detected/d' > $(genDir)/$${src} || exit 1; " +
         " done && " +
         " $(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
 }