Переглянути джерело

Make all the things final.

Change-Id: I0c128522391d4de8452c603fae89d260c1a34ec2
Reviewed-on: http://gerrit.dmdirc.com/3836
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
pull/1/head
Chris Smith 9 роки тому
джерело
коміт
693264fb86
34 змінених файлів з 51 додано та 51 видалено
  1. 1
    1
      src/com/dmdirc/Main.java
  2. 1
    1
      src/com/dmdirc/ServerManager.java
  3. 1
    1
      src/com/dmdirc/ServerStatus.java
  4. 4
    4
      src/com/dmdirc/actions/Action.java
  5. 1
    1
      src/com/dmdirc/actions/ActionSubstitutor.java
  6. 1
    1
      src/com/dmdirc/actions/ConditionTree.java
  7. 2
    2
      src/com/dmdirc/actions/metatypes/ActionEvents.java
  8. 2
    2
      src/com/dmdirc/actions/metatypes/ChannelEvents.java
  9. 2
    2
      src/com/dmdirc/actions/metatypes/ClientEvents.java
  10. 2
    2
      src/com/dmdirc/actions/metatypes/LinkEvents.java
  11. 2
    2
      src/com/dmdirc/actions/metatypes/PluginEvents.java
  12. 2
    2
      src/com/dmdirc/actions/metatypes/QueryEvents.java
  13. 2
    2
      src/com/dmdirc/actions/metatypes/ServerEvents.java
  14. 1
    1
      src/com/dmdirc/commandline/RemoteServer.java
  15. 1
    1
      src/com/dmdirc/commandparser/PopupManager.java
  16. 1
    1
      src/com/dmdirc/commandparser/commands/flags/CommandFlagHandler.java
  17. 1
    1
      src/com/dmdirc/commandparser/commands/global/Help.java
  18. 1
    1
      src/com/dmdirc/commandparser/commands/global/OpenWindow.java
  19. 2
    2
      src/com/dmdirc/config/BaseConfigProvider.java
  20. 1
    1
      src/com/dmdirc/config/ConfigFileBackedConfigProvider.java
  21. 1
    1
      src/com/dmdirc/config/ConfigManager.java
  22. 1
    1
      src/com/dmdirc/config/IdentityManager.java
  23. 1
    1
      src/com/dmdirc/events/ChannelDisplayableUserEvent.java
  24. 1
    1
      src/com/dmdirc/events/PluginEvent.java
  25. 2
    2
      src/com/dmdirc/logger/ErrorLevel.java
  26. 1
    1
      src/com/dmdirc/logger/ErrorManager.java
  27. 2
    2
      src/com/dmdirc/plugins/PluginClassLoader.java
  28. 3
    3
      src/com/dmdirc/plugins/PluginInfo.java
  29. 1
    1
      src/com/dmdirc/plugins/PluginMetaData.java
  30. 1
    1
      src/com/dmdirc/ui/input/AdditionalTabTargets.java
  31. 2
    2
      src/com/dmdirc/ui/messages/ColourManager.java
  32. 2
    2
      src/com/dmdirc/util/URIParser.java
  33. 1
    1
      src/com/dmdirc/util/resourcemanager/DMDircResourceManager.java
  34. 1
    1
      src/com/dmdirc/util/resourcemanager/ResourceManager.java

+ 1
- 1
src/com/dmdirc/Main.java Переглянути файл

158
         }
158
         }
159
 
159
 
160
         try {
160
         try {
161
-            ClientModule clientModule = new ClientModule();
161
+            final ClientModule clientModule = new ClientModule();
162
             final ObjectGraph graph = ObjectGraph.create(clientModule);
162
             final ObjectGraph graph = ObjectGraph.create(clientModule);
163
             clientModule.setObjectGraph(graph);
163
             clientModule.setObjectGraph(graph);
164
 
164
 

+ 1
- 1
src/com/dmdirc/ServerManager.java Переглянути файл

245
         if (server.getState().isDisconnected()) {
245
         if (server.getState().isDisconnected()) {
246
             server.connect(uri, profile);
246
             server.connect(uri, profile);
247
         } else {
247
         } else {
248
-            Collection<? extends ChannelJoinRequest> joinRequests =
248
+            final Collection<? extends ChannelJoinRequest> joinRequests =
249
                     server.getParser().extractChannels(uri);
249
                     server.getParser().extractChannels(uri);
250
             server.join(joinRequests.toArray(new ChannelJoinRequest[joinRequests.size()]));
250
             server.join(joinRequests.toArray(new ChannelJoinRequest[joinRequests.size()]));
251
         }
251
         }

+ 1
- 1
src/com/dmdirc/ServerStatus.java Переглянути файл

42
     /** The current state of the server. */
42
     /** The current state of the server. */
43
     private ServerState state = ServerState.DISCONNECTED;
43
     private ServerState state = ServerState.DISCONNECTED;
44
     /** A history of transactions for debugging purposes. */
44
     /** A history of transactions for debugging purposes. */
45
-    private RollingList<String> history = new RollingList<>(10);
45
+    private final RollingList<String> history = new RollingList<>(10);
46
     /** A list of known parser hashcodes. */
46
     /** A list of known parser hashcodes. */
47
     private final List<Integer> parsers = new ArrayList<>();
47
     private final List<Integer> parsers = new ArrayList<>();
48
 
48
 

+ 4
- 4
src/com/dmdirc/actions/Action.java Переглянути файл

425
      * @return True if the condition is valid, false otherwise
425
      * @return True if the condition is valid, false otherwise
426
      */
426
      */
427
     private boolean readCondition(final Map<String, String> data) {
427
     private boolean readCondition(final Map<String, String> data) {
428
-        int arg;
428
+        final int arg;
429
         ActionComponent component = null;
429
         ActionComponent component = null;
430
-        ActionComparison comparison;
431
-        String target;
430
+        final ActionComparison comparison;
431
+        final String target;
432
         String starget = null;
432
         String starget = null;
433
 
433
 
434
         // ------ Read the argument
434
         // ------ Read the argument
502
      */
502
      */
503
     private ActionComponent readComponent(final Map<String, String> data, final int arg) {
503
     private ActionComponent readComponent(final Map<String, String> data, final int arg) {
504
         final String componentName = data.get("component");
504
         final String componentName = data.get("component");
505
-        ActionComponent component;
505
+        final ActionComponent component;
506
 
506
 
507
         if (componentName.indexOf('.') == -1) {
507
         if (componentName.indexOf('.') == -1) {
508
             component = actionController.getComponent(componentName);
508
             component = actionController.getComponent(componentName);

+ 1
- 1
src/com/dmdirc/actions/ActionSubstitutor.java Переглянути файл

243
                     ? new CommandArguments(commandController, (String) args[2])
243
                     ? new CommandArguments(commandController, (String) args[2])
244
                     : new CommandArguments(commandController, Arrays.asList((String[]) args[2]));
244
                     : new CommandArguments(commandController, Arrays.asList((String[]) args[2]));
245
 
245
 
246
-            int start;
246
+            final int start;
247
             int end;
247
             int end;
248
 
248
 
249
             start = end = Integer.parseInt(numberMatcher.group(1)) - 1;
249
             start = end = Integer.parseInt(numberMatcher.group(1)) - 1;

+ 1
- 1
src/com/dmdirc/actions/ConditionTree.java Переглянути файл

257
                 final ConditionTree third = readTerm(myStack);
257
                 final ConditionTree third = readTerm(myStack);
258
 
258
 
259
                 if (third != null && second instanceof Character) {
259
                 if (third != null && second instanceof Character) {
260
-                    OPERATION op;
260
+                    final OPERATION op;
261
 
261
 
262
                     if ((Character) second == '&') {
262
                     if ((Character) second == '&') {
263
                         op = OPERATION.AND;
263
                         op = OPERATION.AND;

+ 2
- 2
src/com/dmdirc/actions/metatypes/ActionEvents.java Переглянути файл

36
     /** Action event type. */
36
     /** Action event type. */
37
     ACTION_DELETED(new String[]{"Action group", "Action name"}, ActionGroup.class, String.class);
37
     ACTION_DELETED(new String[]{"Action group", "Action name"}, ActionGroup.class, String.class);
38
     /** The names of the arguments for this meta type. */
38
     /** The names of the arguments for this meta type. */
39
-    private String[] argNames;
39
+    private final String[] argNames;
40
     /** The classes of the arguments for this meta type. */
40
     /** The classes of the arguments for this meta type. */
41
-    private Class<?>[] argTypes;
41
+    private final Class<?>[] argTypes;
42
 
42
 
43
     /**
43
     /**
44
      * Creates a new instance of this meta-type.
44
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/ChannelEvents.java Переглянути файл

60
     CHANNEL_SOURCED_EVENT_WITH_VICTIM(new String[]{"channel", "user", "victim", "message"},
60
     CHANNEL_SOURCED_EVENT_WITH_VICTIM(new String[]{"channel", "user", "victim", "message"},
61
             Channel.class, ChannelClientInfo.class, ChannelClientInfo.class, String.class);
61
             Channel.class, ChannelClientInfo.class, ChannelClientInfo.class, String.class);
62
     /** The names of the arguments for this meta type. */
62
     /** The names of the arguments for this meta type. */
63
-    private String[] argNames;
63
+    private final String[] argNames;
64
     /** The classes of the arguments for this meta type. */
64
     /** The classes of the arguments for this meta type. */
65
-    private Class<?>[] argTypes;
65
+    private final Class<?>[] argTypes;
66
 
66
 
67
     /**
67
     /**
68
      * Creates a new instance of this meta-type.
68
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/ClientEvents.java Переглянути файл

65
     UNKNOWN_COMMAND(new String[]{"source", "command", "arguments"}, FrameContainer.class,
65
     UNKNOWN_COMMAND(new String[]{"source", "command", "arguments"}, FrameContainer.class,
66
             String.class, String[].class);
66
             String.class, String[].class);
67
     /** The names of the arguments for this meta type. */
67
     /** The names of the arguments for this meta type. */
68
-    private String[] argNames;
68
+    private final String[] argNames;
69
     /** The classes of the arguments for this meta type. */
69
     /** The classes of the arguments for this meta type. */
70
-    private Class<?>[] argTypes;
70
+    private final Class<?>[] argTypes;
71
 
71
 
72
     /**
72
     /**
73
      * Creates a new instance of this meta-type.
73
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/LinkEvents.java Переглянути файл

37
     /** Nickname link clicked. */
37
     /** Nickname link clicked. */
38
     NICKNAME_CLICKED(new String[]{"Window", "Nickname"}, Window.class, String.class);
38
     NICKNAME_CLICKED(new String[]{"Window", "Nickname"}, Window.class, String.class);
39
     /** The names of the arguments for this meta type. */
39
     /** The names of the arguments for this meta type. */
40
-    private String[] argNames;
40
+    private final String[] argNames;
41
     /** The classes of the arguments for this meta type. */
41
     /** The classes of the arguments for this meta type. */
42
-    private Class<?>[] argTypes;
42
+    private final Class<?>[] argTypes;
43
 
43
 
44
     /**
44
     /**
45
      * Creates a new instance of this meta-type.
45
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/PluginEvents.java Переглянути файл

33
     /** Plugin event type. */
33
     /** Plugin event type. */
34
     PLUGIN_EVENT(new String[]{"plugin"}, PluginInfo.class);
34
     PLUGIN_EVENT(new String[]{"plugin"}, PluginInfo.class);
35
     /** The names of the arguments for this meta type. */
35
     /** The names of the arguments for this meta type. */
36
-    private String[] argNames;
36
+    private final String[] argNames;
37
     /** The classes of the arguments for this meta type. */
37
     /** The classes of the arguments for this meta type. */
38
-    private Class<?>[] argTypes;
38
+    private final Class<?>[] argTypes;
39
 
39
 
40
     /**
40
     /**
41
      * Creates a new instance of this meta-type.
41
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/QueryEvents.java Переглянути файл

39
     QUERY_SOURCED_EVENT_WITH_ARG(new String[]{"query", "source", "message"}, Query.class,
39
     QUERY_SOURCED_EVENT_WITH_ARG(new String[]{"query", "source", "message"}, Query.class,
40
             ClientInfo.class, String.class);
40
             ClientInfo.class, String.class);
41
     /** The names of the arguments for this meta type. */
41
     /** The names of the arguments for this meta type. */
42
-    private String[] argNames;
42
+    private final String[] argNames;
43
     /** The classes of the arguments for this meta type. */
43
     /** The classes of the arguments for this meta type. */
44
-    private Class<?>[] argTypes;
44
+    private final Class<?>[] argTypes;
45
 
45
 
46
     /**
46
     /**
47
      * Creates a new instance of this meta-type.
47
      * Creates a new instance of this meta-type.

+ 2
- 2
src/com/dmdirc/actions/metatypes/ServerEvents.java Переглянути файл

56
     /** Server event type. */
56
     /** Server event type. */
57
     SERVER_EVENT(new String[]{"server"}, Connection.class);
57
     SERVER_EVENT(new String[]{"server"}, Connection.class);
58
     /** The names of the arguments for this meta type. */
58
     /** The names of the arguments for this meta type. */
59
-    private String[] argNames;
59
+    private final String[] argNames;
60
     /** The classes of the arguments for this meta type. */
60
     /** The classes of the arguments for this meta type. */
61
-    private Class<?>[] argTypes;
61
+    private final Class<?>[] argTypes;
62
 
62
 
63
     /**
63
     /**
64
      * Creates a new instance of this meta-type.
64
      * Creates a new instance of this meta-type.

+ 1
- 1
src/com/dmdirc/commandline/RemoteServer.java Переглянути файл

68
      * Binds to the RMI registry so that other clients may find this remote server.
68
      * Binds to the RMI registry so that other clients may find this remote server.
69
      */
69
      */
70
     public void bind() {
70
     public void bind() {
71
-        RemoteInterface stub;
71
+        final RemoteInterface stub;
72
 
72
 
73
         try {
73
         try {
74
             stub = (RemoteInterface) UnicastRemoteObject.exportObject(this, 0);
74
             stub = (RemoteInterface) UnicastRemoteObject.exportObject(this, 0);

+ 1
- 1
src/com/dmdirc/commandparser/PopupManager.java Переглянути файл

103
      */
103
      */
104
     private PopupMenuItem getItem(final String item,
104
     private PopupMenuItem getItem(final String item,
105
             final PopupType type, final AggregateConfigProvider configManager) {
105
             final PopupType type, final AggregateConfigProvider configManager) {
106
-        PopupMenuItem res;
106
+        final PopupMenuItem res;
107
 
107
 
108
         if ("-".equals(item)) {
108
         if ("-".equals(item)) {
109
             res = new PopupMenuItem(commandController);
109
             res = new PopupMenuItem(commandController);

+ 1
- 1
src/com/dmdirc/commandparser/commands/flags/CommandFlagHandler.java Переглянути файл

103
         int offset;
103
         int offset;
104
         for (offset = 0; offset < arguments.getArguments().length; offset++) {
104
         for (offset = 0; offset < arguments.getArguments().length; offset++) {
105
             final String arg = arguments.getArguments()[offset];
105
             final String arg = arguments.getArguments()[offset];
106
-            String name;
106
+            final String name;
107
 
107
 
108
             if (arg.startsWith("--")
108
             if (arg.startsWith("--")
109
                     && flags.containsKey(name = arg.substring(2).toLowerCase())) {
109
                     && flags.containsKey(name = arg.substring(2).toLowerCase())) {

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/Help.java Переглянути файл

120
      */
120
      */
121
     private void showCommand(final FrameContainer origin, final boolean isSilent,
121
     private void showCommand(final FrameContainer origin, final boolean isSilent,
122
             final String name) {
122
             final String name) {
123
-        Map.Entry<CommandInfo, Command> command;
123
+        final Map.Entry<CommandInfo, Command> command;
124
 
124
 
125
         if (name.length() > 0 && name.charAt(0) == getController().getCommandChar()) {
125
         if (name.length() > 0 && name.charAt(0) == getController().getCommandChar()) {
126
             command = getController().getCommand(name.substring(1));
126
             command = getController().getCommand(name.substring(1));

+ 1
- 1
src/com/dmdirc/commandparser/commands/global/OpenWindow.java Переглянути файл

122
                     ? args.getArgumentsAsString(start + 1) : args.getArguments()[start];
122
                     ? args.getArgumentsAsString(start + 1) : args.getArguments()[start];
123
 
123
 
124
             if (window == null) {
124
             if (window == null) {
125
-                CustomWindow newWindow;
125
+                final CustomWindow newWindow;
126
                 if (parent == null) {
126
                 if (parent == null) {
127
                     newWindow = new CustomWindow(args.getArguments()[start], title,
127
                     newWindow = new CustomWindow(args.getArguments()[start], title,
128
                             configProvider, urlBuilder, eventBus);
128
                             configProvider, urlBuilder, eventBus);

+ 2
- 2
src/com/dmdirc/config/BaseConfigProvider.java Переглянути файл

75
     @Override
75
     @Override
76
     public boolean hasOptionString(final String domain, final String option,
76
     public boolean hasOptionString(final String domain, final String option,
77
             final Validator<String> validator) {
77
             final Validator<String> validator) {
78
-        String value;
78
+        final String value;
79
 
79
 
80
         return hasOption(domain, option, validator)
80
         return hasOption(domain, option, validator)
81
                 && !(value = getOption(domain, option, validator)).isEmpty()
81
                 && !(value = getOption(domain, option, validator)).isEmpty()
101
     public String getOptionString(final String domain, final String option,
101
     public String getOptionString(final String domain, final String option,
102
             final boolean required, final Validator<String> validator,
102
             final boolean required, final Validator<String> validator,
103
             final String... fallbacks) {
103
             final String... fallbacks) {
104
-        String value;
104
+        final String value;
105
 
105
 
106
         final Validator<String> newValidator = required && fallbacks.length == 0
106
         final Validator<String> newValidator = required && fallbacks.length == 0
107
                 ? ValidatorChain.<String>builder().addValidator(
107
                 ? ValidatorChain.<String>builder().addValidator(

+ 1
- 1
src/com/dmdirc/config/ConfigFileBackedConfigProvider.java Переглянути файл

313
     @Override
313
     @Override
314
     public void setOption(final String domain, final String option,
314
     public void setOption(final String domain, final String option,
315
             final String value) {
315
             final String value) {
316
-        String oldValue;
316
+        final String oldValue;
317
         boolean unset = false;
317
         boolean unset = false;
318
 
318
 
319
         synchronized (this) {
319
         synchronized (this) {

+ 1
- 1
src/com/dmdirc/config/ConfigManager.java Переглянути файл

246
      * @return True if the identity applies, false otherwise
246
      * @return True if the identity applies, false otherwise
247
      */
247
      */
248
     public boolean identityApplies(final ConfigProvider identity) {
248
     public boolean identityApplies(final ConfigProvider identity) {
249
-        String comp;
249
+        final String comp;
250
 
250
 
251
         switch (identity.getTarget().getType()) {
251
         switch (identity.getTarget().getType()) {
252
             case PROTOCOL:
252
             case PROTOCOL:

+ 1
- 1
src/com/dmdirc/config/IdentityManager.java Переглянути файл

690
      * @param configManager The manager to be initialised.
690
      * @param configManager The manager to be initialised.
691
      */
691
      */
692
     private void setUpConfigManager(final ConfigManager configManager) {
692
     private void setUpConfigManager(final ConfigManager configManager) {
693
-        List<ConfigProvider> sources = getIdentitiesForManager(configManager);
693
+        final List<ConfigProvider> sources = getIdentitiesForManager(configManager);
694
 
694
 
695
         for (ConfigProvider identity : sources) {
695
         for (ConfigProvider identity : sources) {
696
             log.trace("Found {}", identity);
696
             log.trace("Found {}", identity);

+ 1
- 1
src/com/dmdirc/events/ChannelDisplayableUserEvent.java Переглянути файл

51
     }
51
     }
52
 
52
 
53
     @Override
53
     @Override
54
-    public void setDisplayFormat(String format) {
54
+    public void setDisplayFormat(final String format) {
55
         this.displayFormatRef.set(format);
55
         this.displayFormatRef.set(format);
56
     }
56
     }
57
 
57
 

+ 1
- 1
src/com/dmdirc/events/PluginEvent.java Переглянути файл

29
  */
29
  */
30
 public abstract class PluginEvent extends DMDircEvent {
30
 public abstract class PluginEvent extends DMDircEvent {
31
 
31
 
32
-    private PluginInfo plugin;
32
+    private final PluginInfo plugin;
33
 
33
 
34
     public PluginEvent(final PluginInfo plugin) {
34
     public PluginEvent(final PluginInfo plugin) {
35
         this.plugin = plugin;
35
         this.plugin = plugin;

+ 2
- 2
src/com/dmdirc/logger/ErrorLevel.java Переглянути файл

36
     /** Unknown priority error. */
36
     /** Unknown priority error. */
37
     UNKNOWN("Unknown", "info");
37
     UNKNOWN("Unknown", "info");
38
     /** Error level string. */
38
     /** Error level string. */
39
-    private String value;
39
+    private final String value;
40
     /** Error level icon. */
40
     /** Error level icon. */
41
-    private String icon;
41
+    private final String icon;
42
 
42
 
43
     /**
43
     /**
44
      * Instantiates the enum.
44
      * Instantiates the enum.

+ 1
- 1
src/com/dmdirc/logger/ErrorManager.java Переглянути файл

247
      * @return True if a duplicate error has already been registered, false otherwise
247
      * @return True if a duplicate error has already been registered, false otherwise
248
      */
248
      */
249
     protected boolean addError(final ProgramError error) {
249
     protected boolean addError(final ProgramError error) {
250
-        int index;
250
+        final int index;
251
 
251
 
252
         synchronized (errors) {
252
         synchronized (errors) {
253
             index = errors.indexOf(error);
253
             index = errors.indexOf(error);

+ 2
- 2
src/com/dmdirc/plugins/PluginClassLoader.java Переглянути файл

117
             }
117
             }
118
         }
118
         }
119
 
119
 
120
-        ResourceManager res;
120
+        final ResourceManager res;
121
         try {
121
         try {
122
             res = pluginInfo.getResourceManager();
122
             res = pluginInfo.getResourceManager();
123
         } catch (IOException ioe) {
123
         } catch (IOException ioe) {
151
         }
151
         }
152
 
152
 
153
         // We are meant to be loading this one!
153
         // We are meant to be loading this one!
154
-        byte[] data;
154
+        final byte[] data;
155
         if (res.resourceExists(fileName)) {
155
         if (res.resourceExists(fileName)) {
156
             data = res.getResourceBytes(fileName);
156
             data = res.getResourceBytes(fileName);
157
         } else {
157
         } else {

+ 3
- 3
src/com/dmdirc/plugins/PluginInfo.java Переглянути файл

121
         this.filename = new File(metadata.getPluginUrl().getPath()).getName();
121
         this.filename = new File(metadata.getPluginUrl().getPath()).getName();
122
         this.metaData = metadata;
122
         this.metaData = metadata;
123
 
123
 
124
-        ResourceManager res;
124
+        final ResourceManager res;
125
 
125
 
126
         try {
126
         try {
127
             res = getResourceManager();
127
             res = getResourceManager();
222
         if (metaData.getParent() != null) {
222
         if (metaData.getParent() != null) {
223
             final PluginInfo parentInfo = metaData.getManager()
223
             final PluginInfo parentInfo = metaData.getManager()
224
                     .getPluginInfoByName(metaData.getParent());
224
                     .getPluginInfoByName(metaData.getParent());
225
-            Plugin parent = parentInfo.getPlugin();
226
-            ObjectGraph parentGraph = parent.getObjectGraph();
225
+            final Plugin parent = parentInfo.getPlugin();
226
+            final ObjectGraph parentGraph = parent.getObjectGraph();
227
             if (parentGraph != null) {
227
             if (parentGraph != null) {
228
                 return parentGraph;
228
                 return parentGraph;
229
             }
229
             }

+ 1
- 1
src/com/dmdirc/plugins/PluginMetaData.java Переглянути файл

111
     /** The URL to load the metadata from. */
111
     /** The URL to load the metadata from. */
112
     private final URL url;
112
     private final URL url;
113
     /** The parent plugin manager. */
113
     /** The parent plugin manager. */
114
-    private PluginManager manager;
114
+    private final PluginManager manager;
115
 
115
 
116
     /**
116
     /**
117
      * Creates a new meta data reader for a config file at the specified URL.
117
      * Creates a new meta data reader for a config file at the specified URL.

+ 1
- 1
src/com/dmdirc/ui/input/AdditionalTabTargets.java Переглянути файл

35
     /** A version number for this class. */
35
     /** A version number for this class. */
36
     private static final long serialVersionUID = 1;
36
     private static final long serialVersionUID = 1;
37
     /** Whether to include normal targets. */
37
     /** Whether to include normal targets. */
38
-    private List<TabCompletionType> includes = new ArrayList<>(Arrays.asList(TabCompletionType.
38
+    private final List<TabCompletionType> includes = new ArrayList<>(Arrays.asList(TabCompletionType.
39
             values()));
39
             values()));
40
 
40
 
41
     /**
41
     /**

+ 2
- 2
src/com/dmdirc/ui/messages/ColourManager.java Переглянути файл

49
     /** Config manager to read settings from. */
49
     /** Config manager to read settings from. */
50
     private final AggregateConfigProvider configManager;
50
     private final AggregateConfigProvider configManager;
51
     /** Actual colours we're using for the 16 IRC colours. */
51
     /** Actual colours we're using for the 16 IRC colours. */
52
-    private Colour[] ircColours = DEFAULT_COLOURS.clone();
52
+    private final Colour[] ircColours = DEFAULT_COLOURS.clone();
53
 
53
 
54
     /**
54
     /**
55
      * Creates a new instance of {@link ColourManager}.
55
      * Creates a new instance of {@link ColourManager}.
149
             return Colour.WHITE;
149
             return Colour.WHITE;
150
         }
150
         }
151
 
151
 
152
-        Colour colour;
152
+        final Colour colour;
153
         try {
153
         try {
154
             colour = new Colour(
154
             colour = new Colour(
155
                     Integer.parseInt(hex.substring(0, 2), 16),
155
                     Integer.parseInt(hex.substring(0, 2), 16),

+ 2
- 2
src/com/dmdirc/util/URIParser.java Переглянути файл

70
         final String authority;
70
         final String authority;
71
         final String host;
71
         final String host;
72
         final String portString;
72
         final String portString;
73
-        int port;
73
+        final int port;
74
         final String path;
74
         final String path;
75
         final String query;
75
         final String query;
76
         final String fragment;
76
         final String fragment;
133
         }
133
         }
134
 
134
 
135
         boolean ssl = false;
135
         boolean ssl = false;
136
-        String host;
136
+        final String host;
137
         String pass = null;
137
         String pass = null;
138
         int port = -1;
138
         int port = -1;
139
 
139
 

+ 1
- 1
src/com/dmdirc/util/resourcemanager/DMDircResourceManager.java Переглянути файл

53
         final CodeSource codeSource = Main.class.getProtectionDomain().getCodeSource();
53
         final CodeSource codeSource = Main.class.getProtectionDomain().getCodeSource();
54
         try {
54
         try {
55
             final File jarFile = new File(codeSource.getLocation().toURI().getPath());
55
             final File jarFile = new File(codeSource.getLocation().toURI().getPath());
56
-            String jarDir;
56
+            final String jarDir;
57
             if (isRunningFromJar()) {
57
             if (isRunningFromJar()) {
58
                 jarDir = jarFile.getParentFile().getPath();
58
                 jarDir = jarFile.getParentFile().getPath();
59
             } else {
59
             } else {

+ 1
- 1
src/com/dmdirc/util/resourcemanager/ResourceManager.java Переглянути файл

132
             return false;
132
             return false;
133
         }
133
         }
134
 
134
 
135
-        File newDir;
135
+        final File newDir;
136
 
136
 
137
         if (usePath && resourceName.indexOf('/') > -1) {
137
         if (usePath && resourceName.indexOf('/') > -1) {
138
             newDir = new File(directory,
138
             newDir = new File(directory,

Завантаження…
Відмінити
Зберегти