Skip to content

Commit b663b84

Browse files
hiranya911avishalom
authored andcommitted
Updated documentation for initializeApp() (firebase#120)
1 parent 30b0488 commit b663b84

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

‎src/main/java/com/google/firebase/FirebaseApp.java‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,41 +171,34 @@ public static FirebaseApp getInstance(@NonNull String name) {
171171
}
172172

173173
/**
174-
* Initializes the default {@link FirebaseApp} instance using default credentials and
175-
* default {@link FirebaseOptions} and the {@link #DEFAULT_APP_NAME}.
176-
* Uses Application Default Credentials and also attempts to load {@link FirebaseOptions}
177-
* from the environment. This is done by looking up the {@code FIREBASE_CONFIG} environment
178-
* variable. If the value of the variable starts with <code>'{'</code>, it is parsed as a JSON
179-
* object. Otherwise it is treated as a file name and the JSON content is read from the
180-
* corresponding file.
174+
* Initializes the default {@link FirebaseApp} instance using Google Application Default
175+
* Credentials. Also attempts to load additional {@link FirebaseOptions} from the environment
176+
* by looking up the {@code FIREBASE_CONFIG} environment variable. If the value of
177+
* the variable starts with <code>'{'</code>, it is parsed as a JSON object. Otherwise it is
178+
* treated as a file name and the JSON content is read from the corresponding file.
181179
*/
182180
public static FirebaseApp initializeApp() {
183181
return initializeApp(DEFAULT_APP_NAME);
184182
}
185183

186184
/**
187-
* Initializes a {@link FirebaseApp} instance using default credentials and default
188-
* {@link FirebaseOptions} with a specified name.
189-
* Uses Application Default Credentials and also attempts to load {@link FirebaseOptions}
190-
* from the environment. This is done by looking up the {@code FIREBASE_CONFIG} environment
191-
* variable. If the value of the variable starts with <code>'{'</code>, it is parsed as a JSON
192-
* object. Otherwise it is treated as a file name and the JSON content is read from the
193-
* corresponding file.
185+
* Initializes a named {@link FirebaseApp} instance using Google Application Default Credentials.
186+
* Loads additional {@link FirebaseOptions} from the environment in the same way as the
187+
* {@link #initializeApp()} method.
194188
*/
195189
public static FirebaseApp initializeApp(String name) {
196190
return initializeApp(getOptionsFromEnvironment(), name);
197191
}
198192

199193
/**
200-
* Initializes the default {@link FirebaseApp} instance. Same as {@link
201-
* #initializeApp(FirebaseOptions, String)}, but uses {@link #DEFAULT_APP_NAME} as name.
194+
* Initializes the default {@link FirebaseApp} instance using the given options.
202195
*/
203196
public static FirebaseApp initializeApp(FirebaseOptions options) {
204197
return initializeApp(options, DEFAULT_APP_NAME);
205198
}
206199

207200
/**
208-
* A factory method to initialize a {@link FirebaseApp}.
201+
* Initializes a named {@link FirebaseApp} instance using the given options.
209202
*
210203
* @param options represents the global {@link FirebaseOptions}
211204
* @param name unique name for the app. It is an error to initialize an app with an already

0 commit comments

Comments
 (0)