Browse Source

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 years ago
parent
commit
ca87e1930b

+ 2
- 3
src/com/dmdirc/util/ConfigFile.java View File

94
     /**
94
     /**
95
      * Reads the data from the file.
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
      * @throws InvalidConfigFileException if the config file isn't valid
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
         String domain = null;
101
         String domain = null;
103
         boolean keydomain = false;
102
         boolean keydomain = false;
104
         int offset;
103
         int offset;

+ 2
- 2
src/com/dmdirc/util/EquatableWeakReference.java View File

46
     /** {@inheritDoc} */
46
     /** {@inheritDoc} */
47
     @Override
47
     @Override
48
     public boolean equals(Object obj) {
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
         } else {
51
         } else {
52
             return get().equals(obj);
52
             return get().equals(obj);
53
         }
53
         }

+ 1
- 8
src/com/dmdirc/util/ListenerList.java View File

38
     /** The map of class->listener or string->listener that we're using. */
38
     /** The map of class->listener or string->listener that we're using. */
39
     private final Map<Object, Collection<Object>> listeners
39
     private final Map<Object, Collection<Object>> listeners
40
             = new HashMap<Object, Collection<Object>>();
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
      * Adds a new listener of the specified type to this listener list.
43
      * Adds a new listener of the specified type to this listener list.
51
      * 
44
      * 

+ 6
- 1
src/com/dmdirc/util/StreamUtil.java View File

31
  * @since 0.6.3m2
31
  * @since 0.6.3m2
32
  * @author chris
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
      * Closes the stream if it is non-null, and ignores any IOExceptions
42
      * Closes the stream if it is non-null, and ignores any IOExceptions

+ 0
- 7
src/com/dmdirc/util/WeakList.java View File

41
     /** The items in this list. */
41
     /** The items in this list. */
42
     private final List<WeakReference<T>> list = new ArrayList<WeakReference<T>>();
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
      * Removes any entries from the list that have been GC'd.
45
      * Removes any entries from the list that have been GC'd.
53
      */
46
      */

+ 0
- 2
test/com/dmdirc/util/TextFileTest.java View File

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

Loading…
Cancel
Save