Merge "Regenerate ICU data with CLDR patches - RBNF rules and Misc" into main
diff --git a/android_icu4j/Android.bp b/android_icu4j/Android.bp
index cba34ec..fd6edc4 100644
--- a/android_icu4j/Android.bp
+++ b/android_icu4j/Android.bp
@@ -269,6 +269,9 @@
     srcs: [
         ":android_icu4j_repackaged_src_files",
     ],
+    stub_only_libs: [
+        "stub-annotations",
+    ],
     visibility: [
         "//libcore:__subpackages__",
         "//packages/modules/RuntimeI18n/apex",
@@ -280,12 +283,20 @@
     ],
     api_dir: "api/intra",
     api_only: true,
+
+    // Emit nullability annotations from the source to the stub files.
+    annotations_enabled: true,
+
     sdk_version: "none",
     system_modules: "art-module-intra-core-api-stubs-system-modules",
 
     droiddoc_options: [
         "--hide-annotation libcore.api.Hide ",
         "--show-single-annotation libcore.api.IntraCoreApi ",
+        // Exclude FlaggedApi as Metalava cannot resolve the flags reference
+        // because this is not given the flags library on the classpath as
+        // doing so creates a cycle.
+        "--exclude-annotation android.annotation.FlaggedApi",
     ],
 
     public: {
diff --git a/tools/srcgen/currysrc/src/main/java/com/google/currysrc/Main.java b/tools/srcgen/currysrc/src/main/java/com/google/currysrc/Main.java
index cee8e07..8c952b4 100644
--- a/tools/srcgen/currysrc/src/main/java/com/google/currysrc/Main.java
+++ b/tools/srcgen/currysrc/src/main/java/com/google/currysrc/Main.java
@@ -23,6 +23,7 @@
 import com.google.currysrc.api.process.Rule;
 
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
@@ -302,8 +303,10 @@
 
       CompilationUnit cu = (CompilationUnit) parser.createAST(null /* progressMonitor */);
       if (cu.getProblems().length > 0) {
-        System.err.println("Error parsing:" + documentId + ": "
-                + Arrays.toString(cu.getProblems()));
+        for(IProblem problem : cu.getProblems()) {
+            System.err.println("Error parsing:" + documentId + ":" +
+                    problem.getSourceLineNumber() + ": " + problem.toString());
+        }
         throw new RuntimeException("Unable to parse document. Stopping.");
       }
       return cu;