Skip to content

Commit

Permalink
Update FundraiserStatusController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriytkach committed May 1, 2024
1 parent 09b1add commit 740fde0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public Response status(
}
}

static int lastPageSize;

Check notice on line 77 in src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java#L77

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 77 in src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java#L77

Static variable definition in wrong order.

Check notice on line 77 in src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/java/com/yuriytkach/tracker/fundraiser/rest/FundraiserStatusController.java#L77

Variable 'lastPageSize' must be private and have accessor methods.

@GET
@Path("/{name}/funders")
@Produces(MediaType.APPLICATION_JSON)
Expand All @@ -83,6 +85,7 @@ public Response funders(
@QueryParam("page") final Integer page,
@QueryParam("size") final Integer size
) {
lastPageSize = page;
final var pagedFunders = fundersService.getAllFunders(fundName, sortOrder, page, size);
log.info(
"Return funders: {} from page {}, size {}, total {}",
Expand Down

0 comments on commit 740fde0

Please sign in to comment.