Skip to content

Commit

Permalink
Merge pull request #72 from bgilbert/lints
Browse files Browse the repository at this point in the history
Enable more compiler lints
  • Loading branch information
bgilbert authored Apr 9, 2024
2 parents 873615c + f10a254 commit f78c135
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jar = find_program(
add_project_arguments(
'-source', java_ver,
'-target', java_ver,
'-Xlint:-options',
'-Xlint:all,-serial',
language : 'java',
)

Expand Down
1 change: 1 addition & 0 deletions org/openslide/OpenSlideFFM.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static java.lang.foreign.ValueLayout.*;
import java.lang.invoke.*;

@SuppressWarnings("restricted")
class OpenSlideFFM {
private static final Arena LIBRARY_ARENA = Arena.ofAuto();

Expand Down
4 changes: 2 additions & 2 deletions org/openslide/gui/DefaultSelectionListModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

import javax.swing.AbstractListModel;

public class DefaultSelectionListModel extends AbstractListModel implements
SelectionListModel {
public class DefaultSelectionListModel extends AbstractListModel<Annotation>
implements SelectionListModel {

private final List<Annotation> list = new ArrayList<Annotation>();

Expand Down
1 change: 1 addition & 0 deletions org/openslide/gui/OpenSlideView.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public OpenSlideView(OpenSlide w, boolean startWithZoomFit) {
this(w, 1.2, 40, startWithZoomFit);
}

@SuppressWarnings("this-escape")
public OpenSlideView(OpenSlide w, double downsampleBase,
int maxDownsampleExponent, boolean startWithZoomFit) {
// TODO support w > 2^31 and h > 2^31
Expand Down
3 changes: 2 additions & 1 deletion org/openslide/gui/SelectionListModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

import javax.swing.ListModel;

public interface SelectionListModel extends ListModel, Iterable<Annotation> {
public interface SelectionListModel extends ListModel<Annotation>,
Iterable<Annotation> {
void add(Annotation annotation);

boolean isEmpty();
Expand Down

0 comments on commit f78c135

Please sign in to comment.