Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit cc8beb2

Browse files
committed
12 Processed some warnings
1 parent 9ca8a28 commit cc8beb2

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

.idea/libraries/commons_collections4_4_4__3_.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/jfoenix_8_0_10.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DeskSorting.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
<orderEntry type="library" name="jfoenix-8.0.10" level="project" />
2525
<orderEntry type="library" name="poi-ooxml-lite-5.0.0" level="project" />
2626
<orderEntry type="library" name="commons-collections4-4.4 (2)" level="project" />
27+
<orderEntry type="library" name="commons-collections4-4.4 (3)" level="project" />
2728
</component>
2829
</module>

src/cn/rocket/deksrt/main/AutoIterator.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,3 @@ int[] toArray() {
7474
return content;
7575
}
7676
}
77-
78-
class Test {
79-
public static void main(String[] args) throws IllegalAccessException {
80-
for (AutoIterator i = new AutoIterator(AutoIterator.SQUARE_ARRAY); i.hasNextWithUpdate(); i.next()) {
81-
System.out.println(i.x + "," + i.y);
82-
}
83-
}
84-
}

src/cn/rocket/deksrt/main/EnhancedList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void endSearching() throws IllegalAccessException {
3636
hasSearched = null;
3737
}
3838

39+
@SuppressWarnings("unchecked")
3940
public E searchByName(String name) throws IllegalAccessException {
4041
if (!searching)
4142
throw new IllegalAccessException("You need to invoke startSearching() first");

src/cn/rocket/deksrt/main/Entry.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.io.InputStream;
1515
import java.nio.file.Files;
1616
import java.util.ArrayList;
17+
import java.util.Objects;
1718
import java.util.Properties;
1819

1920
/**
@@ -25,7 +26,9 @@ public class Entry extends Application {
2526

2627
@Override
2728
public void start(Stage primaryStage) throws Exception {
28-
Parent root = FXMLLoader.load(getClass().getResource("/cn/rocket/deksrt/resource/MainWindow.fxml"));
29+
Parent root = FXMLLoader.load(Objects.requireNonNull(
30+
getClass().getResource("/cn/rocket/deksrt/resource/MainWindow.fxml")
31+
));
2932
primaryStage.setTitle("排座位");
3033
primaryStage.setResizable(false);
3134
primaryStage.setScene(new Scene(root, 720, 500));
@@ -42,6 +45,7 @@ private void detectUserFile() throws IOException {
4245
InputStream in = this.getClass().getResourceAsStream("/cn/rocket/deksrt/resource/templateOfStuInfo.xlsx");
4346
File out = new File(globalPath + "StuInfo.xlsx");
4447
if (!out.exists()) {
48+
assert in != null;
4549
Files.copy(in, out.toPath());
4650
} else {
4751
XSSFWorkbook wb = (XSSFWorkbook) WorkbookFactory.create(out);

src/cn/rocket/deksrt/main/MainWindow.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public class MainWindow {
4545
void initialize() throws IllegalAccessException {
4646
iod = null;
4747
try {
48-
iod = FXMLLoader.load(MainWindow.class.getResource("/cn/rocket/deksrt/resource/IOportDialog.fxml"));
48+
iod = FXMLLoader.load(Objects.requireNonNull(
49+
MainWindow.class.getResource("/cn/rocket/deksrt/resource/IOportDialog.fxml")
50+
));
4951
} catch (IOException e) {
5052
e.printStackTrace();
5153
}

0 commit comments

Comments
 (0)