GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Eliminate raw type KeyRange warnings (#7) · lmdbjava/lmdbjava@80f5308

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/main/java/org/lmdbjava
    • KeyRange.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/org/lmdbjava/KeyRange.java‎

Copy file name to clipboardExpand all lines: src/main/java/org/lmdbjava/KeyRange.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
*/
3535
public final class KeyRange<T> {
3636

37-
private static final KeyRange BACK = new KeyRange<>(BACKWARD_ALL, null, null);
38-
private static final KeyRange FORW = new KeyRange<>(FORWARD_ALL, null, null);
37+
private static final KeyRange<?> BK = new KeyRange<>(BACKWARD_ALL, null, null);
38+
private static final KeyRange<?> FW = new KeyRange<>(FORWARD_ALL, null, null);
3939
private final T start;
4040
private final T stop;
4141
private final KeyRangeType type;
@@ -70,8 +70,9 @@ public KeyRange(final KeyRangeType type, final T start, final T stop) {
7070
* @param <T> buffer type
7171
* @return a key range (never null)
7272
*/
73+
@SuppressWarnings({"checkstyle:SuppressWarnings", "unchecked"})
7374
public static <T> KeyRange<T> all() {
74-
return FORW;
75+
return (KeyRange<T>) FW;
7576
}
7677

7778
/**
@@ -80,8 +81,9 @@ public static <T> KeyRange<T> all() {
8081
* @param <T> buffer type
8182
* @return a key range (never null)
8283
*/
84+
@SuppressWarnings({"checkstyle:SuppressWarnings", "unchecked"})
8385
public static <T> KeyRange<T> allBackward() {
84-
return BACK;
86+
return (KeyRange<T>) BK;
8587
}
8688

8789
/**

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.