CloseGuard: Fix JavaDoc code sample to use correct API

The code sample in the JavaDoc shows
`CloseGuard.get()` to create a new CloseGuard,
which is incorrect.
The correct API is `new CloseGuard()`.

Bug: 148291235
Test: compiles
Change-Id: I1dd24fff150e671007b67c023b20e078557f2966
This commit is contained in:
David Su
2020-01-27 14:41:16 -08:00
parent bd9ff62138
commit ab2c291b46

View File

@@ -26,7 +26,7 @@ import android.annotation.NonNull;
* A simple example: <pre> {@code
* class Foo {
*
* private final CloseGuard guard = CloseGuard.get();
* private final CloseGuard guard = new CloseGuard();
*
* ...
*
@@ -64,7 +64,7 @@ import android.annotation.NonNull;
* be deferred. For example: <pre> {@code
* class Bar {
*
* private final CloseGuard guard = CloseGuard.get();
* private final CloseGuard guard = new CloseGuard();
*
* ...
*