From 3e8fceb5c513edc9b356590d505e98ad55eda6e5 Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 8 Nov 2022 13:03:51 -0600 Subject: [PATCH 1/3] Fix code blocks --- .../firebase/database/DataSnapshot.java | 19 ++++++++++--------- .../database/GenericTypeIndicator.java | 4 ++-- .../google/firebase/database/MutableData.java | 19 ++++++++++--------- .../modeldownloader/FirebaseMlException.java | 6 +++--- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java b/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java index 11db5a93b2f..e29a148b251 100644 --- a/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java +++ b/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java @@ -166,7 +166,7 @@ public Object getValue(boolean useExportFormat) { * * An example class might look like: * - *

+   * 
    *     class Message {
    *         private String author;
    *         private String text;
@@ -190,7 +190,7 @@ public Object getValue(boolean useExportFormat) {
    *
    *     // Later
    *     Message m = snapshot.getValue(Message.class);
-   * 
+ *
* * @param valueType The class into which this snapshot should be marshalled * @param The type to return. Implicitly defined from the class passed in @@ -208,10 +208,10 @@ public T getValue(@NonNull Class valueType) { * properly-typed Collection. So, in the case where you want a {@link java.util.List} of Message * instances, you will need to do something like the following: * - *

+   * 
    *     GenericTypeIndicator<List<Message>> t = new GenericTypeIndicator<List<Message>>() {};
    *     List<Message> messages = snapshot.getValue(t);
-   * 
+ *
* * It is important to use a subclass of {@link GenericTypeIndicator}. See {@link * GenericTypeIndicator} for more details @@ -255,11 +255,12 @@ public String getKey() { /** * Gives access to all of the immediate children of this snapshot. Can be used in native for - * loops: - *
for (DataSnapshot child : parent.getChildren()) { - *
    ... - *
} - *
+ * loops: + *
+   * for (DataSnapshot child : parent.getChildren()) {
+   *       ...
+   * }
+   * 
* * @return The immediate children of this snapshot */ diff --git a/firebase-database/src/main/java/com/google/firebase/database/GenericTypeIndicator.java b/firebase-database/src/main/java/com/google/firebase/database/GenericTypeIndicator.java index 0d6d099e6e4..ea447861a7b 100644 --- a/firebase-database/src/main/java/com/google/firebase/database/GenericTypeIndicator.java +++ b/firebase-database/src/main/java/com/google/firebase/database/GenericTypeIndicator.java @@ -25,7 +25,7 @@ * {@link DataSnapshot}:
*
* - *

+ * 
  *     class Message {
  *         private String author;
  *         private String text;
@@ -51,7 +51,7 @@
  *     GenericTypeIndicator<List<Message>> t = new GenericTypeIndicator<List<Message>>() {};
  *     List<Message> messages = snapshot.getValue(t);
  *
- * 
+ *
* * @param The type of generic collection that this instance servers as an indicator for */ diff --git a/firebase-database/src/main/java/com/google/firebase/database/MutableData.java b/firebase-database/src/main/java/com/google/firebase/database/MutableData.java index fda1c2a7c7a..729606a88a6 100644 --- a/firebase-database/src/main/java/com/google/firebase/database/MutableData.java +++ b/firebase-database/src/main/java/com/google/firebase/database/MutableData.java @@ -91,11 +91,12 @@ public long getChildrenCount() { } /** - * Used to iterate over the immediate children at this location - *
for (MutableData child : parent.getChildren()) { - *
    ... - *
} - *
+ * Used to iterate over the immediate children at this location + *
+   *     for (MutableData child : parent.getChildren()) {
+   *             ...
+   *     }
+   * 
* * @return The immediate children at this location */ @@ -196,7 +197,7 @@ public Object getValue() { * * An example class might look like: * - *

+   * 
    *     class Message {
    *         private String author;
    *         private String text;
@@ -220,7 +221,7 @@ public Object getValue() {
    *
    *     // Later
    *     Message m = mutableData.getValue(Message.class);
-   * 
+ *
* * @param valueType The class into which this data in this instance should be marshalled * @param The type to return. Implicitly defined from the class passed in @@ -238,11 +239,11 @@ public T getValue(@NonNull Class valueType) { * properly-typed Collection. So, in the case where you want a {@link java.util.List} of Message * instances, you will need to do something like the following: * - *

+   * 
    *     GenericTypeIndicator<List<Message>> t =
    *         new GenericTypeIndicator<List<Message>>() {};
    *     List<Message> messages = mutableData.getValue(t);
-   * 
+ *
* * It is important to use a subclass of {@link GenericTypeIndicator}. See {@link * GenericTypeIndicator} for more details diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java index 52c5d981352..097175f2e61 100644 --- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java +++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java @@ -33,9 +33,9 @@ public class FirebaseMlException extends FirebaseException { public static final int UNKNOWN = 2; /** - * Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION - * . INVALID_ARGUMENT indicates arguments that are problematic regardless of - * the state of the system (for example, an invalid field name). + * Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. + * INVALID_ARGUMENT indicates arguments that are problematic regardless of the state + * of the system (for example, an invalid field name). */ public static final int INVALID_ARGUMENT = 3; From 88505cda8b5061848cb79160337737a4678f28f5 Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 8 Nov 2022 13:49:40 -0600 Subject: [PATCH 2/3] Fix linting in firebase-database --- .../src/main/java/com/google/firebase/database/DataSnapshot.java | 1 + .../src/main/java/com/google/firebase/database/MutableData.java | 1 + 2 files changed, 2 insertions(+) diff --git a/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java b/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java index e29a148b251..57c6ed89578 100644 --- a/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java +++ b/firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java @@ -256,6 +256,7 @@ public String getKey() { /** * Gives access to all of the immediate children of this snapshot. Can be used in native for * loops: + * *
    * for (DataSnapshot child : parent.getChildren()) {
    *       ...
diff --git a/firebase-database/src/main/java/com/google/firebase/database/MutableData.java b/firebase-database/src/main/java/com/google/firebase/database/MutableData.java
index 729606a88a6..43752fe7648 100644
--- a/firebase-database/src/main/java/com/google/firebase/database/MutableData.java
+++ b/firebase-database/src/main/java/com/google/firebase/database/MutableData.java
@@ -92,6 +92,7 @@ public long getChildrenCount() {
 
   /**
    * Used to iterate over the immediate children at this location
+   *
    * 
    *     for (MutableData child : parent.getChildren()) {
    *             ...

From 84ed5631948224f4a9d5bdf981547248306f2467 Mon Sep 17 00:00:00 2001
From: Daymon 
Date: Tue, 8 Nov 2022 13:51:01 -0600
Subject: [PATCH 3/3] Fix FirebaseMLDownloader linting

---
 .../firebase/ml/modeldownloader/FirebaseMlException.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java
index 097175f2e61..52c5d981352 100644
--- a/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java
+++ b/firebase-ml-modeldownloader/src/main/java/com/google/firebase/ml/modeldownloader/FirebaseMlException.java
@@ -33,9 +33,9 @@ public class FirebaseMlException extends FirebaseException {
   public static final int UNKNOWN = 2;
 
   /**
-   * Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION.
-   * INVALID_ARGUMENT indicates arguments that are problematic regardless of the state
-   * of the system (for example, an invalid field name).
+   * Client specified an invalid argument. Note that this differs from FAILED_PRECONDITION
+   * . INVALID_ARGUMENT indicates arguments that are problematic regardless of
+   * the state of the system (for example, an invalid field name).
    */
   public static final int INVALID_ARGUMENT = 3;