Skip to content

Commit

Permalink
Remove debug logging from PagingListView.
Browse files Browse the repository at this point in the history
Eliminated unnecessary `System.out.println` statements and unused variables (`reloads`, `actualLoads`) related to debugging. This cleanup improves code readability and reduces noise in the output for production environments.
  • Loading branch information
dlemmermann committed Dec 11, 2024
1 parent 07d0cbd commit 63b8736
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions gemsfx/src/main/java/com/dlsc/gemsfx/PagingListView.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ protected Task<List<T>> createTask() {
@Override
protected List<T> call() {
try {
System.out.println("sleeping " + getLoadDelayInMillis());
Thread.sleep(getLoadDelayInMillis());
} catch (InterruptedException e) {
// do nothing
Expand All @@ -297,17 +296,13 @@ protected List<T> call() {
Callback<LoadRequest, List<T>> loader = PagingListView.this.loader.get();
if (loader != null) {

actualLoads++;
System.out.println("reloads: " + reloads + ", actual loads: " + actualLoads);
/*
* Important to wrap in a list, otherwise we can get a concurrent modification
* exception when the result gets applied to the "items" list in the service
* event handler for "success". Not sure why this fixes that issue.
*/
return new ArrayList<>(loader.call(loadRequest));
}
} else {
System.out.println("was cancelled");
}

return Collections.emptyList();
Expand All @@ -316,15 +311,10 @@ protected List<T> call() {
}
}

private int reloads;
private int actualLoads;

/**
* Triggers an explicit reload of the list view.
*/
public final void reload() {
reloads++;
System.out.println("reloading");
loadingService.restart();
}

Expand Down

0 comments on commit 63b8736

Please sign in to comment.