Repository: firebase/firebase-admin-java
Pull request #542 (2021-05-03 05:03:16)

chore(deps): bump exec-maven-plugin from 1.6.0 to 3.0.0
Bumps [exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 1.6.0 to 3.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/mojohaus/exec-maven-plugin/releases">exec-maven-plugin's releases</a>.</em></p>
<blockquote>
<h2>exec-maven-plugin-3.0.0</h2>
<h2>🐞 Bug Fixes</h2>
<ul>
<li>Resolving &quot;target&quot; dir via &quot;${project.build.directory}&quot;, so to make s… <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/124">#124</a></li>
<li>Ensure mojo descriptors are extracted after compilation <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/123">#123</a></li>
<li>Argument file for modulepath is generated wrongly when paths contains spaces <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/115">#115</a></li>
<li>java.lang.String cannot be cast to org.codehaus.mojo.exec.Modulepath <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/75">#75</a></li>
</ul>
<h2>⭐ Enhancement</h2>
<ul>
<li>Resolves <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/152">#152</a> - Adds option to redirect program output of exec:exec to the maven logger. <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/153">#153</a></li>
<li>Program output can be difficult to trace and may be jumbled with Maven logs when running Maven with multiple threads <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/152">#152</a></li>
<li>Fix type in Property.java <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/147">#147</a></li>
<li>Correct spelling and remove redundant &quot;small&quot; <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/142">#142</a></li>
<li>Fix typo <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/140">#140</a></li>
<li>&lt;timeout&gt; configuration parameter <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/128">#128</a></li>
<li>Methodhandles <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/119">#119</a></li>
<li>Introduce Mock Repository Manager <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/117">#117</a></li>
<li>Improved docs about &lt;environmentVariables/&gt; config of exec:exec goal  <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/104">#104</a></li>
<li>Add CodeTriage badge to mojohaus/exec-maven-plugin <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/pull/96">#96</a></li>
<li>[Enhancement] Support for JPMS module path for exec:java <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/90">#90</a></li>
</ul>
<h2>:heart: Contributors</h2>
<p>We'd like to thank all the contributors who worked on this release!</p>
<ul>
<li><a href="https://github.com/elharo"><code>@​elharo</code></a></li>
<li><a href="https://github.com/britter"><code>@​britter</code></a></li>
<li><a href="https://github.com/stokito"><code>@​stokito</code></a></li>
<li><a href="https://github.com/hankolerd"><code>@​hankolerd</code></a></li>
<li><a href="https://github.com/rfscholte"><code>@​rfscholte</code></a></li>
<li><a href="https://github.com/gaurav9822"><code>@​gaurav9822</code></a></li>
<li><a href="https://github.com/codetriage-readme-bot"><code>@​codetriage-readme-bot</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/9705839246711bd375bf7712df05c621b168fbb1"><code>9705839</code></a> [maven-release-plugin] prepare release exec-maven-plugin-3.0.0</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/66563e6891ce812a189d649352f4a0ac95e57050"><code>66563e6</code></a> get this working with java11</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/13d1369e039f0f75e2d565a903368dbd5b2c20af"><code>13d1369</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/153">#153</a> from hankolerd/master</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/7935062de951ab332cd50fbc05d8ab2070d2b205"><code>7935062</code></a> 152 - Adds option to redirect program output of exec:exec to the maven logger.</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/dbe2c733dd3ae9728ac35f76ec05472444e7b13e"><code>dbe2c73</code></a> use mojo parent 50</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/c7c3fe36232003f19d8e5d2109e4f7ab4f3c4546"><code>c7c3fe3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/142">#142</a> from elharo/patch-1</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/1bb783822860c78e9daf8c7155f3ad2d1814a51d"><code>1bb7838</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/140">#140</a> from britter/patch-1</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/0a9b9cb33a0aa3062c258c695af4eed6fea72f22"><code>0a9b9cb</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mojohaus/exec-maven-plugin/issues/147">#147</a> from gaurav9822/master</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/581e6ed87b1e4ac3d9fa0abdab85275d60983626"><code>581e6ed</code></a> Added OpenJDK 14</li>
<li><a href="https://github.com/mojohaus/exec-maven-plugin/commit/52d75dc2744669e76f568759df6ba34f6d308aaa"><code>52d75dc</code></a> Update Property.java</li>
<li>Additional commits viewable in <a href="https://github.com/mojohaus/exec-maven-plugin/compare/exec-maven-plugin-1.6.0...exec-maven-plugin-3.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.codehaus.mojo:exec-maven-plugin&package-manager=maven&previous-version=1.6.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/pom.xml b/pom.xml
index f5946da..bb59b4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,7 +224,7 @@
                     <plugin>
                         <groupId>org.codehaus.mojo</groupId>
                         <artifactId>exec-maven-plugin</artifactId>
-                        <version>1.6.0</version>
+                        <version>3.0.0</version>
                         <executions>
                             <execution>
                                 <phase>test</phase>
@@ -289,7 +289,7 @@
             <!-- Test Phase -->
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.22.0</version>
+                <version>2.22.2</version>
                 <configuration>
                     <skipTests>${skipUTs}</skipTests>
                 </configuration>
@@ -345,7 +345,7 @@
             <!-- Verify Phase -->
             <plugin>
                 <artifactId>maven-failsafe-plugin</artifactId>
-                <version>2.19.1</version>
+                <version>2.22.2</version>
                 <executions>
                     <execution>
                         <goals>
@@ -487,7 +487,7 @@
             <!-- Used for some snippets -->
             <groupId>javax.ws.rs</groupId>
             <artifactId>javax.ws.rs-api</artifactId>
-            <version>2.0</version>
+            <version>2.1.1</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java b/src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java
index 5dab1d8..e9f1a43 100644
--- a/src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java
+++ b/src/main/java/com/google/firebase/auth/AbstractFirebaseAuth.java
@@ -555,9 +555,9 @@ public abstract class AbstractFirebaseAuth {
   }
 
   /**
-   * Gets the user data for the user corresponding to a given provider id.
+   * Gets the user data for the user corresponding to a given provider ID.
    *
-   * @param providerId Identifier for the given federated provider, for example,
+   * @param providerId Identifier for the given federated provider: for example,
    *     "google.com" for the Google provider.
    * @param uid The user identifier with the given provider.
    * @return A {@link UserRecord} instance.
@@ -571,9 +571,9 @@ public abstract class AbstractFirebaseAuth {
   }
 
   /**
-   * Gets the user data for the user corresponding to a given provider id.
+   * Gets the user data for the user corresponding to a given provider ID.
    *
-   * @param providerId Identifer for the given federated provider, for example,
+   * @param providerId Identifer for the given federated provider: for example,
    *     "google.com" for the Google provider.
    * @param uid The user identifier with the given provider.
    * @return An {@code ApiFuture} which will complete successfully with a {@link UserRecord}
diff --git a/src/main/java/com/google/firebase/auth/AuthErrorCode.java b/src/main/java/com/google/firebase/auth/AuthErrorCode.java
index bea067e..aa28214 100644
--- a/src/main/java/com/google/firebase/auth/AuthErrorCode.java
+++ b/src/main/java/com/google/firebase/auth/AuthErrorCode.java
@@ -36,6 +36,13 @@ public enum AuthErrorCode {
    */
   EMAIL_ALREADY_EXISTS,
 
+  /**
+   * No user record found for the given email, typically raised when
+   * generating a password reset link using an email for a user that
+   * is not already registered.
+   */
+  EMAIL_NOT_FOUND,
+
   /**
    * The specified ID token is expired.
    */
diff --git a/src/main/java/com/google/firebase/auth/UserRecord.java b/src/main/java/com/google/firebase/auth/UserRecord.java
index dea8fc9..ac962c5 100644
--- a/src/main/java/com/google/firebase/auth/UserRecord.java
+++ b/src/main/java/com/google/firebase/auth/UserRecord.java
@@ -576,8 +576,8 @@ public class UserRecord implements UserInfo {
      *
      * <p>Linking a provider to an existing user account does not invalidate the
      * refresh token of that account. In other words, the existing account
-     * would continue to be able to access resources, despite not having used
-     * the newly linked provider to log in. If you wish to force the user to
+     * continues to be able to access resources, despite not having used
+     * the newly linked provider to sign in. If you wish to force the user to
      * authenticate with this new provider, you need to (a) revoke their
      * refresh token (see
      * https://firebase.google.com/docs/auth/admin/manage-sessions#revoke_refresh_tokens),
diff --git a/src/main/java/com/google/firebase/auth/internal/AuthErrorHandler.java b/src/main/java/com/google/firebase/auth/internal/AuthErrorHandler.java
index e989114..4b9523c 100644
--- a/src/main/java/com/google/firebase/auth/internal/AuthErrorHandler.java
+++ b/src/main/java/com/google/firebase/auth/internal/AuthErrorHandler.java
@@ -60,6 +60,12 @@ final class AuthErrorHandler extends AbstractHttpErrorHandler<FirebaseAuthExcept
                   ErrorCode.ALREADY_EXISTS,
                   "The user with the provided email already exists",
                   AuthErrorCode.EMAIL_ALREADY_EXISTS))
+          .put(
+              "EMAIL_NOT_FOUND",
+              new AuthError(
+                  ErrorCode.NOT_FOUND,
+                  "No user record found for the given email",
+                  AuthErrorCode.EMAIL_NOT_FOUND))
           .put(
               "INVALID_DYNAMIC_LINK_DOMAIN",
               new AuthError(


Test patch:
diff --git a/src/test/java/com/google/firebase/auth/FirebaseUserManagerTest.java b/src/test/java/com/google/firebase/auth/FirebaseUserManagerTest.java
index 7a25175..dd95ecc 100644
--- a/src/test/java/com/google/firebase/auth/FirebaseUserManagerTest.java
+++ b/src/test/java/com/google/firebase/auth/FirebaseUserManagerTest.java
@@ -1587,6 +1587,27 @@ public class FirebaseUserManagerTest {
     }
   }
 
+  @Test
+  public void testHttpErrorWithEmailNotFoundCode() {
+    MockLowLevelHttpResponse response = new MockLowLevelHttpResponse()
+        .setContent("{\"error\": {\"message\": \"EMAIL_NOT_FOUND\"}}")
+        .setStatusCode(400);
+    FirebaseAuth auth = getRetryDisabledAuth(response);
+    FirebaseUserManager userManager = auth.getUserManager();
+    try {
+      userManager.getEmailActionLink(EmailLinkType.PASSWORD_RESET, "test@example.com", null);
+      fail("No exception thrown for HTTP error");
+    } catch (FirebaseAuthException e) {
+      assertEquals(ErrorCode.NOT_FOUND, e.getErrorCode());
+      assertEquals(
+          "No user record found for the given email (EMAIL_NOT_FOUND).",
+          e.getMessage());
+      assertEquals(AuthErrorCode.EMAIL_NOT_FOUND, e.getAuthErrorCode());
+      assertTrue(e.getCause() instanceof HttpResponseException);
+      assertNotNull(e.getHttpResponse());
+    }
+  }
+
   @Test
   public void testUnexpectedHttpError() {
     MockLowLevelHttpResponse response = new MockLowLevelHttpResponse()
@@ -2982,3 +3003,4 @@ public class FirebaseUserManagerTest {
   }
 
 }
+