Преглед на файлове

Style fixes

Change-Id: I04161a813d1d25e632e5918ca1686157287125d7
Reviewed-on: http://gerrit.dmdirc.com/1330
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Chris Smith преди 14 години
родител
ревизия
ca87e1930b

+ 2
- 3
src/com/dmdirc/util/ConfigFile.java Целия файл

@@ -94,11 +94,10 @@ public class ConfigFile extends TextFile {
94 94
     /**
95 95
      * Reads the data from the file.
96 96
      * 
97
-     * @throws FileNotFoundException if the file is not found
98
-     * @throws IOException if an i/o exception occured when reading
97
+     * @throws IOException if an i/o exception occurred when reading
99 98
      * @throws InvalidConfigFileException if the config file isn't valid
100 99
      */
101
-    public void read() throws FileNotFoundException, IOException, InvalidConfigFileException {
100
+    public void read() throws IOException, InvalidConfigFileException {
102 101
         String domain = null;
103 102
         boolean keydomain = false;
104 103
         int offset;

+ 2
- 2
src/com/dmdirc/util/EquatableWeakReference.java Целия файл

@@ -46,8 +46,8 @@ public class EquatableWeakReference<T> extends WeakReference<T> {
46 46
     /** {@inheritDoc} */
47 47
     @Override
48 48
     public boolean equals(Object obj) {
49
-        if (obj instanceof Reference) {
50
-            return get().equals(((Reference) obj).get());
49
+        if (obj instanceof Reference<?>) {
50
+            return get().equals(((Reference<?>) obj).get());
51 51
         } else {
52 52
             return get().equals(obj);
53 53
         }

+ 1
- 8
src/com/dmdirc/util/ListenerList.java Целия файл

@@ -38,14 +38,7 @@ public class ListenerList {
38 38
     /** The map of class->listener or string->listener that we're using. */
39 39
     private final Map<Object, Collection<Object>> listeners
40 40
             = new HashMap<Object, Collection<Object>>();
41
-    
42
-    /**
43
-     * Creates a new instance of ListenerList.
44
-     */
45
-    public ListenerList() {
46
-        // Do nothing
47
-    }
48
-    
41
+       
49 42
     /**
50 43
      * Adds a new listener of the specified type to this listener list.
51 44
      * 

+ 6
- 1
src/com/dmdirc/util/StreamUtil.java Целия файл

@@ -31,7 +31,12 @@ import java.io.IOException;
31 31
  * @since 0.6.3m2
32 32
  * @author chris
33 33
  */
34
-public abstract class StreamUtil {
34
+public final class StreamUtil {
35
+    
36
+    /** Shouldn't be called. */
37
+    private StreamUtil() {
38
+        super();
39
+    }
35 40
 
36 41
     /**
37 42
      * Closes the stream if it is non-null, and ignores any IOExceptions

+ 0
- 7
src/com/dmdirc/util/WeakList.java Целия файл

@@ -41,13 +41,6 @@ public class WeakList<T> implements List<T> {
41 41
     /** The items in this list. */
42 42
     private final List<WeakReference<T>> list = new ArrayList<WeakReference<T>>();
43 43
 
44
-    /**
45
-     * Creates a new instance of WeakList.
46
-     */
47
-    public WeakList() {
48
-        super();
49
-    }
50
-
51 44
     /**
52 45
      * Removes any entries from the list that have been GC'd.
53 46
      */

+ 0
- 2
test/com/dmdirc/util/TextFileTest.java Целия файл

@@ -23,9 +23,7 @@
23 23
 package com.dmdirc.util;
24 24
 
25 25
 import java.io.File;
26
-import java.io.FileNotFoundException;
27 26
 import java.io.IOException;
28
-import java.net.URISyntaxException;
29 27
 import java.util.Arrays;
30 28
 import java.util.List;
31 29
 

Loading…
Отказ
Запис