Add more warnings source to 1.6) and fix warnings
authorNiki Roo <niki@nikiroo.be>
Sat, 8 Jul 2017 04:25:53 +0000 (06:25 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 8 Jul 2017 04:25:53 +0000 (06:25 +0200)
15 files changed:
src/be/nikiroo/jvcard/Contact.java
src/be/nikiroo/jvcard/launcher/CardResult.java
src/be/nikiroo/jvcard/launcher/Main.java
src/be/nikiroo/jvcard/parsers/AbookParser.java
src/be/nikiroo/jvcard/parsers/Vcard21Parser.java
src/be/nikiroo/jvcard/remote/Server.java
src/be/nikiroo/jvcard/resources/StringId.java
src/be/nikiroo/jvcard/tui/ImageTextControl.java
src/be/nikiroo/jvcard/tui/KeyAction.java
src/be/nikiroo/jvcard/tui/MainWindow.java
src/be/nikiroo/jvcard/tui/UiColors.java
src/be/nikiroo/jvcard/tui/panes/ContactDetails.java
src/be/nikiroo/jvcard/tui/panes/FileList.java
src/be/nikiroo/jvcard/tui/panes/MainContent.java
src/be/nikiroo/jvcard/tui/panes/MainContentList.java

index 93bd809e49d185739dc496b706fe3fd6ed4a599f..6d362f9c9aed7675fe7fb292095d021848829b52 100644 (file)
@@ -131,7 +131,7 @@ public class Contact extends BaseClass<Data> {
         * @return the {@link String} representation
         */
        public String toString(String format, String separator) {
-               return toString(format, separator, null, -1, true, false);
+               return toString(format, separator, null, -1, true);
        }
 
        /**
@@ -173,14 +173,13 @@ public class Contact extends BaseClass<Data> {
         *            the {@link String} to use for left and right padding
         * @param width
         *            a fixed width or -1 for "as long as needed"
-        * 
         * @param unicode
-        *            allow Uniode or only ASCII characters
+        *            allow Unicode or only ASCII characters
         * 
         * @return the {@link String} representation
         */
        public String toString(String format, String separator, String padding,
-                       int width, boolean unicode, boolean removeAccents) {
+                       int width, boolean unicode) {
                StringBuilder builder = new StringBuilder();
 
                for (String str : toStringArray(format, separator, padding, width,
@@ -305,7 +304,7 @@ public class Contact extends BaseClass<Data> {
         *            a fixed width or -1 for "as long as needed"
         * @param unicode
         *            allow Uniode or only ASCII characters
-        *
+        * 
         * @return the {@link String} representation
         */
        public String[] toStringArray(String format, int width, boolean unicode) {
index 68a5ae747512bd986b0970f1675fb2e98b95638a..4a0afd6fa6ed5dc860fb5c7b59c3cd84bd89494e 100644 (file)
@@ -9,7 +9,7 @@ import be.nikiroo.jvcard.Card;
  * about it.
  * 
  * @author niki
- *
+ * 
  */
 public class CardResult {
        /**
@@ -17,7 +17,7 @@ public class CardResult {
         * synchronisation is not able to process fully automatically.
         * 
         * @author niki
-        *
+        * 
         */
        public interface MergeCallback {
                /**
@@ -59,6 +59,7 @@ public class CardResult {
         */
        public CardResult(Card card, boolean remote, boolean synced, boolean changed) {
                this.card = card;
+               this.remote = remote;
                this.synced = synced;
                this.changed = changed;
        }
index d893e101e710ede1013025beb47f424eb879becd..69ed7e9b4fb123e6dd855000603cd7c6ab677fce 100644 (file)
@@ -301,11 +301,10 @@ public class Main {
                                        ERR(StringId.CLI_ERR, StringId.CLI_ERR_NO_REMOTING,
                                                        ERR_INTERNAL);
                                        return;
-                               } else {
-                                       e.printStackTrace();
-                                       ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
-                                       return;
                                }
+                               e.printStackTrace();
+                               ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
+                               return;
                        }
                        break;
                }
@@ -415,11 +414,10 @@ public class Main {
                                if (!e.isCompiledIn()) {
                                        ERR(StringId.CLI_ERR, StringId.CLI_ERR_NO_TUI, ERR_INTERNAL);
                                        return;
-                               } else {
-                                       e.printStackTrace();
-                                       ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
-                                       return;
                                }
+                               e.printStackTrace();
+                               ERR(StringId.CLI_ERR, StringId.CLI_ERR, ERR_INTERNAL);
+                               return;
                        }
                        break;
                }
index b8e6e58e47c2187acf5fd80e8b3c046acacf6d33..fc4df3613f2af8e34947712cdcb0860217b9d168 100644 (file)
@@ -58,11 +58,12 @@ public class AbookParser {
         * 
         * @param startingBKey
         *            the starting BKey number (all the other will follow) or -1 for
-        *            no BKey
+        *            no BKey (it is actually not used in this mode)
         * 
         * @return the {@link String} representation
         */
-       public static List<String> toStrings(Contact contact, int startingBKey) {
+       public static List<String> toStrings(Contact contact,
+                       @SuppressWarnings("unused") int startingBKey) {
                // BKey is not used in pine mode
 
                StringBuilder builder = new StringBuilder();
index 5a07903ae8ca1a558abe78e64ec873ae91f76d5b..d6e607aac785bcf1f1b8740be9ab288ed36a8571 100644 (file)
@@ -161,15 +161,15 @@ public class Vcard21Parser {
         * @param contact
         *            the {@link Contact} to write
         * @param startingBKey
-        *            the starting BKey number (all the other will follow) or -1 for
-        *            no BKey
+        *            the starting BKey number (all the others will follow) or -1
+        *            for no BKey
         * 
         * @throws IOException
         *             in case of IO error
         */
        public static void write(Appendable writer, Contact contact,
                        int startingBKey) throws IOException {
-
+               // TODO: bkey handling?
                writer.append("BEGIN:VCARD\r\n");
                writer.append("VERSION:2.1\r\n");
                for (Data data : contact) {
index 30c404ca223cabcab710b13671ae99fa32cdf0f5..6cba0c33cbb09047ed09f4004f88266e9ee4193d 100644 (file)
@@ -131,8 +131,9 @@ public class Server implements Runnable {
                                                try {
                                                        ss.open(false);
 
-                                                       while (processCmd(ss))
-                                                               ;
+                                                       while (processCmd(ss)) {
+                                                               // nothing to do: process the command
+                                                       }
 
                                                } catch (IOException e) {
                                                        e.printStackTrace();
@@ -237,8 +238,9 @@ public class Server implements Runnable {
                                        try {
                                                s.sendLine(StringUtils.fromTime(file.lastModified()));
 
-                                               while (processLockedCmd(s, name))
-                                                       ;
+                                               while (processLockedCmd(s, name)) {
+                                                       // nothing to do: process the command
+                                               }
                                        } catch (InvalidParameterException e) {
                                                System.err
                                                                .println("Unsupported command received from a client connection, closing it: "
@@ -341,8 +343,9 @@ public class Server implements Runnable {
                        } else {
                                Card card = new Card(vcf, Format.VCard21);
                                try {
-                                       while (processContactCmd(s, card))
-                                               ;
+                                       while (processContactCmd(s, card)) {
+                                               // nothing to do: process the command
+                                       }
                                        card.save();
                                        s.sendLine(StringUtils.fromTime(card.getLastModified()));
                                } catch (InvalidParameterException e) {
@@ -435,8 +438,9 @@ public class Server implements Runnable {
                                throw new InvalidParameterException(
                                                "Cannot find contact to modify for UID: " + uid);
                        }
-                       while (processDataCmd(s, contact))
-                               ;
+                       while (processDataCmd(s, contact)) {
+                               // nothing to do: process the command
+                       }
                        break;
                }
                case DELETE_CONTACT: {
index fbbb1589c022fd3eb03e5d28ef8651114996b1a0..1b11e50593eee8b0740538d3b51df629aacb44ff 100644 (file)
@@ -2,7 +2,6 @@ package be.nikiroo.jvcard.resources;
 
 import be.nikiroo.utils.resources.Meta;
 
-
 /**
  * The enum representing textual information to be translated to the user as a
  * key.
@@ -17,112 +16,112 @@ public enum StringId {
        DUMMY, // <-- TODO : remove
        NULL, // Special usage, no annotations so it is not visible in
                        // .properties files
-       @Meta( info = "MUST BE 3 chars long", description = "Tab key")
+       @Meta(info = "MUST BE 3 chars long", description = "Tab key")
        KEY_TAB, // keys
-       @Meta( info = "MUST BE 3 chars long", description = "Enter key")
+       @Meta(info = "MUST BE 3 chars long", description = "Enter key")
        KEY_ENTER, //
-       @Meta(  description = "Go back to previous screen")
+       @Meta(description = "Go back to previous screen")
        KEY_ACTION_BACK, //
-       @Meta(  description = "Get help text")
+       @Meta(description = "Get help text")
        KEY_ACTION_HELP, //
-       @Meta(  description = "View the selected card")
+       @Meta(description = "View the selected card")
        KEY_ACTION_VIEW_CARD, //
-       @Meta(  description = "View the selected contact")
+       @Meta(description = "View the selected contact")
        KEY_ACTION_VIEW_CONTACT, //
-       @Meta(  description = "Edit the contact")
+       @Meta(description = "Edit the contact")
        KEY_ACTION_EDIT_CONTACT, //
-       @Meta(  description = "Edit the contact in RAW mode")
+       @Meta(description = "Edit the contact in RAW mode")
        KEY_ACTION_EDIT_CONTACT_RAW, //
-       @Meta(  description = "Edit the RAW field")
+       @Meta(description = "Edit the RAW field")
        KEY_ACTION_EDIT_FIELD, //
-       @Meta(  description = "Save the whole card")
+       @Meta(description = "Save the whole card")
        KEY_ACTION_SAVE_CARD, //
-       @Meta(  description = "Delete the selected element")
+       @Meta(description = "Delete the selected element")
        KEY_ACTION_DELETE, //
-       @Meta(  description = "Filter the displayed contacts")
+       @Meta(description = "Filter the displayed contacts")
        KEY_ACTION_SEARCH, //
-       @Meta( info = "we could use: ' ', â”ƒ, â”‚...", description = "Field separator")
+       @Meta(info = "we could use: ' ', â”ƒ, â”‚...", description = "Field separator")
        DEAULT_FIELD_SEPARATOR, // MainContentList
-       @Meta(  description = "Invert the photo's colours")
+       @Meta(description = "Invert the photo's colours")
        KEY_ACTION_INVERT, //
-       @Meta(  description = "Show the photo in 'fullscreen'")
+       @Meta(description = "Show the photo in 'fullscreen'")
        KEY_ACTION_FULLSCREEN, //
-       @Meta(  description = "Switch between the available display formats")
+       @Meta(description = "Switch between the available display formats")
        KEY_ACTION_SWITCH_FORMAT, // multi-usage
-       @Meta(  description = "Add a new contact/field")
+       @Meta(description = "Add a new contact/field")
        KEY_ACTION_ADD, //
-       @Meta(  description = "New contact")
+       @Meta(description = "New contact")
        ASK_USER_CONTACT_NAME, //
-       @Meta( info = "%s = contact name", description = "Delete contact")
+       @Meta(info = "%s = contact name", description = "Delete contact")
        CONFIRM_USER_DELETE_CONTACT, //
-       @Meta( info = "%s = contact name", description = "cannot delete a contact")
+       @Meta(info = "%s = contact name", description = "cannot delete a contact")
        ERR_CANNOT_DELETE_CONTACT, //
-       @Meta(  description = "The Help message header line")
+       @Meta(description = "The Help message header line")
        CLI_HELP, //
-       @Meta(  description = "The Help message line before explaining the different modes")
+       @Meta(description = "The Help message line before explaining the different modes")
        CLI_HELP_MODES, //
-       @Meta(  description = "The Help message line for help usage")
+       @Meta(description = "The Help message line for help usage")
        CLI_HELP_MODE_HELP, //
-       @Meta(  description = "The Help message line for contact manager usage")
+       @Meta(description = "The Help message line for contact manager usage")
        CLI_HELP_MODE_CONTACT_MANAGER, //
-       @Meta(  description = "The Help message line for contact manager usage")
+       @Meta(description = "The Help message line for contact manager usage")
        CLI_HELP_MODE_I18N, //
-       @Meta(  description = "The Help message line for jVCard server usage")
+       @Meta(description = "The Help message line for jVCard server usage")
        CLI_HELP_MODE_SERVER, //
-       @Meta(  description = "The Help message line for --load-photo usage")
+       @Meta(description = "The Help message line for --load-photo usage")
        CLI_HELP_MODE_LOAD_PHOTO, //
-       @Meta(  description = "The Help message line for --save-photo usage")
+       @Meta(description = "The Help message line for --save-photo usage")
        CLI_HELP_MODE_SAVE_PHOTO, //
-       @Meta(  description = "The Help message line for config save usage")
+       @Meta(description = "The Help message line for config save usage")
        CLI_HELP_MODE_SAVE_CONFIG, //
-       @Meta(  description = "The Help message line before the list of options")
+       @Meta(description = "The Help message line before the list of options")
        CLI_HELP_OPTIONS, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_DD, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_LANG, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_GUI, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_TUI, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_NOUTF_OPTION, //
-       @Meta(  description = "The Help message line for: --")
+       @Meta(description = "The Help message line for: --")
        CLI_HELP_CONFIG, //
-       @Meta(  description = "The Help message footer about files and jvcard:// links")
+       @Meta(description = "The Help message footer about files and jvcard:// links")
        CLI_HELP_FOOTER, //
-       @Meta( info = "%s = the error", description = "Syntax error: SOME TEXT")
+       @Meta(info = "%s = the error", description = "Syntax error: SOME TEXT")
        CLI_SERR, //
-       @Meta(  description = "More than one mode given")
+       @Meta(description = "More than one mode given")
        CLI_SERR_MODES, //
-       @Meta(  description = "--lang is required")
+       @Meta(description = "--lang is required")
        CLI_SERR_NOLANG, //
-       @Meta(  description = "The dir is required")
+       @Meta(description = "The dir is required")
        CLI_SERR_NODIR, //
-       @Meta(  description = "The port is required")
+       @Meta(description = "The port is required")
        CLI_SERR_NOPORT, //
-       @Meta(  description = "The format is required")
+       @Meta(description = "The format is required")
        CLI_SERR_NOFORMAT, //
-       @Meta( info = "%s = bad port", description = "The port is not valid")
+       @Meta(info = "%s = bad port", description = "The port is not valid")
        CLI_SERR_BADPORT, //
-       @Meta( info = "%s = mode", description = "Card files are not supported in mode %s")
+       @Meta(info = "%s = mode", description = "Card files are not supported in mode %s")
        CLI_SERR_CANNOT_CARDS, //
-       @Meta( info = "%s = the error", description = "Error: SOME TEXT")
+       @Meta(info = "%s = the error", description = "Error: SOME TEXT")
        CLI_ERR, //
-       @Meta(  description = "No files given")
+       @Meta(description = "No files given")
        CLI_ERR_NOFILES, //
-       @Meta( info = "%s = dir", description = "Cannot create conf dir %s")
+       @Meta(info = "%s = dir", description = "Cannot create conf dir %s")
        CLI_ERR_CANNOT_CREATE_CONFDIR, //
-       @Meta(  description = "Remoting not available")
+       @Meta(description = "Remoting not available")
        CLI_ERR_NO_REMOTING, //
-       @Meta(  description = "TUI not available")
+       @Meta(description = "TUI not available")
        CLI_ERR_NO_TUI, //
-       @Meta( info = "%s = dir", description = "Cannot create/update language in dir %s")
+       @Meta(info = "%s = dir", description = "Cannot create/update language in dir %s")
        CLI_ERR_CANNOT_CREATE_LANG, //
-       @Meta( info = "%s = card", description = "Cannot open card %s")
+       @Meta(info = "%s = card", description = "Cannot open card %s")
        CLI_ERR_CANNOT_OPEN, //
        @Meta(info = "%s = contact FN", description = "Cannot save photo of contact %s")
        CLI_ERR_CANNOT_SAVE_PHOTO, //
-       @Meta(  description = "Cannot start the program with the given cards")
+       @Meta(description = "Cannot start the program with the given cards")
        CLI_ERR_CANNOT_START, //
-};
+}
index 22621a39f7facf091c563f2fa84cee7e14b1f894..6a0a5ea2cf39da99e542186e47c3bfcd87565555 100644 (file)
@@ -90,7 +90,7 @@ public class ImageTextControl extends Panel {
                setImage(image);
 
                return this;
-       };
+       }
 
        /**
         * Set/reset the {@link ImageText} to render.
index 9a56cd952f30e08ed4f6243ce8bdd8e1aad27563..21e9dac77142444927b011c586b27f72b5d25f68 100644 (file)
@@ -241,6 +241,7 @@ public class KeyAction {
         * 
         * @return an error message if any
         */
+       @SuppressWarnings("unused")
        public String callback(String answer) {
                return null;
        }
index 39560a4c7a57d7ea766f47df05cb9a81abaed1ce..617d8a521eb692e17f103f56ddb9bf9f6ba0ab4f 100644 (file)
@@ -460,19 +460,16 @@ public class MainWindow extends BasicWindow {
                                UiColors.themeLabel(ColorOption.TITLE_VARIABLE, lblTitle);
                        }
 
-                       Label lblCount = null;
-                       if (countStr != null) {
-                               lblCount = new Label(countStr);
-                               UiColors.themeLabel(ColorOption.TITLE_COUNT, lblCount);
-                       }
+                       Label lblCount = new Label(countStr);
+                       UiColors.themeLabel(ColorOption.TITLE_COUNT, lblCount);
 
                        titlePanel.removeAllComponents();
 
                        titlePanel.addComponent(lblPrefix, BorderLayout.Location.LEFT);
-                       if (lblTitle != null)
+                       if (lblTitle != null) {
                                titlePanel.addComponent(lblTitle, BorderLayout.Location.CENTER);
-                       if (lblCount != null)
-                               titlePanel.addComponent(lblCount, BorderLayout.Location.RIGHT);
+                       }
+                       titlePanel.addComponent(lblCount, BorderLayout.Location.RIGHT);
                }
        }
 
index a851d4e5e18320a8a787082b6801eacde2a7278e..61bb69239d8d726d38cade740baf8cf1c91c869d 100644 (file)
@@ -3,7 +3,6 @@ package be.nikiroo.jvcard.tui;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Writer;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.MissingResourceException;
@@ -11,8 +10,6 @@ import java.util.Properties;
 
 import be.nikiroo.jvcard.resources.ColorBundle;
 import be.nikiroo.jvcard.resources.ColorOption;
-import be.nikiroo.jvcard.resources.Target;
-import be.nikiroo.utils.resources.Bundle;
 
 import com.googlecode.lanterna.TextColor;
 import com.googlecode.lanterna.graphics.PropertiesTheme;
index 9bab007ebfae7e383db2e623e0709b8f81c386c4..791d57c6944f801680c23523c430a88ec103dc5e 100644 (file)
@@ -116,22 +116,27 @@ public class ContactDetails extends MainContent {
 
                                boolean hl = false;
                                boolean all = false;
-                               if (info.contains("+") || info.contains("#"))
+                               if (info.contains("+") || info.contains("#")) {
                                        hl = true;
-                               if (info.contains("*") || info.contains("#"))
+                               }
+                               if (info.contains("*") || info.contains("#")) {
                                        all = true;
+                               }
 
                                if (all || hl || info.contains("=")) {
                                        ColorOption el = hl ? ColorOption.VIEW_CONTACT_HIGHLIGHT
                                                        : ColorOption.VIEW_CONTACT_NORMAL;
 
                                        int index = info.indexOf('=');
-                                       if (index < 0)
+                                       if (index < 0) {
                                                index = info.indexOf('+');
-                                       if (index < 0)
+                                       }
+                                       if (index < 0) {
                                                index = info.indexOf('#');
-                                       if (index < 0)
+                                       }
+                                       if (index < 0) {
                                                index = info.indexOf('*');
+                                       }
 
                                        String label = info.substring(0, index);
                                        String field = info.substring(index + 1);
@@ -152,8 +157,9 @@ public class ContactDetails extends MainContent {
                                                }
                                        } else {
                                                String val = contact.getPreferredDataValue(field);
-                                               if (val == null)
+                                               if (val == null) {
                                                        val = "";
+                                               }
                                                infoPanel.addComponent(UiColors.createLabel(el,
                                                                StringUtils.padString(label, labelSize) + val));
                                        }
@@ -170,8 +176,9 @@ public class ContactDetails extends MainContent {
                                        ColorOption.VIEW_CONTACT_NORMAL, ""));
 
                        String notes = contact.getPreferredDataValue("NOTE");
-                       if (notes == null)
+                       if (notes == null) {
                                notes = "";
+                       }
                        note.setText(notes);
 
                        Data photo = contact.getPreferredData("PHOTO");
@@ -188,7 +195,6 @@ public class ContactDetails extends MainContent {
 
                                if (encoding != null && encoding.getValue() != null
                                                && encoding.getValue().equalsIgnoreCase("b")) {
-
                                        try {
                                                image = ImageUtils.fromBase64(photo.getValue());
                                        } catch (Exception e) {
@@ -270,15 +276,17 @@ public class ContactDetails extends MainContent {
        private void setImage(Image image) {
                this.image = image;
 
-               if (txtImage != null && top.containsComponent(txtImage))
+               if (txtImage != null && top.containsComponent(txtImage)) {
                        top.removeComponent(txtImage);
+               }
 
                TerminalSize size = getTxtSize();
                if (size != null) {
-                       if (txtImage != null)
+                       if (txtImage != null) {
                                txtImage.setSize(size);
-                       else
+                       } else {
                                txtImage = new ImageTextControl(image, size);
+                       }
                }
 
                if (size != null) {
@@ -299,15 +307,16 @@ public class ContactDetails extends MainContent {
                                && getSize().getRows() > 0) {
                        if (fullscreenImage) {
                                return getSize();
-                       } else {
-                               // TODO: configure size?
-                               int w = getSize().getColumns() - 40;
-                               int h = getSize().getRows() - 9;
-                               if (w <= 0 || h <= 0)
-                                       return null;
+                       }
 
-                               return new TerminalSize(w, h);
+                       // TODO: configure size?
+                       int w = getSize().getColumns() - 40;
+                       int h = getSize().getRows() - 9;
+                       if (w <= 0 || h <= 0) {
+                               return null;
                        }
+
+                       return new TerminalSize(w, h);
                }
 
                return null;
index 1172378d0ecb79cd1fc033c3458073cc0994755c..55f85cc6cd3a5d58047616a01bbdb259b3532785 100644 (file)
@@ -96,7 +96,7 @@ public class FileList extends MainContentList {
                parts.add(new TextPart(name, el));
 
                return parts;
-       };
+       }
 
        @Override
        public List<KeyAction> getKeyBindings() {
index 0d873daa26287010a46183d84c001544b3601e93..c63afd9b47ef2da4dd919f1fac5ab6791d917e61 100644 (file)
@@ -75,6 +75,7 @@ abstract public class MainContent extends Panel {
         * 
         * @return the error message to display if any
         */
+       @SuppressWarnings("unused")
        public String move(int x, int y) {
                return null;
        }
index 1b0eb1b08154586379246dba15db99d4afe175dc..f7aaec4373c9c50a03f60e655933310c156d093d 100644 (file)
@@ -88,6 +88,7 @@ abstract public class MainContentList extends MainContent implements Runnable {
                         *            Will be set to {@code true} if the list box currently
                         *            has input focus, otherwise {@code false}
                         */
+                       @Override
                        public void drawItem(TextGUIGraphics graphics,
                                        ActionListBox listBox, int index, Runnable item,
                                        boolean selected, boolean focused) {
@@ -225,7 +226,8 @@ abstract public class MainContentList extends MainContent implements Runnable {
         * 
         * @return the text representation
         */
-       protected List<TextPart> getLabel(int index, int width, boolean selected,
+       protected List<TextPart> getLabel(int index,
+                       @SuppressWarnings("unused") int width, boolean selected,
                        boolean focused) {
                List<TextPart> parts = new LinkedList<TextPart>();