Skip to content

Commit

Permalink
Code cleanup. Removed "final" modifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Aug 31, 2023
1 parent ec51b44 commit 84177ab
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public Pageable getPageable() {

@Override
public BufferedImage renderPage(int pageNumber, float scale) {
final PDFRenderer renderer = new PDFRenderer(document);
final BufferedImage bufferedImage;
PDFRenderer renderer = new PDFRenderer(document);
BufferedImage bufferedImage;

try {
bufferedImage = renderer.renderImage(pageNumber, scale, ImageType.ARGB, RenderDestination.VIEW);
Expand Down Expand Up @@ -140,7 +140,7 @@ public void close() {
}

private Rectangle2D calculateMarkerPosition(String searchText, String snippetText, List<TextPosition> textPositions) {
final int textPositionStartIndex = calculateTextPositionStartIndex(searchText, snippetText, textPositions);
int textPositionStartIndex = calculateTextPositionStartIndex(searchText, snippetText, textPositions);

float x1 = Float.MAX_VALUE;
float x2 = 0;
Expand Down Expand Up @@ -172,7 +172,7 @@ private Rectangle2D calculateMarkerPosition(String searchText, String snippetTex
*/
private int calculateTextPositionStartIndex(String searchText, String snippetText, List<TextPosition> textPositions) {

final int snippetTextStartIndex = snippetText.toLowerCase().indexOf(searchText.toLowerCase());
int snippetTextStartIndex = snippetText.toLowerCase().indexOf(searchText.toLowerCase());

int startIndexDecreaseDelta = 0;

Expand Down
2 changes: 1 addition & 1 deletion pdfviewfx/src/main/java/com/dlsc/pdfviewfx/PDFView.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public PDFView() {
});

selectedSearchResultProperty().addListener(it -> {
final SearchResult result = getSelectedSearchResult();
SearchResult result = getSelectedSearchResult();
if (result != null) {
setPage(result.getPageNumber());
}
Expand Down
Loading

0 comments on commit 84177ab

Please sign in to comment.