I have the following method:
private void recoverPassword() { FirebaseAuth mAuth = FirebaseAuth.getInstance(); mAuth.sendPasswordResetEmail("mail@example.com").addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (!task.isSuccessful()) { Exception e = task.getException(); System.out.println(e.toString()); } }); }
And I keep getting warnings from Android Studio:
The result of 'getException ()' is not thrown
How can I rewrite the snippet above to get rid of this warning?
Thanks!
android android-studio firebase firebase-authentication
Ramiro
source share