From ce0d379497e0701c14b8135ba230c08caa25a1ee Mon Sep 17 00:00:00 2001 From: Autumn Lamonte Date: Thu, 29 Aug 2024 18:48:30 -0500 Subject: [PATCH] Update compile to JDK 24 --- build.xml | 3 +-- src/jexer/TApplication.java | 5 +++++ src/jexer/TButton.java | 1 + src/jexer/TCheckBox.java | 1 + src/jexer/TComboBox.java | 1 + src/jexer/TDesktop.java | 1 + src/jexer/TDirectoryList.java | 1 + src/jexer/TEditColorThemeWindow.java | 1 + src/jexer/TEditorWidget.java | 1 + src/jexer/TEditorWindow.java | 3 +++ src/jexer/TExceptionDialog.java | 1 + src/jexer/TField.java | 1 + src/jexer/TFileOpenBox.java | 1 + src/jexer/THelpWindow.java | 3 ++- src/jexer/TImage.java | 2 ++ src/jexer/TImageWindow.java | 1 + src/jexer/TInputBox.java | 1 + src/jexer/TLabel.java | 1 + src/jexer/TList.java | 1 + src/jexer/TMessageBox.java | 1 + src/jexer/TScreenOptionsWindow.java | 1 + src/jexer/TSplitPane.java | 1 + src/jexer/TStatusBar.java | 1 + src/jexer/TTableWidget.java | 2 ++ src/jexer/TTableWindow.java | 2 ++ src/jexer/TTerminalWidget.java | 2 ++ src/jexer/TTerminalWindow.java | 2 ++ src/jexer/TText.java | 1 + src/jexer/TTextPicture.java | 1 + src/jexer/TTextPictureWindow.java | 1 + src/jexer/TWidget.java | 2 ++ src/jexer/TWindow.java | 1 + src/jexer/backend/ECMA48Backend.java | 3 +++ src/jexer/backend/ECMA48Terminal.java | 3 +++ src/jexer/backend/HQSixelEncoder.java | 1 + src/jexer/backend/LegacySixelEncoder.java | 1 + src/jexer/backend/MultiBackend.java | 1 + src/jexer/backend/SwingBackend.java | 2 ++ src/jexer/backend/SwingComponent.java | 2 ++ src/jexer/backend/SwingTerminal.java | 2 ++ src/jexer/backend/TTYSessionInfo.java | 1 + src/jexer/backend/TWindowBackend.java | 4 ++++ src/jexer/bits/Cell.java | 1 + src/jexer/bits/CellAttributes.java | 1 + src/jexer/bits/ColorTheme.java | 1 + src/jexer/demos/DemoApplication.java | 4 ++++ src/jexer/demos/DemoEditorWindow.java | 1 + src/jexer/demos/DemoMainWindow.java | 2 ++ src/jexer/demos/DemoPixelsWindow.java | 1 + src/jexer/demos/DemoTableWindow.java | 1 + src/jexer/demos/DemoTextWindow.java | 1 + src/jexer/demos/DemoTreeViewWindow.java | 1 + src/jexer/demos/DesktopDemoApplication.java | 1 + src/jexer/help/THelpText.java | 1 + src/jexer/help/TParagraph.java | 1 + src/jexer/help/TWord.java | 1 + src/jexer/menu/TMenu.java | 1 + src/jexer/teditor/Document.java | 1 + src/jexer/teditor/Line.java | 1 + src/jexer/tterminal/ECMA48.java | 1 + src/jexer/ttree/TDirectoryTreeItem.java | 1 + src/jexer/ttree/TTreeItem.java | 1 + src/jexer/ttree/TTreeViewWidget.java | 1 + src/jexer/ttree/TTreeViewWindow.java | 1 + 64 files changed, 91 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 19fab6f..7ddd298 100644 --- a/build.xml +++ b/build.xml @@ -49,8 +49,7 @@ includeantruntime="false" debug="on" debuglevel="lines,vars,source" - target="1.7" - source="1.7" + release="8" > diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 2031138..67d2043 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -724,6 +724,7 @@ public class TApplication implements Runnable { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public TApplication(final BackendType backendType, final int windowWidth, final int windowHeight, final int fontSize) throws UnsupportedEncodingException { @@ -761,6 +762,7 @@ public class TApplication implements Runnable { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public TApplication(final BackendType backendType) throws UnsupportedEncodingException { @@ -805,6 +807,7 @@ public class TApplication implements Runnable { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public TApplication(final InputStream input, final OutputStream output) throws UnsupportedEncodingException { @@ -824,6 +827,7 @@ public class TApplication implements Runnable { * which uses System.in. * @throws IllegalArgumentException if input, reader, or writer are null. */ + @SuppressWarnings("this-escape") public TApplication(final InputStream input, final Reader reader, final PrintWriter writer, final boolean setRawMode) { @@ -852,6 +856,7 @@ public class TApplication implements Runnable { * * @param backend a Backend that is already ready to go. */ + @SuppressWarnings("this-escape") public TApplication(final Backend backend) { this.backend = backend; backend.setListener(this); diff --git a/src/jexer/TButton.java b/src/jexer/TButton.java index e31a0fb..60f0636 100644 --- a/src/jexer/TButton.java +++ b/src/jexer/TButton.java @@ -169,6 +169,7 @@ public class TButton extends TWidget { * @param x column relative to parent * @param y row relative to parent */ + @SuppressWarnings("this-escape") private TButton(final TWidget parent, final String text, final int x, final int y) { diff --git a/src/jexer/TCheckBox.java b/src/jexer/TCheckBox.java index 58998ce..6b31aef 100644 --- a/src/jexer/TCheckBox.java +++ b/src/jexer/TCheckBox.java @@ -96,6 +96,7 @@ public class TCheckBox extends TWidget { * @param checked initial check state * @param action the action to perform when the checkbox is toggled */ + @SuppressWarnings("this-escape") public TCheckBox(final TWidget parent, final int x, final int y, final String label, final boolean checked, final TAction action) { diff --git a/src/jexer/TComboBox.java b/src/jexer/TComboBox.java index 85c024c..4cf1219 100644 --- a/src/jexer/TComboBox.java +++ b/src/jexer/TComboBox.java @@ -90,6 +90,7 @@ public class TComboBox extends TWidget { * @param updateAction action to call when a new value is selected from * the list or enter is pressed in the edit field */ + @SuppressWarnings("this-escape") public TComboBox(final TWidget parent, final int x, final int y, final int width, final List values, final int valuesIndex, final int maxValuesHeight, final TAction updateAction) { diff --git a/src/jexer/TDesktop.java b/src/jexer/TDesktop.java index d44f617..1cb2145 100644 --- a/src/jexer/TDesktop.java +++ b/src/jexer/TDesktop.java @@ -61,6 +61,7 @@ public class TDesktop extends TWindow { * * @param parent parent application */ + @SuppressWarnings("this-escape") public TDesktop(final TApplication parent) { super(parent, "", 0, 0, parent.getScreen().getWidth(), parent.getDesktopBottom() - parent.getDesktopTop()); diff --git a/src/jexer/TDirectoryList.java b/src/jexer/TDirectoryList.java index c3badbd..4d24ed9 100644 --- a/src/jexer/TDirectoryList.java +++ b/src/jexer/TDirectoryList.java @@ -135,6 +135,7 @@ public class TDirectoryList extends TList { * (single-click) * @param filters a list of strings that files must match to be displayed */ + @SuppressWarnings("this-escape") public TDirectoryList(final TWidget parent, final String path, final int x, final int y, final int width, final int height, final TAction action, final TAction singleClickAction, final List filters) { diff --git a/src/jexer/TEditColorThemeWindow.java b/src/jexer/TEditColorThemeWindow.java index 052465c..f78637f 100644 --- a/src/jexer/TEditColorThemeWindow.java +++ b/src/jexer/TEditColorThemeWindow.java @@ -682,6 +682,7 @@ public class TEditColorThemeWindow extends TWindow { * * @param application the TApplication that manages this window */ + @SuppressWarnings("this-escape") public TEditColorThemeWindow(final TApplication application) { // Register with the TApplication diff --git a/src/jexer/TEditorWidget.java b/src/jexer/TEditorWidget.java index 0a86483..731bbe4 100644 --- a/src/jexer/TEditorWidget.java +++ b/src/jexer/TEditorWidget.java @@ -168,6 +168,7 @@ public class TEditorWidget extends TWidget implements EditMenuUser { * @param width width of text area * @param height height of text area */ + @SuppressWarnings("this-escape") public TEditorWidget(final TWidget parent, final String text, final int x, final int y, final int width, final int height) { diff --git a/src/jexer/TEditorWindow.java b/src/jexer/TEditorWindow.java index 9dbe446..92b2c66 100644 --- a/src/jexer/TEditorWindow.java +++ b/src/jexer/TEditorWindow.java @@ -96,6 +96,7 @@ public class TEditorWindow extends TScrollableWindow { * @param parent the main application * @param title the window title */ + @SuppressWarnings("this-escape") public TEditorWindow(final TApplication parent, final String title) { super(parent, title, 0, 0, parent.getScreen().getWidth(), @@ -112,6 +113,7 @@ public class TEditorWindow extends TScrollableWindow { * @param title the window title, usually a filename * @param contents the data for the editing window, usually the file data */ + @SuppressWarnings("this-escape") public TEditorWindow(final TApplication parent, final String title, final String contents) { @@ -130,6 +132,7 @@ public class TEditorWindow extends TScrollableWindow { * @param file the file to open * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public TEditorWindow(final TApplication parent, final File file) throws IOException { diff --git a/src/jexer/TExceptionDialog.java b/src/jexer/TExceptionDialog.java index 4f09728..15d223a 100644 --- a/src/jexer/TExceptionDialog.java +++ b/src/jexer/TExceptionDialog.java @@ -78,6 +78,7 @@ public class TExceptionDialog extends TWindow { * @param application TApplication that manages this window * @param exception the exception to display */ + @SuppressWarnings("this-escape") public TExceptionDialog(final TApplication application, final Throwable exception) { diff --git a/src/jexer/TField.java b/src/jexer/TField.java index ab9b24c..859871a 100644 --- a/src/jexer/TField.java +++ b/src/jexer/TField.java @@ -172,6 +172,7 @@ public class TField extends TWidget implements EditMenuUser { * @param enterAction function to call when enter key is pressed * @param updateAction function to call when the text is updated */ + @SuppressWarnings("this-escape") public TField(final TWidget parent, final int x, final int y, final int width, final boolean fixed, final String text, final TAction enterAction, final TAction updateAction) { diff --git a/src/jexer/TFileOpenBox.java b/src/jexer/TFileOpenBox.java index 2edf23c..ecdd28d 100644 --- a/src/jexer/TFileOpenBox.java +++ b/src/jexer/TFileOpenBox.java @@ -153,6 +153,7 @@ public class TFileOpenBox extends TWindow { * @param filters a list of strings that files must match to be displayed * @throws IOException of a java.io operation throws */ + @SuppressWarnings("this-escape") public TFileOpenBox(final TApplication application, final String path, final Type type, final List filters) throws IOException { diff --git a/src/jexer/THelpWindow.java b/src/jexer/THelpWindow.java index bb7acce..a264b75 100644 --- a/src/jexer/THelpWindow.java +++ b/src/jexer/THelpWindow.java @@ -97,7 +97,7 @@ public class THelpWindow extends TWindow { * @param topic the topic to start on */ public THelpWindow(final TApplication application, final String topic) { - this (application, application.helpFile.getTopic(topic)); + this(application, application.helpFile.getTopic(topic)); } /** @@ -106,6 +106,7 @@ public class THelpWindow extends TWindow { * @param application TApplication that manages this window * @param topic the topic to start on */ + @SuppressWarnings("this-escape") public THelpWindow(final TApplication application, final Topic topic) { super(application, i18n.getString("windowTitle"), 1, 1, 78, 22, CENTERED | RESIZABLE); diff --git a/src/jexer/TImage.java b/src/jexer/TImage.java index c2060aa..c76036d 100644 --- a/src/jexer/TImage.java +++ b/src/jexer/TImage.java @@ -206,6 +206,7 @@ public class TImage extends TWidget implements EditMenuUser { * @param top top row of the image. 0 is the top-most row. * @param clickAction function to call when mouse is pressed */ + @SuppressWarnings("this-escape") public TImage(final TWidget parent, final int x, final int y, final int width, final int height, final BufferedImage image, final int left, final int top, final TAction clickAction) { @@ -254,6 +255,7 @@ public class TImage extends TWidget implements EditMenuUser { * @param top top row of the image. 0 is the top-most row. * @param clickAction function to call when mouse is pressed */ + @SuppressWarnings("this-escape") public TImage(final TWidget parent, final int x, final int y, final int width, final int height, final Animation animation, final int left, final int top, final TAction clickAction) { diff --git a/src/jexer/TImageWindow.java b/src/jexer/TImageWindow.java index c633f81..43ad0ad 100644 --- a/src/jexer/TImageWindow.java +++ b/src/jexer/TImageWindow.java @@ -98,6 +98,7 @@ public class TImageWindow extends TScrollableWindow { * @param height height of window * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public TImageWindow(final TApplication parent, final File file, final int x, final int y, final int width, final int height) throws IOException { diff --git a/src/jexer/TInputBox.java b/src/jexer/TInputBox.java index 97727a4..e9a74c9 100644 --- a/src/jexer/TInputBox.java +++ b/src/jexer/TInputBox.java @@ -96,6 +96,7 @@ public class TInputBox extends TMessageBox { * @param text initial text to seed the field with * @param type one of the Type constants. Default is Type.OK. */ + @SuppressWarnings("this-escape") public TInputBox(final TApplication application, final String title, final String caption, final String text, final Type type) { diff --git a/src/jexer/TLabel.java b/src/jexer/TLabel.java index 5086c15..e6bf60d 100644 --- a/src/jexer/TLabel.java +++ b/src/jexer/TLabel.java @@ -153,6 +153,7 @@ public class TLabel extends TWidget { * @param useWindowBackground if true, use the window's background color * @param action to call when shortcut is pressed */ + @SuppressWarnings("this-escape") public TLabel(final TWidget parent, final String text, final int x, final int y, final String colorKey, final boolean useWindowBackground, final TAction action) { diff --git a/src/jexer/TList.java b/src/jexer/TList.java index 222824a..46a005b 100644 --- a/src/jexer/TList.java +++ b/src/jexer/TList.java @@ -154,6 +154,7 @@ public class TList extends TScrollableWidget { * @param singleClickAction action to perform when the user clicks on an * item */ + @SuppressWarnings("this-escape") public TList(final TWidget parent, final List strings, final int x, final int y, final int width, final int height, final TAction enterAction, final TAction moveAction, diff --git a/src/jexer/TMessageBox.java b/src/jexer/TMessageBox.java index 33ec5c6..f9af376 100644 --- a/src/jexer/TMessageBox.java +++ b/src/jexer/TMessageBox.java @@ -176,6 +176,7 @@ public class TMessageBox extends TWindow { * @param yield if true, yield this Thread. Subclasses need to set this * to false and yield at their end of their constructor intead. */ + @SuppressWarnings("this-escape") protected TMessageBox(final TApplication application, final String title, final String caption, final Type type, final boolean yield) { diff --git a/src/jexer/TScreenOptionsWindow.java b/src/jexer/TScreenOptionsWindow.java index c4417f3..be439d3 100644 --- a/src/jexer/TScreenOptionsWindow.java +++ b/src/jexer/TScreenOptionsWindow.java @@ -227,6 +227,7 @@ public class TScreenOptionsWindow extends TWindow { * * @param application the TApplication that manages this window */ + @SuppressWarnings("this-escape") public TScreenOptionsWindow(final TApplication application) { // Register with the TApplication diff --git a/src/jexer/TSplitPane.java b/src/jexer/TSplitPane.java index 1dec47b..fc6d61d 100644 --- a/src/jexer/TSplitPane.java +++ b/src/jexer/TSplitPane.java @@ -103,6 +103,7 @@ public class TSplitPane extends TWidget { * @param height height of widget * @param vertical if true, split vertically */ + @SuppressWarnings("this-escape") public TSplitPane(final TWidget parent, final int x, final int y, final int width, final int height, final boolean vertical) { diff --git a/src/jexer/TStatusBar.java b/src/jexer/TStatusBar.java index dce1332..437b9ec 100644 --- a/src/jexer/TStatusBar.java +++ b/src/jexer/TStatusBar.java @@ -130,6 +130,7 @@ public class TStatusBar extends TWidget { * @param window the window associated with this status bar * @param text text for the bar on the bottom row */ + @SuppressWarnings("this-escape") public TStatusBar(final TWindow window, final String text) { // TStatusBar is a parentless widget, because TApplication handles diff --git a/src/jexer/TTableWidget.java b/src/jexer/TTableWidget.java index 22bb20e..7dc04ce 100644 --- a/src/jexer/TTableWidget.java +++ b/src/jexer/TTableWidget.java @@ -395,6 +395,7 @@ public class TTableWidget extends TWidget { * @param column column index of this cell * @param row row index of this cell */ + @SuppressWarnings("this-escape") public Cell(final TTableWidget parent, final int x, final int y, final int width, final int height, final int column, final int row) { @@ -617,6 +618,7 @@ public class TTableWidget extends TWidget { * @param gridColumns number of columns in grid * @param gridRows number of rows in grid */ + @SuppressWarnings("this-escape") public TTableWidget(final TWidget parent, final int x, final int y, final int width, final int height, final int gridColumns, final int gridRows) { diff --git a/src/jexer/TTableWindow.java b/src/jexer/TTableWindow.java index adad1cd..2edfd66 100644 --- a/src/jexer/TTableWindow.java +++ b/src/jexer/TTableWindow.java @@ -73,6 +73,7 @@ public class TTableWindow extends TScrollableWindow { * @param parent the main application * @param title the window title */ + @SuppressWarnings("this-escape") public TTableWindow(final TApplication parent, final String title) { super(parent, title, 0, 0, parent.getScreen().getWidth() / 2, @@ -89,6 +90,7 @@ public class TTableWindow extends TScrollableWindow { * @param csvFile a File referencing the CSV data * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public TTableWindow(final TApplication parent, final File csvFile) throws IOException { diff --git a/src/jexer/TTerminalWidget.java b/src/jexer/TTerminalWidget.java index 4ab4848..ea4651a 100644 --- a/src/jexer/TTerminalWidget.java +++ b/src/jexer/TTerminalWidget.java @@ -228,6 +228,7 @@ public class TTerminalWidget extends TScrollableWidget * @param command the command line to execute * @param closeAction action to perform when the shell exits */ + @SuppressWarnings("this-escape") public TTerminalWidget(final TWidget parent, final int x, final int y, final int width, final int height, final String [] command, final TAction closeAction) { @@ -332,6 +333,7 @@ public class TTerminalWidget extends TScrollableWidget * @param height height of widget * @param closeAction action to perform when the shell exits */ + @SuppressWarnings("this-escape") public TTerminalWidget(final TWidget parent, final int x, final int y, final int width, final int height, final TAction closeAction) { diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 46989d9..52d5d7d 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -131,6 +131,7 @@ public class TTerminalWindow extends TScrollableWindow { * @param command the command line to execute * @param closeOnExit if true, close the window when the command exits */ + @SuppressWarnings("this-escape") public TTerminalWindow(final TApplication application, final int x, final int y, final int flags, final String [] command, final boolean closeOnExit) { @@ -199,6 +200,7 @@ public class TTerminalWindow extends TScrollableWindow { * @param flags mask of CENTERED, MODAL, or RESIZABLE * @param closeOnExit if true, close the window when the shell exits */ + @SuppressWarnings("this-escape") public TTerminalWindow(final TApplication application, final int x, final int y, final int flags, final boolean closeOnExit) { diff --git a/src/jexer/TText.java b/src/jexer/TText.java index 05f98e4..515c9e0 100644 --- a/src/jexer/TText.java +++ b/src/jexer/TText.java @@ -152,6 +152,7 @@ public class TText extends TScrollableWidget { * @param colorKey ColorTheme key color to use for foreground * text. Default is "ttext". */ + @SuppressWarnings("this-escape") public TText(final TWidget parent, final String text, final int x, final int y, final int width, final int height, final String colorKey) { diff --git a/src/jexer/TTextPicture.java b/src/jexer/TTextPicture.java index 8ee13ac..c8cd613 100644 --- a/src/jexer/TTextPicture.java +++ b/src/jexer/TTextPicture.java @@ -116,6 +116,7 @@ public class TTextPicture extends TScrollableWidget * @param width width of text area * @param height height of text area */ + @SuppressWarnings("this-escape") public TTextPicture(final TWidget parent, final String filename, final int x, final int y, final int width, final int height) { diff --git a/src/jexer/TTextPictureWindow.java b/src/jexer/TTextPictureWindow.java index 30c1cc6..95a5106 100644 --- a/src/jexer/TTextPictureWindow.java +++ b/src/jexer/TTextPictureWindow.java @@ -90,6 +90,7 @@ public class TTextPictureWindow extends TScrollableWindow { * @param height height of window * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public TTextPictureWindow(final TApplication parent, final String filename, final int x, final int y, final int width, final int height) throws IOException { diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index ff6948c..436d2c4 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -207,6 +207,7 @@ public abstract class TWidget implements Comparable { * @param parent parent widget * @param enabled if true assume enabled */ + @SuppressWarnings("this-escape") protected TWidget(final TWidget parent, final boolean enabled) { this.enabled = enabled; this.parent = parent; @@ -228,6 +229,7 @@ public abstract class TWidget implements Comparable { * @param width width of widget * @param height height of widget */ + @SuppressWarnings("this-escape") protected TWidget(final TWidget parent, final boolean enabled, final int x, final int y, final int width, final int height) { diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index 6f5c79f..f8c6747 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -317,6 +317,7 @@ public class TWindow extends TWidget { * @param height height of window * @param flags mask of RESIZABLE, CENTERED, or MODAL */ + @SuppressWarnings("this-escape") public TWindow(final TApplication application, final String title, final int x, final int y, final int width, final int height, final int flags) { diff --git a/src/jexer/backend/ECMA48Backend.java b/src/jexer/backend/ECMA48Backend.java index dd01060..1344211 100644 --- a/src/jexer/backend/ECMA48Backend.java +++ b/src/jexer/backend/ECMA48Backend.java @@ -77,6 +77,7 @@ public class ECMA48Backend extends GenericBackend { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public ECMA48Backend(final Object listener, final InputStream input, final OutputStream output, final int windowWidth, final int windowHeight, final int fontSize) @@ -131,6 +132,7 @@ public class ECMA48Backend extends GenericBackend { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public ECMA48Backend(final Object listener, final InputStream input, final OutputStream output, final boolean readOnly) throws UnsupportedEncodingException { @@ -162,6 +164,7 @@ public class ECMA48Backend extends GenericBackend { * which uses System.in. * @throws IllegalArgumentException if input, reader, or writer are null. */ + @SuppressWarnings("this-escape") public ECMA48Backend(final Object listener, final InputStream input, final Reader reader, final PrintWriter writer, final boolean setRawMode) { diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index ea1c77d..4971fe9 100644 --- a/src/jexer/backend/ECMA48Terminal.java +++ b/src/jexer/backend/ECMA48Terminal.java @@ -567,6 +567,7 @@ public class ECMA48Terminal extends LogicalScreen * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public ECMA48Terminal(final Backend backend, final Object listener, final InputStream input, final OutputStream output, final int windowWidth, @@ -606,6 +607,7 @@ public class ECMA48Terminal extends LogicalScreen * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public ECMA48Terminal(final Backend backend, final Object listener, final InputStream input, final OutputStream output) throws UnsupportedEncodingException { @@ -717,6 +719,7 @@ public class ECMA48Terminal extends LogicalScreen * which uses System.in. * @throws IllegalArgumentException if input, reader, or writer are null. */ + @SuppressWarnings("this-escape") public ECMA48Terminal(final Backend backend, final Object listener, final InputStream input, final Reader reader, final PrintWriter writer, final boolean setRawMode) { diff --git a/src/jexer/backend/HQSixelEncoder.java b/src/jexer/backend/HQSixelEncoder.java index 961f609..87d1d3d 100644 --- a/src/jexer/backend/HQSixelEncoder.java +++ b/src/jexer/backend/HQSixelEncoder.java @@ -1770,6 +1770,7 @@ public class HQSixelEncoder implements SixelEncoder { /** * Public constructor. */ + @SuppressWarnings("this-escape") public HQSixelEncoder() { reloadOptions(); } diff --git a/src/jexer/backend/LegacySixelEncoder.java b/src/jexer/backend/LegacySixelEncoder.java index ff1b964..065f317 100644 --- a/src/jexer/backend/LegacySixelEncoder.java +++ b/src/jexer/backend/LegacySixelEncoder.java @@ -775,6 +775,7 @@ public class LegacySixelEncoder implements SixelEncoder { /** * Public constructor. */ + @SuppressWarnings("this-escape") public LegacySixelEncoder() { reloadOptions(); } diff --git a/src/jexer/backend/MultiBackend.java b/src/jexer/backend/MultiBackend.java index e086799..511a556 100644 --- a/src/jexer/backend/MultiBackend.java +++ b/src/jexer/backend/MultiBackend.java @@ -70,6 +70,7 @@ public class MultiBackend implements Backend { * * @param backend the backend to add */ + @SuppressWarnings("this-escape") public MultiBackend(final Backend backend) { backends.add(backend); if (backend instanceof TWindowBackend) { diff --git a/src/jexer/backend/SwingBackend.java b/src/jexer/backend/SwingBackend.java index 858dc04..3bfa800 100644 --- a/src/jexer/backend/SwingBackend.java +++ b/src/jexer/backend/SwingBackend.java @@ -94,6 +94,7 @@ public class SwingBackend extends GenericBackend { * @param fontSize the size in points. Good values to pick are: 16, 20, * 22, and 24. */ + @SuppressWarnings("this-escape") public SwingBackend(final Object listener, final int windowWidth, final int windowHeight, final int fontSize) { @@ -120,6 +121,7 @@ public class SwingBackend extends GenericBackend { * @param fontSize the size in points. Good values to pick are: 16, 20, * 22, and 24. */ + @SuppressWarnings("this-escape") public SwingBackend(final JComponent component, final Object listener, final int windowWidth, final int windowHeight, final int fontSize) { diff --git a/src/jexer/backend/SwingComponent.java b/src/jexer/backend/SwingComponent.java index bf37fc4..3eefcee 100644 --- a/src/jexer/backend/SwingComponent.java +++ b/src/jexer/backend/SwingComponent.java @@ -94,6 +94,7 @@ public class SwingComponent { * * @param frame the JFrame to draw to */ + @SuppressWarnings("this-escape") public SwingComponent(final JFrame frame) { this.frame = frame; if (System.getProperty("os.name").startsWith("Linux")) { @@ -114,6 +115,7 @@ public class SwingComponent { * * @param component the JComponent to draw to */ + @SuppressWarnings("this-escape") public SwingComponent(final JComponent component) { this.component = component; adjustInsets = new Insets(BORDER, BORDER, BORDER, BORDER); diff --git a/src/jexer/backend/SwingTerminal.java b/src/jexer/backend/SwingTerminal.java index 76eb5d2..472667d 100644 --- a/src/jexer/backend/SwingTerminal.java +++ b/src/jexer/backend/SwingTerminal.java @@ -394,6 +394,7 @@ public class SwingTerminal extends LogicalScreen * @param listener the object this backend needs to wake up when new * input comes in */ + @SuppressWarnings("this-escape") public SwingTerminal(final Backend backend, final int windowWidth, final int windowHeight, final int fontSize, final Object listener) { @@ -523,6 +524,7 @@ public class SwingTerminal extends LogicalScreen * @param listener the object this backend needs to wake up when new * input comes in */ + @SuppressWarnings("this-escape") public SwingTerminal(final Backend backend, final JComponent component, final int windowWidth, final int windowHeight, final int fontSize, final Object listener) { diff --git a/src/jexer/backend/TTYSessionInfo.java b/src/jexer/backend/TTYSessionInfo.java index f9674f8..454d226 100644 --- a/src/jexer/backend/TTYSessionInfo.java +++ b/src/jexer/backend/TTYSessionInfo.java @@ -87,6 +87,7 @@ public class TTYSessionInfo implements SessionInfo { /** * Public constructor. */ + @SuppressWarnings("this-escape") public TTYSessionInfo() { // Populate lang and user from the environment username = System.getProperty("user.name"); diff --git a/src/jexer/backend/TWindowBackend.java b/src/jexer/backend/TWindowBackend.java index dd11cce..1b9aed4 100644 --- a/src/jexer/backend/TWindowBackend.java +++ b/src/jexer/backend/TWindowBackend.java @@ -160,6 +160,7 @@ public class TWindowBackend extends TWindow implements Backend { * @param width width of window * @param height height of window */ + @SuppressWarnings("this-escape") public TWindowBackend(final Object listener, final TApplication application, final String title, final int width, final int height) { @@ -186,6 +187,7 @@ public class TWindowBackend extends TWindow implements Backend { * @param height height of window * @param flags bitmask of RESIZABLE, CENTERED, or MODAL */ + @SuppressWarnings("this-escape") public TWindowBackend(final Object listener, final TApplication application, final String title, final int width, final int height, final int flags) { @@ -213,6 +215,7 @@ public class TWindowBackend extends TWindow implements Backend { * @param width width of window * @param height height of window */ + @SuppressWarnings("this-escape") public TWindowBackend(final Object listener, final TApplication application, final String title, final int x, final int y, final int width, final int height) { @@ -241,6 +244,7 @@ public class TWindowBackend extends TWindow implements Backend { * @param height height of window * @param flags mask of RESIZABLE, CENTERED, or MODAL */ + @SuppressWarnings("this-escape") public TWindowBackend(final Object listener, final TApplication application, final String title, final int x, final int y, final int width, final int height, diff --git a/src/jexer/bits/Cell.java b/src/jexer/bits/Cell.java index 8a64a5f..fc86204 100644 --- a/src/jexer/bits/Cell.java +++ b/src/jexer/bits/Cell.java @@ -167,6 +167,7 @@ public class Cell extends CellAttributes { * * @param cell the instance to copy */ + @SuppressWarnings("this-escape") public Cell(final Cell cell) { setTo(cell); } diff --git a/src/jexer/bits/CellAttributes.java b/src/jexer/bits/CellAttributes.java index 6c31731..8f4befa 100644 --- a/src/jexer/bits/CellAttributes.java +++ b/src/jexer/bits/CellAttributes.java @@ -149,6 +149,7 @@ public class CellAttributes { * @param that another CellAttributes instance * @see #reset() */ + @SuppressWarnings("this-escape") public CellAttributes(final CellAttributes that) { setTo(that); } diff --git a/src/jexer/bits/ColorTheme.java b/src/jexer/bits/ColorTheme.java index 1f52e2d..a91d42d 100644 --- a/src/jexer/bits/ColorTheme.java +++ b/src/jexer/bits/ColorTheme.java @@ -62,6 +62,7 @@ public class ColorTheme { /** * Public constructor sets the theme to the default. */ + @SuppressWarnings("this-escape") public ColorTheme() { colors = new TreeMap(); setDefaultTheme(); diff --git a/src/jexer/demos/DemoApplication.java b/src/jexer/demos/DemoApplication.java index f8e0b16..4880e33 100644 --- a/src/jexer/demos/DemoApplication.java +++ b/src/jexer/demos/DemoApplication.java @@ -80,6 +80,7 @@ public class DemoApplication extends TApplication { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public DemoApplication(final InputStream input, final OutputStream output) throws UnsupportedEncodingException { super(input, output); @@ -100,6 +101,7 @@ public class DemoApplication extends TApplication { * which uses System.in. * @throws IllegalArgumentException if input, reader, or writer are null. */ + @SuppressWarnings("this-escape") public DemoApplication(final InputStream input, final Reader reader, final PrintWriter writer, final boolean setRawMode) { super(input, reader, writer, setRawMode); @@ -128,6 +130,7 @@ public class DemoApplication extends TApplication { * * @param backend a Backend that is already ready to go. */ + @SuppressWarnings("this-escape") public DemoApplication(final Backend backend) { super(backend); @@ -140,6 +143,7 @@ public class DemoApplication extends TApplication { * @param backendType one of the TApplication.BackendType values * @throws Exception if TApplication can't instantiate the Backend. */ + @SuppressWarnings("this-escape") public DemoApplication(final BackendType backendType) throws Exception { // For the Swing demo, use an initial size of 82x28 so that a // terminal window precisely fits the window. diff --git a/src/jexer/demos/DemoEditorWindow.java b/src/jexer/demos/DemoEditorWindow.java index dcc4a52..e878b54 100644 --- a/src/jexer/demos/DemoEditorWindow.java +++ b/src/jexer/demos/DemoEditorWindow.java @@ -68,6 +68,7 @@ public class DemoEditorWindow extends TWindow { * @param title the text string * @param text the text string */ + @SuppressWarnings("this-escape") public DemoEditorWindow(final TApplication parent, final String title, final String text) { diff --git a/src/jexer/demos/DemoMainWindow.java b/src/jexer/demos/DemoMainWindow.java index 9fb32ab..b4191bd 100644 --- a/src/jexer/demos/DemoMainWindow.java +++ b/src/jexer/demos/DemoMainWindow.java @@ -114,6 +114,7 @@ public class DemoMainWindow extends TWindow { * * @param parent the main application */ + @SuppressWarnings("this-escape") public DemoMainWindow(final TApplication parent) { this(parent, CENTERED | RESIZABLE); } @@ -124,6 +125,7 @@ public class DemoMainWindow extends TWindow { * @param parent the main application * @param flags bitmask of MODAL, CENTERED, or RESIZABLE */ + @SuppressWarnings("this-escape") private DemoMainWindow(final TApplication parent, final int flags) { // Construct a demo window. X and Y don't matter because it will be // centered on screen. diff --git a/src/jexer/demos/DemoPixelsWindow.java b/src/jexer/demos/DemoPixelsWindow.java index 1b98491..ff325c3 100644 --- a/src/jexer/demos/DemoPixelsWindow.java +++ b/src/jexer/demos/DemoPixelsWindow.java @@ -101,6 +101,7 @@ public class DemoPixelsWindow extends TWindow { * * @param parent the main application */ + @SuppressWarnings("this-escape") public DemoPixelsWindow(final TApplication parent) { // Construct a demo window. X and Y don't matter because it will be // centered on screen. diff --git a/src/jexer/demos/DemoTableWindow.java b/src/jexer/demos/DemoTableWindow.java index f652e15..c58e079 100644 --- a/src/jexer/demos/DemoTableWindow.java +++ b/src/jexer/demos/DemoTableWindow.java @@ -67,6 +67,7 @@ public class DemoTableWindow extends TWindow { * @param parent the main application * @param title the text string */ + @SuppressWarnings("this-escape") public DemoTableWindow(final TApplication parent, final String title) { super(parent, title, 0, 0, 44, 22, RESIZABLE); diff --git a/src/jexer/demos/DemoTextWindow.java b/src/jexer/demos/DemoTextWindow.java index 646486f..deff31d 100644 --- a/src/jexer/demos/DemoTextWindow.java +++ b/src/jexer/demos/DemoTextWindow.java @@ -70,6 +70,7 @@ public class DemoTextWindow extends TWindow { * @param title the text string * @param text the text string */ + @SuppressWarnings("this-escape") public DemoTextWindow(final TApplication parent, final String title, final String text) { diff --git a/src/jexer/demos/DemoTreeViewWindow.java b/src/jexer/demos/DemoTreeViewWindow.java index 08513df..11ff4fa 100644 --- a/src/jexer/demos/DemoTreeViewWindow.java +++ b/src/jexer/demos/DemoTreeViewWindow.java @@ -69,6 +69,7 @@ public class DemoTreeViewWindow extends TWindow { * @param parent the main application * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public DemoTreeViewWindow(final TApplication parent) throws IOException { super(parent, i18n.getString("windowTitle"), 0, 0, 44, 16, TWindow.RESIZABLE); diff --git a/src/jexer/demos/DesktopDemoApplication.java b/src/jexer/demos/DesktopDemoApplication.java index cafdf33..6efdda5 100644 --- a/src/jexer/demos/DesktopDemoApplication.java +++ b/src/jexer/demos/DesktopDemoApplication.java @@ -59,6 +59,7 @@ public class DesktopDemoApplication extends TApplication { * @param backendType one of the TApplication.BackendType values * @throws Exception if TApplication can't instantiate the Backend. */ + @SuppressWarnings("this-escape") public DesktopDemoApplication(final BackendType backendType) throws Exception { super(backendType); addAllWidgets(); diff --git a/src/jexer/help/THelpText.java b/src/jexer/help/THelpText.java index 6011f5a..a462af9 100644 --- a/src/jexer/help/THelpText.java +++ b/src/jexer/help/THelpText.java @@ -79,6 +79,7 @@ public class THelpText extends TScrollableWidget { * @param width width of text area * @param height height of text area */ + @SuppressWarnings("this-escape") public THelpText(final THelpWindow parent, final Topic topic, final int x, final int y, final int width, final int height) { diff --git a/src/jexer/help/TParagraph.java b/src/jexer/help/TParagraph.java index f32b05c..d1603e4 100644 --- a/src/jexer/help/TParagraph.java +++ b/src/jexer/help/TParagraph.java @@ -67,6 +67,7 @@ public class TParagraph extends TWidget { * @param parent parent widget * @param words the pieces of the paragraph to display */ + @SuppressWarnings("this-escape") public TParagraph(final THelpText parent, final List words) { // Set parent and window diff --git a/src/jexer/help/TWord.java b/src/jexer/help/TWord.java index d36be92..5cd4ac3 100644 --- a/src/jexer/help/TWord.java +++ b/src/jexer/help/TWord.java @@ -69,6 +69,7 @@ public class TWord extends TWidget { * @param words the words to display * @param link link to other topic, or null */ + @SuppressWarnings("this-escape") public TWord(final String words, final Link link) { // TWord is created by THelpText before the TParagraph is belongs to diff --git a/src/jexer/menu/TMenu.java b/src/jexer/menu/TMenu.java index efcee57..fb1b304 100644 --- a/src/jexer/menu/TMenu.java +++ b/src/jexer/menu/TMenu.java @@ -180,6 +180,7 @@ public class TMenu extends TWindow { * shortcut (mnemonic), denoted by prefixing a letter with "&", * e.g. "&File" */ + @SuppressWarnings("this-escape") public TMenu(final TApplication parent, final int x, final int y, final String label) { diff --git a/src/jexer/teditor/Document.java b/src/jexer/teditor/Document.java index 697bda2..f9edf2f 100644 --- a/src/jexer/teditor/Document.java +++ b/src/jexer/teditor/Document.java @@ -103,6 +103,7 @@ public class Document { * @param str the text string * @param defaultColor the color for unhighlighted text */ + @SuppressWarnings("this-escape") public Document(final String str, final CellAttributes defaultColor) { this.defaultColor = defaultColor; diff --git a/src/jexer/teditor/Line.java b/src/jexer/teditor/Line.java index 7b305fe..fe4c835 100644 --- a/src/jexer/teditor/Line.java +++ b/src/jexer/teditor/Line.java @@ -88,6 +88,7 @@ public class Line { * @param defaultColor the color for unhighlighted text * @param highlighter the highlighter to use */ + @SuppressWarnings("this-escape") public Line(final String str, final CellAttributes defaultColor, final Highlighter highlighter) { diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 5c951f8..a589875 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -702,6 +702,7 @@ public class ECMA48 implements Runnable { * @throws UnsupportedEncodingException if an exception is thrown when * creating the InputStreamReader */ + @SuppressWarnings("this-escape") public ECMA48(final DeviceType type, final InputStream inputStream, final OutputStream outputStream, final DisplayListener displayListener, final Backend backend) throws UnsupportedEncodingException { diff --git a/src/jexer/ttree/TDirectoryTreeItem.java b/src/jexer/ttree/TDirectoryTreeItem.java index 63d5973..61e3e3f 100644 --- a/src/jexer/ttree/TDirectoryTreeItem.java +++ b/src/jexer/ttree/TDirectoryTreeItem.java @@ -83,6 +83,7 @@ public class TDirectoryTreeItem extends TTreeItem { * return the root path entry * @throws IOException if a java.io operation throws */ + @SuppressWarnings("this-escape") public TDirectoryTreeItem(final TTreeViewWidget view, final String text, final boolean expanded, final boolean openParents) throws IOException { diff --git a/src/jexer/ttree/TTreeItem.java b/src/jexer/ttree/TTreeItem.java index 503991f..7435a71 100644 --- a/src/jexer/ttree/TTreeItem.java +++ b/src/jexer/ttree/TTreeItem.java @@ -117,6 +117,7 @@ public class TTreeItem extends TWidget { * @param text text for this item * @param expanded if true, have it expanded immediately */ + @SuppressWarnings("this-escape") public TTreeItem(final TTreeView view, final String text, final boolean expanded) { diff --git a/src/jexer/ttree/TTreeViewWidget.java b/src/jexer/ttree/TTreeViewWidget.java index 7bbe1cf..b96bbd4 100644 --- a/src/jexer/ttree/TTreeViewWidget.java +++ b/src/jexer/ttree/TTreeViewWidget.java @@ -94,6 +94,7 @@ public class TTreeViewWidget extends TScrollableWidget { * @param height height of tree view * @param action action to perform when an item is selected */ + @SuppressWarnings("this-escape") public TTreeViewWidget(final TWidget parent, final int x, final int y, final int width, final int height, final TAction action) { diff --git a/src/jexer/ttree/TTreeViewWindow.java b/src/jexer/ttree/TTreeViewWindow.java index 651c701..02bf13e 100644 --- a/src/jexer/ttree/TTreeViewWindow.java +++ b/src/jexer/ttree/TTreeViewWindow.java @@ -100,6 +100,7 @@ public class TTreeViewWindow extends TScrollableWindow { * @param flags bitmask of RESIZABLE, CENTERED, or MODAL * @param action action to perform when an item is selected */ + @SuppressWarnings("this-escape") public TTreeViewWindow(final TApplication parent, final String title, final int x, final int y, final int width, final int height, final int flags, final TAction action) {