Skip to content

Commit 11f49b5

Browse files
valfirstfrancisf
authored andcommitted
Remove final modifiers from methods of final class
Since final classes cannot be inherited, marking a method as final may be unnecessary and confusing.
1 parent c5ac6c1 commit 11f49b5

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/main/java/com/browserstack/automate/AutomateClient.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public AutomateClient(String username, String accessKey) {
4545
* @throws AutomateException exception object for Automate sessions.
4646
*/
4747
@Override
48-
public final AccountUsage getAccountUsage() throws AutomateException {
48+
public AccountUsage getAccountUsage() throws AutomateException {
4949
try {
5050
return newRequest(Method.GET, "/plan.json").asObject(AccountUsage.class);
5151
} catch (BrowserStackException e) {
@@ -60,7 +60,7 @@ public final AccountUsage getAccountUsage() throws AutomateException {
6060
* @throws AutomateException exception object for Automate sessions.
6161
*/
6262
@Override
63-
public final List<Browser> getBrowsers() throws AutomateException {
63+
public List<Browser> getBrowsers() throws AutomateException {
6464
return getBrowsers(true);
6565
}
6666

@@ -74,7 +74,7 @@ public final List<Browser> getBrowsers() throws AutomateException {
7474
*/
7575
@Override
7676
@SuppressWarnings("unchecked")
77-
public final List<Browser> getBrowsers(final boolean cache) throws AutomateException {
77+
public List<Browser> getBrowsers(final boolean cache) throws AutomateException {
7878
try {
7979
if (cache && cacheMap.containsKey(CACHE_KEY_BROWSERS)) {
8080
List<Browser> browsers = (List<Browser>) cacheMap.get(CACHE_KEY_BROWSERS);
@@ -106,7 +106,7 @@ public final List<Browser> getBrowsers(final boolean cache) throws AutomateExcep
106106
* @throws AutomateException exception object for Automate sessions.
107107
*/
108108
@Override
109-
public final List<Project> getProjects() throws AutomateException {
109+
public List<Project> getProjects() throws AutomateException {
110110
List<Project> projects = new ArrayList<>();
111111

112112
try {
@@ -128,7 +128,7 @@ public final List<Project> getProjects() throws AutomateException {
128128
* @throws AutomateException exception object for Automate sessions.
129129
*/
130130
@Override
131-
public final Project getProject(final int projectId) throws ProjectNotFound, AutomateException {
131+
public Project getProject(final int projectId) throws ProjectNotFound, AutomateException {
132132
try {
133133
ProjectNode projectNode = newRequest(Method.GET, "/projects/{projectId}.json")
134134
.routeParam("projectId", "" + projectId).asObject(ProjectNode.class);
@@ -153,7 +153,7 @@ public final Project getProject(final int projectId) throws ProjectNotFound, Aut
153153
* @throws AutomateException exception object for Automate sessions.
154154
*/
155155
@Override
156-
public final boolean deleteProject(final int projectId) throws AutomateException {
156+
public boolean deleteProject(final int projectId) throws AutomateException {
157157
try {
158158
ObjectNode result = newRequest(BrowserStackClient.Method.DELETE, "/projects/{projectId}.json")
159159
.routeParam("projectId", "" + projectId).asJsonObject();
@@ -178,7 +178,7 @@ public final boolean deleteProject(final int projectId) throws AutomateException
178178
* @throws AutomateException exception object for Automate sessions.
179179
*/
180180
@Override
181-
public final List<Build> getBuilds(final BuildStatus status, final int limit)
181+
public List<Build> getBuilds(final BuildStatus status, final int limit)
182182
throws AutomateException {
183183
try {
184184
return super.getBuilds(status, limit);
@@ -198,7 +198,7 @@ public final List<Build> getBuilds(final BuildStatus status, final int limit)
198198
* @throws AutomateException exception object fdr Automate sessions.
199199
*/
200200
@Override
201-
public final List<Build> getBuilds() throws AutomateException {
201+
public List<Build> getBuilds() throws AutomateException {
202202
return getBuilds(null, 0);
203203
}
204204

@@ -214,7 +214,7 @@ public final List<Build> getBuilds() throws AutomateException {
214214
* @throws AutomateException exception object for Automate sessions.
215215
*/
216216
@Override
217-
public final List<Build> getBuilds(final int limit) throws AutomateException {
217+
public List<Build> getBuilds(final int limit) throws AutomateException {
218218
return getBuilds(null, limit);
219219
}
220220

@@ -230,7 +230,7 @@ public final List<Build> getBuilds(final int limit) throws AutomateException {
230230
* @throws AutomateException exception object for Automate sessions.
231231
*/
232232
@Override
233-
public final List<Build> getBuilds(final BuildStatus status) throws AutomateException {
233+
public List<Build> getBuilds(final BuildStatus status) throws AutomateException {
234234
return getBuilds(status, 0);
235235
}
236236

@@ -243,7 +243,7 @@ public final List<Build> getBuilds(final BuildStatus status) throws AutomateExce
243243
* @throws AutomateException exception object for Automate sessions.
244244
*/
245245
@Override
246-
public final Build getBuild(final String buildId) throws BuildNotFound, AutomateException {
246+
public Build getBuild(final String buildId) throws BuildNotFound, AutomateException {
247247
try {
248248
return super.getBuild(buildId);
249249
} catch (BrowserStackException e) {
@@ -260,7 +260,7 @@ public final Build getBuild(final String buildId) throws BuildNotFound, Automate
260260
* @throws AutomateException exception object for Automate sessions.
261261
*/
262262
@Override
263-
public final Build getBuildByName(@Nonnull final String buildName) throws BuildNotFound, AutomateException {
263+
public Build getBuildByName(@Nonnull final String buildName) throws BuildNotFound, AutomateException {
264264
try {
265265
return super.getBuildByName(buildName);
266266
} catch (BrowserStackException e) {
@@ -276,7 +276,7 @@ public final Build getBuildByName(@Nonnull final String buildName) throws BuildN
276276
* @throws AutomateException exception object for Automate sessions.
277277
*/
278278
@Override
279-
public final boolean deleteBuild(final String buildId) throws AutomateException {
279+
public boolean deleteBuild(final String buildId) throws AutomateException {
280280
try {
281281
return super.deleteBuild(buildId);
282282
} catch (BrowserStackException e) {
@@ -295,7 +295,7 @@ public final boolean deleteBuild(final String buildId) throws AutomateException
295295
* @throws AutomateException exception object for Automate sessions.
296296
*/
297297
@Override
298-
public final List<Session> getSessions(final String buildId, final BuildStatus status,
298+
public List<Session> getSessions(final String buildId, final BuildStatus status,
299299
final int limit) throws BuildNotFound, AutomateException {
300300
try {
301301
return super.getSessions(buildId, status, limit);
@@ -313,7 +313,7 @@ public final List<Session> getSessions(final String buildId, final BuildStatus s
313313
* @throws AutomateException exception object for Automate sessions.
314314
*/
315315
@Override
316-
public final List<Session> getSessions(final String buildId)
316+
public List<Session> getSessions(final String buildId)
317317
throws BuildNotFound, AutomateException {
318318
return getSessions(buildId, null, 0);
319319
}
@@ -328,7 +328,7 @@ public final List<Session> getSessions(final String buildId)
328328
* @throws AutomateException exception object for Automate sessions.
329329
*/
330330
@Override
331-
public final List<Session> getSessions(final String buildId, final int limit)
331+
public List<Session> getSessions(final String buildId, final int limit)
332332
throws BuildNotFound, AutomateException {
333333
return getSessions(buildId, null, limit);
334334
}
@@ -343,7 +343,7 @@ public final List<Session> getSessions(final String buildId, final int limit)
343343
* @throws AutomateException exception object for Automate sessions.
344344
*/
345345
@Override
346-
public final List<Session> getSessions(final String buildId, final BuildStatus status)
346+
public List<Session> getSessions(final String buildId, final BuildStatus status)
347347
throws BuildNotFound, AutomateException {
348348
return getSessions(buildId, status, 0);
349349
}
@@ -356,7 +356,7 @@ public final List<Session> getSessions(final String buildId, final BuildStatus s
356356
* @throws AutomateException exception object for Automate sessions.
357357
*/
358358
@Override
359-
public final Session getSession(final String sessionId)
359+
public Session getSession(final String sessionId)
360360
throws SessionNotFound, AutomateException {
361361
try {
362362
return super.getSession(sessionId);
@@ -374,7 +374,7 @@ public final Session getSession(final String sessionId)
374374
* @throws AutomateException exception object for Automate sessions.
375375
*/
376376
@Override
377-
public final Session updateSessionStatus(final String sessionId, final Map<String, Object> data)
377+
public Session updateSessionStatus(final String sessionId, final Map<String, Object> data)
378378
throws AutomateException {
379379
try {
380380
return newRequest(Method.PUT, "/sessions/{sessionId}.json", data)
@@ -396,7 +396,7 @@ public final Session updateSessionStatus(final String sessionId, final Map<Strin
396396
* @throws AutomateException exception object for Automate sessions.
397397
*/
398398
@Override
399-
public final Session updateSessionStatus(final String sessionId,
399+
public Session updateSessionStatus(final String sessionId,
400400
final SessionStatus sessionStatus, final String reason)
401401
throws SessionNotFound, AutomateException {
402402
final Map<String, Object> data = new HashMap<>();
@@ -421,7 +421,7 @@ public final Session updateSessionStatus(final String sessionId,
421421
* @throws AutomateException exception object for Automate sessions.
422422
*/
423423
@Override
424-
public final Session updateSessionStatus(final String sessionId,
424+
public Session updateSessionStatus(final String sessionId,
425425
final SessionStatus sessionStatus) throws SessionNotFound, AutomateException {
426426
return updateSessionStatus(sessionId, sessionStatus, null);
427427
}
@@ -435,7 +435,7 @@ public final Session updateSessionStatus(final String sessionId,
435435
* @throws AutomateException exception object for Automate sessions.
436436
*/
437437
@Override
438-
public final String getSessionLogs(final String sessionId)
438+
public String getSessionLogs(final String sessionId)
439439
throws SessionNotFound, AutomateException {
440440
return getSessionLogs(getSession(sessionId));
441441
}
@@ -448,7 +448,7 @@ public final String getSessionLogs(final String sessionId)
448448
* @throws AutomateException exception object for Automate sessions.
449449
*/
450450
@Override
451-
public final String getSessionLogs(final Session session) throws AutomateException {
451+
public String getSessionLogs(final Session session) throws AutomateException {
452452
if (session == null) {
453453
throw new AutomateException("Invalid session", 400);
454454
}
@@ -475,7 +475,7 @@ public final String getSessionLogs(final Session session) throws AutomateExcepti
475475
* @throws AutomateException exception object for Automate sessions.
476476
*/
477477
@Override
478-
public final String getSessionVideo(final String sessionId)
478+
public String getSessionVideo(final String sessionId)
479479
throws SessionNotFound, AutomateException {
480480
return getSession(sessionId).getVideoUrl();
481481
}
@@ -489,7 +489,7 @@ public final String getSessionVideo(final String sessionId)
489489
* @throws AutomateException exception object for Automate sessions.
490490
*/
491491
@Override
492-
public final boolean deleteSession(final String sessionId)
492+
public boolean deleteSession(final String sessionId)
493493
throws SessionNotFound, AutomateException {
494494
try {
495495
ObjectNode result = newRequest(Method.DELETE, "/sessions/{sessionId}.json")
@@ -513,7 +513,7 @@ public final boolean deleteSession(final String sessionId)
513513
* @throws AutomateException exception for Automate sessions.
514514
*/
515515
@Override
516-
public final String recycleKey() throws AutomateException {
516+
public String recycleKey() throws AutomateException {
517517
ObjectNode result;
518518
try {
519519
result = newRequest(Method.PUT, "/recycle_key.json").body("{}").asJsonObject();

0 commit comments

Comments
 (0)