[Patch] formatting cleanup

Michael Koch konqueror@gmx.de
Mon Feb 21 16:35:00 GMT 2005


Hi list,


I just the attached patch to cleanup some formatting issues.


Michael


2005-02-21  Michael Koch  <konqueror@gmx.de>

	* java/awt/Button.java,
	java/awt/Container.java,
	java/awt/Font.java,
	java/awt/Frame.java,
	java/text/CollationElementIterator.java,
	java/text/RuleBasedCollator.java,
	java/util/PropertyPermission.java:
	Fixed formatting issues all over.

-------------- next part --------------
Index: java/awt/Button.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Button.java,v
retrieving revision 1.17
diff -u -r1.17 Button.java
--- java/awt/Button.java	17 Feb 2005 07:48:23 -0000	1.17
+++ java/awt/Button.java	21 Feb 2005 16:11:10 -0000
@@ -96,7 +96,10 @@
   protected class AccessibleAWTButton extends AccessibleAWTComponent
     implements AccessibleAction, AccessibleValue
   {
-    protected AccessibleAWTButton() { }
+    protected AccessibleAWTButton()
+    {
+      // Do nothing here.
+    }
 
     /* (non-Javadoc)
      * @see javax.accessibility.AccessibleAction#getAccessibleActionCount()
Index: java/awt/Container.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Container.java,v
retrieving revision 1.42
diff -u -r1.42 Container.java
--- java/awt/Container.java	17 Feb 2005 07:48:23 -0000	1.42
+++ java/awt/Container.java	21 Feb 2005 16:11:11 -0000
@@ -1686,26 +1686,42 @@
 
   static class GfxPaintVisitor extends GfxVisitor
   {
-    public void visit(Component c, Graphics gfx) { c.paint(gfx); }
     public static final GfxVisitor INSTANCE = new GfxPaintVisitor();
+    
+    public void visit(Component c, Graphics gfx)
+    {
+      c.paint(gfx);
+    }
   }
 
   static class GfxPrintVisitor extends GfxVisitor
   {
-    public void visit(Component c, Graphics gfx) { c.print(gfx); }
     public static final GfxVisitor INSTANCE = new GfxPrintVisitor();
+    
+    public void visit(Component c, Graphics gfx)
+    {
+      c.print(gfx);
+    }
   }
 
   static class GfxPaintAllVisitor extends GfxVisitor
   {
-    public void visit(Component c, Graphics gfx) { c.paintAll(gfx); }
     public static final GfxVisitor INSTANCE = new GfxPaintAllVisitor();
+
+    public void visit(Component c, Graphics gfx)
+    {
+      c.paintAll(gfx);
+    }
   }
 
   static class GfxPrintAllVisitor extends GfxVisitor
   {
-    public void visit(Component c, Graphics gfx) { c.printAll(gfx); }
     public static final GfxVisitor INSTANCE = new GfxPrintAllVisitor();
+
+    public void visit(Component c, Graphics gfx)
+    {
+      c.printAll(gfx);
+    }
   }
 
   /**
Index: java/awt/Font.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Font.java,v
retrieving revision 1.21
diff -u -r1.21 Font.java
--- java/awt/Font.java	30 Nov 2004 23:58:38 -0000	1.21
+++ java/awt/Font.java	21 Feb 2005 16:11:12 -0000
@@ -1,5 +1,5 @@
 /* Font.java -- Font object
-   Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -247,7 +247,10 @@
         {
           tokenval = Integer.parseInt(token);
         }
-      catch(NumberFormatException e) { ; }
+      catch(NumberFormatException e)
+        {
+	  // Ignored.
+	}
 
       if (tokenval != 0)
         size = tokenval;
Index: java/awt/Frame.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Frame.java,v
retrieving revision 1.23
diff -u -r1.23 Frame.java
--- java/awt/Frame.java	16 Feb 2005 20:01:51 -0000	1.23
+++ java/awt/Frame.java	21 Feb 2005 16:11:12 -0000
@@ -1,5 +1,5 @@
 /* Frame.java -- AWT toplevel window
-   Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -403,10 +403,15 @@
 /**
   * Notifies this frame that it should create its native peer.
   */
-
 private static void fireDummyEvent()
 {
-  EventQueue.invokeLater(new Runnable() { public void run() { } });
+  EventQueue.invokeLater(new Runnable()
+    {
+      public void run()
+      {
+	// Do nothing here.
+      }
+    });
 }
 
 public void
Index: java/text/CollationElementIterator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/CollationElementIterator.java,v
retrieving revision 1.17
diff -u -r1.17 CollationElementIterator.java
--- java/text/CollationElementIterator.java	17 Feb 2005 07:48:41 -0000	1.17
+++ java/text/CollationElementIterator.java	21 Feb 2005 16:11:12 -0000
@@ -369,8 +369,9 @@
 		    idx_idx += idxToMove;
 		    idxToMove = 0;
 		  }
-	      } else
-		idx_idx += prefix.key.length();
+	      }
+	    else
+	      idx_idx += prefix.key.length();
 	  }
       }
     
Index: java/text/RuleBasedCollator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/RuleBasedCollator.java,v
retrieving revision 1.20
diff -u -r1.20 RuleBasedCollator.java
--- java/text/RuleBasedCollator.java	22 Oct 2004 17:14:24 -0000	1.20
+++ java/text/RuleBasedCollator.java	21 Feb 2005 16:11:12 -0000
@@ -1,5 +1,5 @@
 /* RuleBasedCollator.java -- Concrete Collator Class
-   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004  Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -435,56 +435,57 @@
 	    continue;
 	  }
 
-	switch (c) {
-	case '!':
-	  throw new ParseException
-	    ("Modifier '!' is not yet supported by Classpath", i+base_offset);
-	case '<':
-	  type = CollationSorter.GREATERP;
-	  break;
-	case ';':
-	  type = CollationSorter.GREATERS;
-	  break;
-	case ',':
-	  type = CollationSorter.GREATERT;
-	  break;
-	case '=':
-	  type = CollationSorter.EQUAL;
-	  break;
-	case '\'':
-	  eatingChars = !eatingChars;
-	  doubleQuote = true;
-	  break;
-	case '@':
-	  if (ignoreChars)
-	    throw new ParseException
-	      ("comparison list has not yet been started. You may only use"
-	       + "(<,;=&)", i+base_offset);
-	  // Inverse the order of secondaries from now on.
-	  nextIsModifier = true;
-	  type = CollationSorter.INVERSE_SECONDARY;
-	  break;
-	case '&':
-	  type = CollationSorter.RESET;
-	  if (stop_on_reset)
-	    break main_parse_loop;
-	  break;
-	default:
-	  if (operator < 0)
-	    throw new ParseException
-	      ("operator missing at " + (i+base_offset), i+base_offset);
-	  if (!eatingChars &&
-	      ((c >= 0x21 && c <= 0x2F) 
-	       || (c >= 0x3A && c <= 0x40)
-	       || (c >= 0x5B && c <= 0x60)
-	       || (c >= 0x7B && c <= 0x7E)))
+	switch (c)
+	  {
+	  case '!':
 	    throw new ParseException
-	      ("unquoted punctuation character '"+c+"'", i+base_offset);
+	      ("Modifier '!' is not yet supported by Classpath", i + base_offset);
+	  case '<':
+	    type = CollationSorter.GREATERP;
+	    break;
+	  case ';':
+	    type = CollationSorter.GREATERS;
+	    break;
+	  case ',':
+	    type = CollationSorter.GREATERT;
+	    break;
+	  case '=':
+	    type = CollationSorter.EQUAL;
+	    break;
+	  case '\'':
+	    eatingChars = !eatingChars;
+	    doubleQuote = true;
+	    break;
+	  case '@':
+	    if (ignoreChars)
+	      throw new ParseException
+		("comparison list has not yet been started. You may only use"
+		 + "(<,;=&)", i + base_offset);
+	    // Inverse the order of secondaries from now on.
+	    nextIsModifier = true;
+	    type = CollationSorter.INVERSE_SECONDARY;
+	    break;
+	  case '&':
+	    type = CollationSorter.RESET;
+	    if (stop_on_reset)
+	      break main_parse_loop;
+	    break;
+	  default:
+	    if (operator < 0)
+	      throw new ParseException
+		("operator missing at " + (i + base_offset), i + base_offset);
+	    if (! eatingChars
+		&& ((c >= 0x21 && c <= 0x2F) 
+		    || (c >= 0x3A && c <= 0x40)
+		    || (c >= 0x5B && c <= 0x60)
+		    || (c >= 0x7B && c <= 0x7E)))
+	      throw new ParseException
+		("unquoted punctuation character '" + c + "'", i + base_offset);
 
-	  //type = ignoreChars ? CollationSorter.IGNORE : -1;
-	  sb.append(c);
-	  break;
-	}
+	    //type = ignoreChars ? CollationSorter.IGNORE : -1;
+	    sb.append(c);
+	    break;
+	  }
 
 	if (type  < 0)
 	  continue;
Index: java/util/PropertyPermission.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/PropertyPermission.java,v
retrieving revision 1.6
diff -u -r1.6 PropertyPermission.java
--- java/util/PropertyPermission.java	23 Apr 2004 06:36:04 -0000	1.6
+++ java/util/PropertyPermission.java	21 Feb 2005 16:11:12 -0000
@@ -1,5 +1,5 @@
 /* PropertyPermission.java -- permission to get and set System properties
-   Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -154,17 +154,18 @@
       actions = WRITE;
     else if ("read,write".equals(str) || "write,read".equals(str))
       actions = READ | WRITE;
-    else {
-      String lstr = str.toLowerCase();
-      if ("read".equals(lstr))
-	actions = READ;
-      else if ("write".equals(lstr))
-	actions = WRITE;
-      else if ("read,write".equals(lstr) || "write,read".equals(lstr))
-	actions = READ | WRITE;
-      else
-	throw new IllegalArgumentException("illegal action " + str);
-    }
+    else
+      {
+	String lstr = str.toLowerCase();
+	if ("read".equals(lstr))
+ 	  actions = READ;
+	else if ("write".equals(lstr))
+	  actions = WRITE;
+	else if ("read,write".equals(lstr) || "write,read".equals(lstr))
+	  actions = READ | WRITE;
+	else
+	  throw new IllegalArgumentException("illegal action " + str);
+      }
   }
 
   /**


More information about the Java-patches mailing list