summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog41
-rw-r--r--java/awt/Button.java2
-rw-r--r--java/awt/EventDispatchThread.java4
-rw-r--r--java/awt/Frame.java2
-rw-r--r--java/awt/Panel.java2
-rw-r--r--java/awt/Scrollbar.java2
-rw-r--r--java/awt/TextArea.java2
-rw-r--r--java/io/ObjectInputStream.java2
-rw-r--r--java/lang/reflect/Proxy.java2
-rw-r--r--java/net/HttpURLConnection.java2
-rw-r--r--java/security/IdentityScope.java2
-rw-r--r--java/security/Policy.java2
-rw-r--r--java/util/Timer.java2
-rw-r--r--java/util/logging/LogRecord.java2
-rw-r--r--java/util/zip/ZipEntry.java8
-rw-r--r--javax/naming/spi/NamingManager.java4
-rw-r--r--javax/swing/JDialog.java2
-rw-r--r--javax/swing/JFrame.java2
-rw-r--r--javax/swing/plaf/basic/BasicScrollBarUI.java10
-rw-r--r--javax/swing/plaf/basic/BasicToolBarUI.java4
20 files changed, 70 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 37610c6b5..0832b0b67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2004-10-11 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/awt/EventDispatchThread.java
+ (dispatchThreadNum): Removed initializer.
+ (EventDispatchThread): Pre-increment dispatchThreadNum.
+ * java/awt/Button.java
+ (next_button_number): Removed useless initializer.
+ * java/awt/Frame.java
+ (next_frame_number): Likewise.
+ * java/awt/Scrollbar.java
+ (next_scrollbar_number): Likewise.
+ * java/awt/TextArea.java
+ (next_text_number): Likewise.
+ * java/io/ObjectInputStream.java
+ (dump): Likewise.
+ * java/lang/reflect/Proxy.java
+ (count): Likewise.
+ * java/security/IdentityScope.java
+ (systemScope): Likewise.
+ * java/security/Policy.java
+ (currentPolicy): Likewise.
+ * java/util/Timer.java
+ (nr): Likewise.
+ * java/util/logging/LogRecord.java
+ (lastSeqNum): Likewise.
+ * javax/naming/spi/NamingManager.java
+ (icfb, ofb): Likewise.
+ * javax/swing/JDialog.java
+ (decorated): Likewise.
+ * javax/swing/JFrame.java
+ (defaultLookAndFeelDecorated): Likewise.
+ * javax/swing/plaf/basic/BasicToolBarUI.java
+ (offset, regular): Made final.
+ * javax/swing/plaf/basic/BasicScrollBarUI.java
+ (DECREASE_HIGHLIGHT, INCREASE_HIGHLIGHT, NO_HIGHLIGHT,
+ POSITIVE_SCROLL, NEGATIVE_SCROLL): Made final.
+ * java/util/zip/ZipEntry.java
+ (KNOWN_SIZE, KNOWN_CSIZE, KNOWN_CRC, KNOWN_TIME): Made final.
+ * java/net/HttpURLConnection.java
+ (valid_methods): Made final.
+
2004-10-11 Michael Koch <konqueror@gmx.de>
* java/io/DataInputStream.java
diff --git a/java/awt/Button.java b/java/awt/Button.java
index 0bb5766db..295a0d093 100644
--- a/java/awt/Button.java
+++ b/java/awt/Button.java
@@ -84,7 +84,7 @@ private transient ActionListener action_listeners;
/*
* The number used to generate the name returned by getName.
*/
- private static transient long next_button_number = 0;
+ private static transient long next_button_number;
/*************************************************************************/
diff --git a/java/awt/EventDispatchThread.java b/java/awt/EventDispatchThread.java
index 097cc001b..0803ff675 100644
--- a/java/awt/EventDispatchThread.java
+++ b/java/awt/EventDispatchThread.java
@@ -43,14 +43,14 @@ package java.awt;
*/
class EventDispatchThread extends Thread
{
- private static int dispatchThreadNum = 1;
+ private static int dispatchThreadNum;
private EventQueue queue;
EventDispatchThread(EventQueue queue)
{
super();
- setName("AWT-EventQueue-" + dispatchThreadNum++);
+ setName("AWT-EventQueue-" + ++dispatchThreadNum);
this.queue = queue;
setPriority(NORM_PRIORITY + 1);
start();
diff --git a/java/awt/Frame.java b/java/awt/Frame.java
index 42d85bc79..eeedf6519 100644
--- a/java/awt/Frame.java
+++ b/java/awt/Frame.java
@@ -199,7 +199,7 @@ private String title = "";
/*
* The number used to generate the name returned by getName.
*/
- private static transient long next_frame_number = 0;
+ private static transient long next_frame_number;
/**
* Initializes a new instance of <code>Frame</code> that is not visible
diff --git a/java/awt/Panel.java b/java/awt/Panel.java
index 1795540ea..1ba9fbd24 100644
--- a/java/awt/Panel.java
+++ b/java/awt/Panel.java
@@ -73,7 +73,7 @@ public class Panel extends Container implements Accessible
/*
* The number used to generate the name returned by getName.
*/
- private static transient long next_panel_number = 0;
+ private static transient long next_panel_number;
/**
* Initializes a new instance of <code>Panel</code> that has a default
diff --git a/java/awt/Scrollbar.java b/java/awt/Scrollbar.java
index d09a1682a..022dd09a3 100644
--- a/java/awt/Scrollbar.java
+++ b/java/awt/Scrollbar.java
@@ -125,7 +125,7 @@ private transient boolean valueIsAdjusting = false;
/*
* The number used to generate the name returned by getName.
*/
- private static transient long next_scrollbar_number = 0;
+ private static transient long next_scrollbar_number;
/*************************************************************************/
diff --git a/java/awt/TextArea.java b/java/awt/TextArea.java
index ad246dede..8f763ce63 100644
--- a/java/awt/TextArea.java
+++ b/java/awt/TextArea.java
@@ -101,7 +101,7 @@ public class TextArea extends TextComponent implements java.io.Serializable
/*
* The number used to generate the name returned by getName.
*/
- private static transient long next_text_number = 0;
+ private static transient long next_text_number;
/**
* Initialize a new instance of <code>TextArea</code> that is empty.
diff --git a/java/io/ObjectInputStream.java b/java/io/ObjectInputStream.java
index 3b3680522..ecaf4bc62 100644
--- a/java/io/ObjectInputStream.java
+++ b/java/io/ObjectInputStream.java
@@ -1850,7 +1850,7 @@ public class ObjectInputStream extends InputStream
private Hashtable classLookupTable;
private GetField prereadFields;
- private static boolean dump = false && Configuration.DEBUG;
+ private static boolean dump;
// The nesting depth for debugging output
private int depth = 0;
diff --git a/java/lang/reflect/Proxy.java b/java/lang/reflect/Proxy.java
index 66373c579..a917ae3e0 100644
--- a/java/lang/reflect/Proxy.java
+++ b/java/lang/reflect/Proxy.java
@@ -754,7 +754,7 @@ public class Proxy implements Serializable
/**
* For unique id's
*/
- private static int count = 0;
+ private static int count;
/**
* The id of this proxy class
diff --git a/java/net/HttpURLConnection.java b/java/net/HttpURLConnection.java
index e603d2b92..aef3173d0 100644
--- a/java/net/HttpURLConnection.java
+++ b/java/net/HttpURLConnection.java
@@ -291,7 +291,7 @@ public abstract class HttpURLConnection extends URLConnection
/**
* This is a list of valid request methods, separated by "|" characters.
*/
- private static String valid_methods =
+ private static final String valid_methods =
"|GET|POST|HEAD|OPTIONS|PUT|DELETE|TRACE|";
// Instance Variables
diff --git a/java/security/IdentityScope.java b/java/security/IdentityScope.java
index 5965a00a1..004f4ee4e 100644
--- a/java/security/IdentityScope.java
+++ b/java/security/IdentityScope.java
@@ -71,7 +71,7 @@ import java.util.Enumeration;
public abstract class IdentityScope extends Identity
{
private static final long serialVersionUID = -2337346281189773310L;
- private static IdentityScope systemScope = null;
+ private static IdentityScope systemScope;
/**
* This constructor is used for serialization only and should not be used by
diff --git a/java/security/Policy.java b/java/security/Policy.java
index 47171cff3..88f2e43d9 100644
--- a/java/security/Policy.java
+++ b/java/security/Policy.java
@@ -95,7 +95,7 @@ import java.util.Map;
*/
public abstract class Policy
{
- static private Policy currentPolicy = null;
+ static private Policy currentPolicy;
/** Map of ProtectionDomains to PermissionCollections for this instance. */
private Map pd2pc = null;
diff --git a/java/util/Timer.java b/java/util/Timer.java
index 928cd9b5d..cfc05157a 100644
--- a/java/util/Timer.java
+++ b/java/util/Timer.java
@@ -376,7 +376,7 @@ public class Timer
// Number of Timers created.
// Used for creating nice Thread names.
- private static int nr = 0;
+ private static int nr;
// The queue that all the tasks are put in.
// Given to the scheduler
diff --git a/java/util/logging/LogRecord.java b/java/util/logging/LogRecord.java
index 9fd6cd878..40b2b72ba 100644
--- a/java/util/logging/LogRecord.java
+++ b/java/util/logging/LogRecord.java
@@ -384,7 +384,7 @@ public class LogRecord
/**
* The last used sequence number for any LogRecord.
*/
- private static long lastSeqNum = 0;
+ private static long lastSeqNum;
/**
diff --git a/java/util/zip/ZipEntry.java b/java/util/zip/ZipEntry.java
index aa14bd27e..fd265086e 100644
--- a/java/util/zip/ZipEntry.java
+++ b/java/util/zip/ZipEntry.java
@@ -51,10 +51,10 @@ import java.util.Date;
*/
public class ZipEntry implements ZipConstants, Cloneable
{
- private static int KNOWN_SIZE = 1;
- private static int KNOWN_CSIZE = 2;
- private static int KNOWN_CRC = 4;
- private static int KNOWN_TIME = 8;
+ private static final int KNOWN_SIZE = 1;
+ private static final int KNOWN_CSIZE = 2;
+ private static final int KNOWN_CRC = 4;
+ private static final int KNOWN_TIME = 8;
private static Calendar cal;
diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java
index 4051f2288..6c75e72e0 100644
--- a/javax/naming/spi/NamingManager.java
+++ b/javax/naming/spi/NamingManager.java
@@ -55,10 +55,10 @@ public class NamingManager
{
public static final String CPE = "java.naming.spi.CannotProceedException";
- private static InitialContextFactoryBuilder icfb = null;
+ private static InitialContextFactoryBuilder icfb;
// Package private so DirectoryManager can access it.
- static ObjectFactoryBuilder ofb = null;
+ static ObjectFactoryBuilder ofb;
// This class cannot be instantiated.
NamingManager ()
diff --git a/javax/swing/JDialog.java b/javax/swing/JDialog.java
index d33158018..f307f8a40 100644
--- a/javax/swing/JDialog.java
+++ b/javax/swing/JDialog.java
@@ -77,7 +77,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
private int close_action = HIDE_ON_CLOSE;
/** Whether JDialogs are decorated by the Look and Feel. */
- private static boolean decorated = false;
+ private static boolean decorated;
/**
* Creates a new non-modal JDialog with no title
diff --git a/javax/swing/JFrame.java b/javax/swing/JFrame.java
index 830883710..1d57353b4 100644
--- a/javax/swing/JFrame.java
+++ b/javax/swing/JFrame.java
@@ -60,7 +60,7 @@ public class JFrame extends Frame
implements WindowConstants, RootPaneContainer
{
private static final long serialVersionUID = -3362141868504252139L;
- private static boolean defaultLookAndFeelDecorated = false;
+ private static boolean defaultLookAndFeelDecorated;
private int close_action = HIDE_ON_CLOSE;
protected AccessibleContext accessibleContext;
protected JRootPane rootPane;
diff --git a/javax/swing/plaf/basic/BasicScrollBarUI.java b/javax/swing/plaf/basic/BasicScrollBarUI.java
index a0ac7ce30..28f7608ba 100644
--- a/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -435,19 +435,19 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
protected Rectangle thumbRect;
/** Indicates that the decrease highlight should be painted. */
- protected static int DECREASE_HIGHLIGHT = 1;
+ protected static final int DECREASE_HIGHLIGHT = 1;
/** Indicates that the increase highlight should be painted. */
- protected static int INCREASE_HIGHLIGHT = 2;
+ protected static final int INCREASE_HIGHLIGHT = 2;
/** Indicates that no highlight should be painted. */
- protected static int NO_HIGHLIGHT = 0;
+ protected static final int NO_HIGHLIGHT = 0;
/** Indicates that the scrolling direction is positive. */
- private static int POSITIVE_SCROLL = 1;
+ private static final int POSITIVE_SCROLL = 1;
/** Indicates that the scrolling direction is negative. */
- private static int NEGATIVE_SCROLL = -1;
+ private static final int NEGATIVE_SCROLL = -1;
/** The cached preferred size for the scrollbar. */
private transient Dimension preferredSize;
diff --git a/javax/swing/plaf/basic/BasicToolBarUI.java b/javax/swing/plaf/basic/BasicToolBarUI.java
index 85366a8f8..92e8f0428 100644
--- a/javax/swing/plaf/basic/BasicToolBarUI.java
+++ b/javax/swing/plaf/basic/BasicToolBarUI.java
@@ -1331,10 +1331,10 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
private static class ToolBarBorder implements Border
{
/** The size of the larger, draggable side of the border. */
- private static int offset = 10;
+ private static final int offset = 10;
/** The other sides. */
- private static int regular = 2;
+ private static final int regular = 2;
/**
* This method returns the border insets for the JToolBar.