Skip to content

Commit 11ec190

Browse files
committed
fix(demo): suppress this-escape compiler warnings in JavaFX panels
Add @SuppressWarnings("this-escape") to constructors that call getStyleClass().add() or setOnAction() before the object is fully initialized. This is safe in JavaFX as these methods only register callbacks without executing them during construction. Affected classes: - LogPanel.java (getStyleClass().add) - PDFViewerPanel.java (getStyleClass().add) - SemanticRouterPanel.java (setOnAction) - SettingsPanel.java (setContent)
1 parent 2a8b1b6 commit 11ec190

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/ui/LogPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class LogPanel extends BorderPane {
3434
/**
3535
* Creates the log panel.
3636
*/
37+
@SuppressWarnings("this-escape")
3738
public LogPanel() {
3839
getStyleClass().add("log-panel");
3940

demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/ui/PDFViewerPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class PDFViewerPanel extends BorderPane {
4040
private final StackPane placeholder;
4141
private final ScrollPane scrollPane;
4242

43+
@SuppressWarnings("this-escape")
4344
public PDFViewerPanel() {
4445
getStyleClass().add("pdf-viewer-panel");
4546

demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/ui/SemanticRouterPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public class SemanticRouterPanel extends ScrollPane {
8888
/**
8989
* Creates the semantic router panel with sample routes preloaded.
9090
*/
91+
@SuppressWarnings("this-escape")
9192
public SemanticRouterPanel() {
9293
VBox content = new VBox(12);
9394
content.setPadding(new Insets(16));

demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/ui/SettingsPanel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class SettingsPanel extends ScrollPane {
4949
/**
5050
* Creates the settings panel.
5151
*/
52+
@SuppressWarnings("this-escape")
5253
public SettingsPanel() {
5354
AppConfig config = AppConfig.getInstance();
5455

0 commit comments

Comments
 (0)