Skip to content

Random code cleanup for Storage #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 3, 2019
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

  • Use getReference() helper in all Integration test.
  • Use Uri.encode() since it doesn't throw exceptions (and follows the existing encoding of spaces to %20 everywhere)
  • Remove unnecessary parenthesis
  • Remove JSONException that is never thrown
  • Stop using deprecated FirebaseException constructor, instead we pass in the detailed message

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-storage:
error: Removed method com.google.firebase.storage.StorageException.getMessage() [RemovedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

Copy link
Contributor

@fredzqm fredzqm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for cleaning these up.

Log.e(TAG, "Unable to create a valid default Uri. " + bucket + path, e);
throw new IllegalStateException(e);
}
uri =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline variable declaration?


throw new IllegalArgumentException("childName");
}
child =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline declaration?

mPendingResult.setException(StorageException.fromException(e));
return;
}
request =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

mException = e;
return;
}
startRequest =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@fredzqm fredzqm removed their assignment Sep 3, 2019
@schmidt-sebastian
Copy link
Contributor Author

Inlined all assignments. Thanks for reviewing!

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-storage:
error: Removed method com.google.firebase.storage.StorageException.getMessage() [RemovedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@schmidt-sebastian
Copy link
Contributor Author

/test check-changed

1 similar comment
@schmidt-sebastian
Copy link
Contributor Author

/test check-changed

@schmidt-sebastian
Copy link
Contributor Author

/test check-changed

@schmidt-sebastian schmidt-sebastian merged commit 29a1573 into master Sep 3, 2019
@rlazo rlazo deleted the mrschmidt/randomfixes branch September 27, 2019 14:55
@firebase firebase locked and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants