Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields

2005-12-12 Thread Stuart Ballard
On 12/11/05, Guilhem Lavaux [EMAIL PROTECTED] wrote:
 Bah ! I would rather use a native function that will throw directly
 InvalidClassException. The problem is that's will be anyway hidden to
 the general user and that he/she may be surprised getting that sort of
 exception.

I dunno, this seems pretty clean if it works:

public class Throw {
  private static Throwable t;
  public Throw() throws Throwable {throw t;}
  public static synchronized void uncheckedThrow(Throwable t) {
Throw.t = t;
try {
  Throw.class.newInstance();
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
}
  }
}

Throw.uncheckedThrow(new InvalidClassException(...));

A perfectly portable illegal-exception-thrower :)
--
http://sab39.dev.netreach.com/


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


RE: [cp-patches] Re: RFC: Patchfor duplicate entries in serialPersistentFields

2005-12-12 Thread Jeroen Frijters
Archie Cobbs wrote:
 Stuart Ballard wrote:
  Jeroen pointed out to me a while back that you can use 
 generics to throw an
  unchecked exception:
 
 There's also a way to do this without using JDK 1.5 stuff, but it's
 even uglier :-)
 
 Construct a class (dynamically) that has a default constructor
 that simply throws whatever exception you want. Then invoke
 Class.newInstance() on the class.

That doesn't work for all exception types (specifically not the ones
that Class.newInstance declares).

Here's the simplest way to do it:

   Thread.currentThread().stop(someCheckedException);

Thread.stop is deprecated because it is unsafe to throw asynchronous
exception, but that doesn't apply to throwing (synchronous) exceptions
on the current thread, so hopefully most VMs will implement that.

Regards,
Jeroen


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields

2005-12-12 Thread Mark Wielaard
Hi Stuart,

On Sun, 2005-12-11 at 21:42 -0500, Stuart Ballard wrote:
 Throw.uncheckedThrow(new InvalidClassException(...));
 
 A perfectly portable illegal-exception-thrower :)

It is a nice hack. But I agree with Guilhem that illegally throwing
checked exceptions from methods which are not explicitly documented to
do things like that should be avoided.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields

2005-12-12 Thread Robert Schuster
Hi.

Stuart Ballard wrote:
 I dunno, this seems pretty clean if it works:
 
 public class Throw {
   private static Throwable t;
   public Throw() throws Throwable {throw t;}
   public static synchronized void uncheckedThrow(Throwable t) {
 Throw.t = t;
 try {
   Throw.class.newInstance();
 } catch (InstantiationException e) {
 } catch (IllegalAccessException e) {
 }
   }
 }
 
 Throw.uncheckedThrow(new InvalidClassException(...));
 
 A perfectly portable illegal-exception-thrower :)
Funny!
But it works.

cya
Robert


signature.asc
Description: OpenPGP digital signature
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: New test for JComponent.getPreferredSize

2005-12-12 Thread Roman Kennke
I committed the attached patch that checks the correctness of various
aspects of the JComponent.getPreferredSize() method.

2005-12-12  Roman Kennke  [EMAIL PROTECTED]

* gnu/testlet/javax/swing/JComponent/getPreferredSize.java:
New test.

/Roman
// Tags: JDK1.2

// Copyright (C) 2005 Roman Kennke  [EMAIL PROTECTED]

// Mauve is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.

// Mauve is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Mauve; see the file COPYING.  If not, write to
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
// Boston, MA 02110-1301 USA.

package gnu.testlet.javax.swing.JComponent;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;

import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;

import gnu.testlet.TestHarness;
import gnu.testlet.Testlet;

/**
 * Some tests for JComponent.getPreferredSize().
 *
 * @author Roman Kennke ([EMAIL PROTECTED])
 */
public class getPreferredSize implements Testlet
{

  /**
   * A JComponent to overrides setUI for test purposes.
   *
   * @author Roman Kennke ([EMAIL PROTECTED])
   */
  static class TestComponent extends JComponent
  {
public void setUI(ComponentUI ui)
{
  super.setUI(ui);
}
  }

  /**
   * A UI class for test purposes.
   *
   * @author Roman Kennke ([EMAIL PROTECTED])
   */
  static class TestUI extends ComponentUI
  {
public Dimension getPreferredSize(JComponent c)
{
  return new Dimension(100, 100);
}
  }

  /**
   * A layout manager for test purposes.
   *
   * @author Roman Kennke ([EMAIL PROTECTED])
   */
  static class TestLayout implements LayoutManager
  {

public void addLayoutComponent(String name, Component component)
{
  // TODO Auto-generated method stub
  
}

public void removeLayoutComponent(Component component)
{
  // TODO Auto-generated method stub
  
}

public Dimension preferredLayoutSize(Container parent)
{
  return new Dimension(200, 200);
}

public Dimension minimumLayoutSize(Container parent)
{
  // TODO Auto-generated method stub
  return null;
}

public void layoutContainer(Container parent)
{
  // TODO Auto-generated method stub
  
}

  }

  /**
   * Starts the test run.
   *
   * @param harness the test harness to use
   */
  public void test(TestHarness harness)
  {
testPlain(harness);
testWithUI(harness);
testWithLayout(harness);
testWithUIAndLayout(harness);
testWithSet(harness);
testWithSetAndUI(harness);
testWithSetAndLayout(harness);
testWithAll(harness);

testSmallerThanMinSize(harness);
  }

  /**
   * A very basic test.
   *
   * @param h the test harness to use
   */
  private void testPlain(TestHarness h)
  {
h.checkPoint(plain);
TestComponent c = new TestComponent();
Dimension d = c.getPreferredSize();
h.check(d.width, 0);
h.check(d.height, 0);
  }

  /**
   * Tests the preferredSize with a UI installed.
   *
   * @param h the test harness to use
   */
  private void testWithUI(TestHarness h)
  {
h.checkPoint(withUI);
TestComponent c = new TestComponent();
c.setUI(new TestUI());
Dimension d = c.getPreferredSize();
h.check(d.width, 100);
h.check(d.height, 100);
  }

  /**
   * Tests the preferredSize with a layout manager installed
   *
   * @param h the test harness to use
   */
  private void testWithLayout(TestHarness h)
  {
h.checkPoint(withLayout);
TestComponent c = new TestComponent();
c.setLayout(new TestLayout());
Dimension d = c.getPreferredSize();
h.check(d.width, 200);
h.check(d.height, 200);
  }

  /**
   * Tests the preferredSize with both a layout manager and a UI installed.
   *
   * @param h the test harness to use
   */
  private void testWithUIAndLayout(TestHarness h)
  {
h.checkPoint(withUIAndLayout);
TestComponent c = new TestComponent();
c.setUI(new TestUI());
c.setLayout(new TestLayout());
c.invalidate();
Dimension d = c.getPreferredSize();
h.check(d.width, 100);
h.check(d.height, 100);
  }

  /**
   * Tests the preferredSize when explicitly set.
   *
   * @param h the test harness to use
   */
  private void testWithSet(TestHarness h)
  {
h.checkPoint(withSet);
TestComponent c = new TestComponent();
c.setPreferredSize(new Dimension(300, 300));
Dimension d = c.getPreferredSize();
h.check(d.width, 300);
h.check(d.height, 300);
  }

  /**
   * Tests 

[cp-patches] FYI: ViewportLayout fix

2005-12-12 Thread Roman Kennke
This patch makes the new ViewportLayout.layoutContainer Mauve test pass.

2005-12-12  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/ViewportLayout.java
(layoutContainer): Always check and adjust the size, not only when
portSize = view.minSize.

/Roman
Index: javax/swing/ViewportLayout.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/ViewportLayout.java,v
retrieving revision 1.19
diff -u -r1.19 ViewportLayout.java
--- javax/swing/ViewportLayout.java	6 Dec 2005 14:31:09 -	1.19
+++ javax/swing/ViewportLayout.java	12 Dec 2005 13:22:42 -
@@ -146,11 +146,7 @@
 
 // vertical implementation of the above rules
 if (portBounds.height = viewMinimum.height)
-  {
-portBounds.y = 0;
-if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportHeight())
-  viewPref.height = portBounds.height;
-  }
+  portBounds.y = 0;
 else
   {
 int overextension = portLowerRight.y - viewPref.height;
@@ -158,13 +154,13 @@
 portBounds.y -= overextension;
   }
 
+if ( !(view instanceof Scrollable)
+|| ((Scrollable)view).getScrollableTracksViewportHeight())
+  viewPref.height = portBounds.height;
+
 // horizontal implementation of the above rules
 if (portBounds.width = viewMinimum.width)
-  {
-portBounds.x = 0;
-if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth())
-  viewPref.width = portBounds.width;
-  }
+  portBounds.x = 0;
 else
   {
 int overextension = portLowerRight.x - viewPref.width;
@@ -172,12 +168,10 @@
 portBounds.x -= overextension;
   }
 
+if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth())
+  viewPref.width = portBounds.width;
+
 port.setViewPosition(portBounds.getLocation());
-// TODO: I doubt that the size should really be touched here, except when
-// the view is somehow smaller than its minimumSize. I would think that
-// when the size of a view is set manually to a fixed value, that this
-// value should be left unchanged, and not reset to the preferred or
-// minimum size. -- Roman Kennke
 port.setViewSize(viewPref);
   }
 }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: JComponent fixlet

2005-12-12 Thread Roman Kennke
Hi all,

I committed the attached patch which makes the new JComponent Mauve test
pass.

2005-12-12  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JComponent.java
(getPreferredSize): Don't check for the minimumSize. According to
a mauve test, this is not necessary.

/Roman
Index: javax/swing/JComponent.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.92
diff -u -r1.92 JComponent.java
--- javax/swing/JComponent.java	8 Dec 2005 10:56:35 -	1.92
+++ javax/swing/JComponent.java	12 Dec 2005 13:19:48 -
@@ -1305,12 +1305,7 @@
 
 if (prefSize == null)
   prefSize = super.getPreferredSize();
-// make sure that prefSize is not smaller than minSize
-if (minimumSize != null  prefSize != null
- (minimumSize.width  prefSize.width
-|| minimumSize.height  prefSize.height))
-prefSize = new Dimension(Math.max(minimumSize.width, prefSize.width),
- Math.max(minimumSize.height, prefSize.height));
+
 return prefSize;
   }
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: Allow Security.setProperty(foo, null)

2005-12-12 Thread Gary Benson
Hi,

At the moment Security.setProperty() will not allow the setting of
null property values.  Since Security.getProperty() returns null for
unset properties this means that the following will fail:

  String key = some.old.property;
  Security.setProperty(key, Security.getProperty(key));

The javadoc is unclear: it says nothing about null values, but it
doesn't say anything about throwing NullPointerExceptions (which we
currently do).  I tried it on a proprietary JVM and it accepted the
null pointer.  On the principle of accepting what you emit I think we
should do the same.

Also included in this patch is the spelling correction
s/datnum/datum/.

Cheers,
Gary
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.5793
diff -u -r1.5793 ChangeLog
--- ChangeLog   12 Dec 2005 13:24:22 -  1.5793
+++ ChangeLog   12 Dec 2005 15:28:48 -
@@ -1,3 +1,8 @@
+2005-12-12  Gary Benson  [EMAIL PROTECTED]
+
+   * java/security/Security.java (setProperty): Spelling correction.
+   * java/security/Security.java (setProperty): Allow null values.
+
 2005-12-12  Roman Kennke  [EMAIL PROTECTED]
 
* javax/swing/ViewportLayout.java
Index: java/security/Security.java
===
RCS file: /cvsroot/classpath/classpath/java/security/Security.java,v
retrieving revision 1.37
diff -u -r1.37 Security.java
--- java/security/Security.java 18 Sep 2005 03:06:39 -  1.37
+++ java/security/Security.java 7 Dec 2005 15:44:29 -
@@ -399,20 +399,23 @@
* /p
*
* @param key the name of the property to be set.
-   * @param datnum the value of the property to be set.
+   * @param datum the value of the property to be set.
* @throws SecurityException if a security manager exists and its
* [EMAIL PROTECTED] SecurityManager#checkPermission(Permission)} method 
denies access
* to set the specified security property value.
* @see #getProperty(String)
* @see SecurityPermission
*/
-  public static void setProperty(String key, String datnum)
+  public static void setProperty(String key, String datum)
   {
 SecurityManager sm = System.getSecurityManager();
 if (sm != null)
   sm.checkSecurityAccess(setProperty. + key);
 
-secprops.put(key, datnum);
+if (datum == null)
+  secprops.remove(key);
+else
+  secprops.put(key, datum);
   }
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] StAX parser

2005-12-12 Thread Mark Wielaard
Hi Chris,

On Mon, 2005-12-12 at 11:35 +, Chris Burdess wrote:
 The attached patch provides a new StAX XML parser, mostly feature 
 complete but currently without support for DTD validation.
 
 2005-12-12  Chris Burdess  [EMAIL PROTECTED]
 
* gnu/xml/stream/XMLInputFactoryImpl.java,
  gnu/xml/stream/CRLFReader.java,
  gnu/xml/stream/XMLInputStreamReader.java,
  gnu/xml/stream/XMLParser.java: New StAX parser.

Woot!

The files were checked in, but it seems you forgot to add the above
entry to the ChangeLog file.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: New test for JComponent.getPreferredSize

2005-12-12 Thread David Daney

Roman Kennke wrote:

I committed the attached patch that checks the correctness of various
aspects of the JComponent.getPreferredSize() method.

2005-12-12  Roman Kennke  [EMAIL PROTECTED]

* gnu/testlet/javax/swing/JComponent/getPreferredSize.java:
New test.

/Roman


But this is [EMAIL PROTECTED]  Shouldn't this go to mauve-patches ?

David Daney.


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] StAX parser

2005-12-12 Thread Chris Burdess
Mark Wielaard wrote:
  The attached patch provides a new StAX XML parser, mostly feature 
  complete but currently without support for DTD validation.
  
  2005-12-12  Chris Burdess  [EMAIL PROTECTED]
  
 * gnu/xml/stream/XMLInputFactoryImpl.java,
   gnu/xml/stream/CRLFReader.java,
   gnu/xml/stream/XMLInputStreamReader.java,
   gnu/xml/stream/XMLParser.java: New StAX parser.
 
 Woot!
 
 The files were checked in, but it seems you forgot to add the above
 entry to the ChangeLog file.

Sorry about that, corrected now.
-- 
Chris Burdess


pgp65crzhXhyy.pgp
Description: PGP signature
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: New test for JComponent.getPreferredSize

2005-12-12 Thread Roman Kennke

Hiyo,

Am 12.12.2005 schrieb David Daney [EMAIL PROTECTED]:

Roman Kennke wrote:
 I committed the attached patch that checks the correctness of various
 aspects of the JComponent.getPreferredSize() method.

 2005-12-12  Roman Kennke  [EMAIL PROTECTED]

 * gnu/testlet/javax/swing/JComponent/getPreferredSize.java:
 New test.

 /Roman

But this is [EMAIL PROTECTED]  Shouldn't this go to mauve-patches ?

Whoopsie, I corrected this. Sorry for the noise.

/Roman


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] StAX SAX parser

2005-12-12 Thread Chris Burdess
These classes implement a JAXP SAX parser on top of the new StAX
implementation.

2005-12-12  Chris Burdess  [EMAIL PROTECTED]

* gnu/xml/stream/SAXParser.java,
  gnu/xml/stream/SAXParserFactory.java,
  gnu/xml/stream/XMLParser.java: SAX parser using StAX
implementation.

-- 
Chris Burdess
Index: gnu/xml/stream/SAXParser.java
===
RCS file: gnu/xml/stream/SAXParser.java
diff -N gnu/xml/stream/SAXParser.java
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnu/xml/stream/SAXParser.java   12 Dec 2005 19:47:35 -
@@ -0,0 +1,670 @@
+/* SAXParser.java -- 
+   Copyright (C) 2005  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.xml.stream;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+import javax.xml.namespace.QName;
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLReporter;
+import javax.xml.stream.XMLResolver;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Parser;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.ext.Attributes2;
+import org.xml.sax.ext.DeclHandler;
+import org.xml.sax.ext.EntityResolver2;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.ext.Locator2;
+
+/**
+ * JAXP SAX parser using an underlying StAX parser.
+ *
+ * @author a href='mailto:[EMAIL PROTECTED]'Chris Burdess/a
+ */
+class SAXParser
+  extends javax.xml.parsers.SAXParser
+  implements XMLReader, Attributes2, Locator2, XMLResolver, XMLReporter
+{
+
+  ContentHandler contentHandler;
+  DeclHandler declHandler;
+  DTDHandler dtdHandler;
+  EntityResolver entityResolver;
+  ErrorHandler errorHandler;
+  LexicalHandler lexicalHandler;
+
+  boolean validating;
+  boolean namespaceAware;
+  boolean xIncludeAware;
+  boolean stringInterning = true;
+
+  XMLParser parser;
+  String encoding;
+  String xmlVersion;
+  boolean xmlStandalone;
+
+  SAXParser(boolean validating, boolean namespaceAware, boolean xIncludeAware)
+  {
+this.validating = validating;
+this.namespaceAware = namespaceAware;
+this.xIncludeAware = xIncludeAware;
+  }
+
+  // -- SAXParser --
+  
+  public Parser getParser()
+throws SAXException
+  {
+return null;
+  }
+  
+  public XMLReader getXMLReader()
+throws SAXException
+  {
+return this;
+  }
+
+  public boolean isNamespaceAware()
+  {
+return namespaceAware;
+  }
+
+  public boolean isValidating()
+  {
+return validating;
+  }
+
+  public void setProperty(String name, Object value)
+throws SAXNotRecognizedException, SAXNotSupportedException
+  {
+if (parser != null)
+  throw new IllegalStateException(parsing in progress);
+String FEATURES = http://xml.org/sax/features/;;
+String PROPERTIES = 

Re: [cp-patches] FYI: Allow Security.setProperty(foo, null)

2005-12-12 Thread Tom Tromey
 Gary == Gary Benson [EMAIL PROTECTED] writes:

Gary At the moment Security.setProperty() will not allow the setting of
Gary null property values.  Since Security.getProperty() returns null for
Gary unset properties this means that the following will fail:

When you sent this last week I replied to it... did you not see that?
In particular I wanted to know about Mauve tests and documenting the
behavior of 'null'.

Also your ChangeLog entry is not really formatted properly.
I wouldn't bother changing that at this point though, it is just a
pedantic thing.

Tom


___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] RFC: HTMLDocument.HTMLReader partial implementation

2005-12-12 Thread Anthony Balkissoon
This is a partial implementation of HTMLDocument.HTMLReader.  I am still
working on this, so it will be more fully implemented soon.

I submit this as RFC because it has several methods that have nothing
more than FIXME: Implement as well as some debugging statements.
These are there so that Lillian and myself can work on the entire HTML
package.  Since some of the classes she's working on require
HTMLDocument.HTMLReader I want these methods to be available so her
classes can build even if they are not yet implemented, with the
understanding that I will implement them shortly.  The debugging
(System.out.println) statements are there so that as we run test apps we
can see how the different classes are linked together.

Since we are the only two people that I know of working on this
javax.swing.text.html package I don't think this should be a problem but
I'm still asking if anyone has objections to me checking in this patch
with stubs and println's.  Note that all of the stubs have FIXME notes
and that the println's can easily be taken out before the next release
if we haven't finished implementing the methods yet.

Objections?

2005-12-12  Anthony Balkissoon  [EMAIL PROTECTED]

* javax/swing/text/html/HTMLDocument.java:
(tokenThreshold): New field.
(parser): New field.
(getParser): New API method.
(setParser): New API method.
(getTokenThreshold): New API method.
(setTokenThreshold): New API method.
(HTMLReader): New API class, partially implemented.
(HTMLReader.BlockAction): New API class, not implemented.
(HTMLReader.CharacterAction): Likewise.
(HTMLReader.FormAction): Likewise.
(HTMLReader.HiddenAction): Likewise.
(HTMLReader.IsindexAction): Likewise.
(HTMLReader.ParagraphAction): Likewise.
(HTMLReader.PreAction): Likewise.
(HTMLReader.SpecialAction): Likewise.
(HTMLReader.TagAction): New API class, implemented.
* javax/swing/text/html/HTMLEditorKit.java:
(createDefaultDocument): Set the parser for the new HTMLDocument.

--Tony
Index: javax/swing/text/html/HTMLDocument.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/HTMLDocument.java,v
retrieving revision 1.7
diff -u -r1.7 HTMLDocument.java
--- javax/swing/text/html/HTMLDocument.java	9 Dec 2005 17:52:54 -	1.7
+++ javax/swing/text/html/HTMLDocument.java	12 Dec 2005 22:25:59 -
@@ -39,12 +39,18 @@
 package javax.swing.text.html;
 
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Stack;
+import java.util.Vector;
 
 import javax.swing.text.AbstractDocument;
 import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
 import javax.swing.text.DefaultStyledDocument;
 import javax.swing.text.Element;
 import javax.swing.text.ElementIterator;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
 import javax.swing.text.html.HTML.Tag;
 
 /**
@@ -60,6 +66,49 @@
   public static final String AdditionalComments = AdditionalComments;
   URL baseURL = null;
   boolean preservesUnknownTags = true;
+  int tokenThreshold = Integer.MAX_VALUE;
+  HTMLEditorKit.Parser parser;
+  
+  /**
+   * Returns the parser used by this HTMLDocument to insert HTML.
+   * 
+   * @return the parser used by this HTMLDocument to insert HTML.
+   */
+  public HTMLEditorKit.Parser getParser()
+  {
+return parser; 
+  }
+  
+  /**
+   * Sets the parser used by this HTMLDocument to insert HTML.
+   * 
+   * @param p the parser to use
+   */
+  public void setParser (HTMLEditorKit.Parser p)
+  {
+parser = p;
+  }
+  /**
+   * Sets the number of tokens to buffer before trying to display the
+   * Document.
+   * 
+   * @param n the number of tokens to buffer
+   */
+  public void setTokenThreshold (int n)
+  {
+tokenThreshold = n;
+  }
+  
+  /**
+   * Returns the number of tokens that are buffered before the document
+   * is rendered.
+   * 
+   * @return the number of tokens buffered
+   */
+  public int getTokenThreshold ()
+  {
+return tokenThreshold;
+  }
   
   /**
* Returns the location against which to resolve relative URLs.
@@ -267,6 +316,769 @@
   }
   
   /**
+   * A reader to load an HTMLDocument with HTML structure.
+   * 
+   * @author Anthony Balkissoon abalkiss at redhat dot com
+   *
+   */
+  public class HTMLReader extends HTMLEditorKit.ParserCallback
+  {
+/** Holds the current character attribute set **/
+protected MutableAttributeSet charAttr;
+
+protected Vector parseBuffer;
+
+/** A stack for character attribute sets **/
+Stack charAttrStack = new Stack();
+
+/** A mapping between HTML.Tag objects and the actions that handle them **/
+HashMap tagToAction;
+
+/** Tells us whether we've received the '/html' tag yet **/
+boolean endHTMLEncountered = false;
+
+public class 

Re: Proposal: Graphics2D rewrite branch

2005-12-12 Thread Mark Wielaard
On Sun, 2005-12-11 at 18:02 -0700, Tom Tromey wrote:
  Mark == Mark Wielaard [EMAIL PROTECTED] writes:
 Mark And you should not see it as private or may be broken at random
 Mark times. It should be as much as possible something that you work with a
 Mark team on (and if there is no team - yet - then there is nothing as bad as
 Mark having a completely broken build to get others to help out).
 
 Actually, I think it is reasonable to have a may be broken branch.
 In fact this is one of the main reasons for having a branch -- if you
 can keep stuff building and working, in many cases you won't need a
 branch at all.

Yeah, this may be a bit too strong. I meant it as a strong warning that
the branch cannot be a dumping ground for some code that isn't even
supposed to work. I'll reformulate that as:

@item A branch should not be seen as ``private'' or
``may be completely broken''. It should be as much as possible
something that you work on with a team (and if there is no team - yet
- then there is nothing as bad as having a completely broken build to
get others to help out). There can of course be occasional breakage, but
it should be planned and explained. And you can certainly have a rule
like ``please ask me before committing to this branch''.

Let me know if that still doesn't capture the spirit.

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: [GNU Crypto] Re: [Jessie-discuss] Re: RFC: merging GNU Crypto and Jessie

2005-12-12 Thread Anthony Green
On Mon, 2005-12-12 at 20:48 +1100, Raif S. Naffah wrote:
 would adding a second Provider --that supplies the strong stuff; i.e. 
 ciphers, modes, padding, etc..-- living in its own package 
 sub-directory/hierarchy and eventually (when the segmentation of 
 Classpath into multiple jars occur) be packaged in its own jar help 
 solve your problem?

Yes, that would be nice.

AG




___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: [GNU Crypto] Re: [Jessie-discuss] Re: RFC: merging GNU Crypto and Jessie

2005-12-12 Thread Raif S. Naffah
On Monday 12 December 2005 01:45, Anthony Green wrote:
 On Sun, 2005-12-11 at 15:19 +0100, Mark Wielaard wrote:
  If there are situations where you are not able to (re)distribute
  the GNU Classpath source code and/or follow the the BIS/ENC
  notification procedures as done by the various GNU/Linux distros to
  distribute binary derivatives of GNU Classpath as Free Software
  works then please let us know.

 I don't think my situation is relevant to public Linux distros.

 I'm told the rules are different when you want to make a private
 distribution of FOSS crypto code (ie. not easily found on a public
 web/ftp site).  In my specific case, it's easier just to remove the
 problematic code completely.

would adding a second Provider --that supplies the strong stuff; i.e. 
ciphers, modes, padding, etc..-- living in its own package 
sub-directory/hierarchy and eventually (when the segmentation of 
Classpath into multiple jars occur) be packaged in its own jar help 
solve your problem?


cheers;
rsn


pgpwTIeTvE2l2.pgp
Description: PGP signature
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


New bugzilla component xml

2005-12-12 Thread Mark Wielaard
Hi,

A new bugzilla component was added for all xml (javax.xml, gnu.xml)
related bug reports. The initial owner is Chris, but he is of course
free to not handle or reassign bugs. For the current list of bugs see:
http://gcc.gnu.org/bugzilla/buglist.cgi?product=classpathcomponent=xml

Initial bug component owners are just there to make sure someone has a
first look at a bug and can confirm it is actually filed in the right
category. There is no obligation to actually fix things. Just be nice to
the reporter and refile/close things which are not properly reported.

Please say when you need another component in bugzilla and want to be
the initial owner for it. Andrew Pinski or I can add them and assign
them to people.

Cheers,

Mark

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Mark Wielaard
Hi Archie,

On Sun, 2005-12-11 at 13:39 -0600, Archie Cobbs wrote:
 Mark Wielaard wrote:
 If you have
 the cvsutils installed then you can easily switch to the new CVS
 location by running this in your CVS working copy:
 cvschroot savannah-user-name@cvs.savannah.gnu.org:/cvsroot/classpath
  
  And for those of you using anonymous CVS you need to switch to pserver:
  $ cvschroot :pserver:[EMAIL PROTECTED]:/cvsroot/classpath
 
 Hmm.. could this new infrastructure include possible a switchover from
 CVS to Subversion? (I'm so used to SVN now that CVS is gotten pretty
 gross to deal with).

Subversion support for savannah is planned in the future. And it might
make sense to adopt it then since other projects that rely on GNU
Classpath also use it and it makes merging easier. On the other hand
subversion is still a bit immature and not widely supported yet (for
example on builder.classpath.org we needed to install the latest
1.3.0rc4 to get around some network timeout issues). CVS might be old
and clumsy at times, it is much more mature and supported atm. That
said, if savannah adds subversion support I would vote for us to switch.

Cheers,

Mark

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Archie Cobbs

Mark Wielaard wrote:

Subversion support for savannah is planned in the future. And it might
make sense to adopt it then since other projects that rely on GNU
Classpath also use it and it makes merging easier. On the other hand


That would be great.


subversion is still a bit immature and not widely supported yet (for
example on builder.classpath.org we needed to install the latest
1.3.0rc4 to get around some network timeout issues). CVS might be old
and clumsy at times, it is much more mature and supported atm. That
said, if savannah adds subversion support I would vote for us to switch.


I think you're information is slightly dated :-) Subversion is quite
matture. The 1.0 release, which itself was very stable, was released
almost two years ago. Now they're up to version 1.2.3.

For example, all of Apache is on a single Subversion server
and they're up to revision #356264 (including imported CVS commits).
We've used it at my real job for over a year with zero problems.

As far as being supported, not sure what you're referring to.
Everything I've ever wanted to do with CVS I can do with SVN, plus
a lot more.

-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


[Bug classpath/25374] New: LogManager-related security bug with netx

2005-12-12 Thread tromey at gcc dot gnu dot org
I don't have a self contained test case for this.
First, you must download netx: http://jnlp.sourceforge.net/netx/
Then run:

jamvm -jar ~/netsrc/java/webstart/netx-cvs.jar -jnlp
http://irate.sourceforge.net/webstart/stable/irate-client-swt.jnlp

For me this dies with a security-related error:

java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invokeNative (Native Method)
   at java.lang.reflect.Method.invoke (Method.java:355)
   at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50)
Caused by: java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invokeNative (Native Method)
   at java.lang.reflect.Method.invoke (Method.java:355)
   at netx.jnlp.runtime.Boot13.main (Boot13.java:102)
   at java.lang.reflect.Method.invokeNative (Native Method)
   ...2 more
Caused by: java.lang.NoClassDefFoundError:
netx/jnlp/services/ServiceUtil$PrivilegedHandler
   at netx.jnlp.services.ServiceUtil.createPrivilegedProxy
(ServiceUtil.java:122)
   at netx.jnlp.services.XServiceManagerStub.clinit
(XServiceManagerStub.java:51)
   at netx.jnlp.runtime.JNLPRuntime.initialize (JNLPRuntime.java:144)
   at netx.jnlp.runtime.Boot.run (Boot.java:162)
   at java.security.AccessController.doPrivileged (AccessController.java:96)
   at netx.jnlp.runtime.Boot.main (Boot.java:151)
   at java.lang.reflect.Method.invokeNative (Native Method)
   ...5 more
Caused by: java.lang.NoClassDefFoundError: java/lang/reflect/InvocationHandler
   at java.lang.VMClassLoader.defineClass (Native Method)
   at java.lang.ClassLoader.defineClass (ClassLoader.java:472)
   at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:108)
   at java.net.URLClassLoader.findClass (URLClassLoader.java:955)
   at netx.jnlp.runtime.Boot13.loadClass (Boot13.java:72)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:294)
   at netx.jnlp.services.ServiceUtil.createPrivilegedProxy
(ServiceUtil.java:122)
   ...11 more
Caused by: java.lang.ExceptionInInitializerError
   at java.util.logging.Logger.getLogger (Logger.java:258)
   at java.util.logging.Logger.getLogger (Logger.java:206)
   at java.util.logging.Logger.clinit (Logger.java:76)
   at gnu.classpath.debug.SystemLogger.clinit (SystemLogger.java:47)
   at gnu.javax.crypto.RSACipherImpl.clinit (RSACipherImpl.java:72)
   at java.lang.VMClass.forName (Native Method)
   at java.lang.Class.forName (Class.java:161)
   at gnu.java.security.provider.Gnu$1.run (Gnu.java:174)
   at java.security.AccessController.doPrivileged (AccessController.java:96)
   at gnu.java.security.provider.Gnu.init (Gnu.java:51)
   at java.security.Security.clinit (Security.java:102)
   at java.lang.SecurityManager$1.run (SecurityManager.java:1058)
   at java.security.AccessController.doPrivileged (AccessController.java:96)
   at java.lang.SecurityManager.checkPackageList (SecurityManager.java:1054)
   at java.lang.SecurityManager.checkPackageAccess (SecurityManager.java:923)
   at java.lang.ClassLoader$1.loadClass (ClassLoader.java:1108)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:294)
   at netx.jnlp.runtime.Boot13.loadClass (Boot13.java:75)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:294)
   at java.lang.VMClassLoader.defineClass (Native Method)
   ...17 more
Caused by: java.lang.NullPointerException
   at netx.jnlp.runtime.JNLPSecurityManager.checkPermission
(JNLPSecurityManager.java:239)
   at java.util.logging.LogManager.checkAccess (LogManager.java:786)
   at java.util.logging.Logger.setLevel (Logger.java:467)
   at java.util.logging.LogManager.init (LogManager.java:147)
   at java.util.logging.LogManager.makeLogManager (LogManager.java:213)
   at java.util.logging.LogManager.clinit (LogManager.java:180)
   at java.util.logging.Logger.getLogger (Logger.java:258)
   ...36 more


-- 
   Summary: LogManager-related security bug with netx
   Product: classpath
   Version: 0.20
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25374



___
Bug-classpath mailing list
Bug-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-classpath


[Bug awt/25375] New: awt / swt clash

2005-12-12 Thread tromey at gcc dot gnu dot org
To reproduce this bug you must first download netx:
http://jnlp.sourceforge.net/netx/

Then run it as:

jamvm -jar ~/netsrc/java/webstart/netx-cvs.jar -nosecurity -jnlp
http://irate.sourceforge.net/webstart/stable/irate-client-swt.jnlp

(The -nosecurity is needed to work around a different bug.)

After it downloads the application, it will crash like this:

Xlib: unexpected async reply (sequence 0x8bad)!

I think this is somehow caused by AWT and SWT clashing over gtk use.

It will work if you pass '-headless' to netx to avoid starting
the swing gui.


-- 
   Summary: awt / swt clash
   Product: classpath
   Version: 0.20
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: awt
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25375



___
Bug-classpath mailing list
Bug-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Mark Wielaard
Hi Archie,

On Mon, 2005-12-12 at 09:31 -0600, Archie Cobbs wrote:
 Mark Wielaard wrote:
  subversion is still a bit immature and not widely supported yet (for
  example on builder.classpath.org we needed to install the latest
  1.3.0rc4 to get around some network timeout issues). CVS might be old
  and clumsy at times, it is much more mature and supported atm. That
  said, if savannah adds subversion support I would vote for us to switch.
 
 I think you're information is slightly dated :-) Subversion is quite
 matture. The 1.0 release, which itself was very stable, was released
 almost two years ago. Now they're up to version 1.2.3.
 
 For example, all of Apache is on a single Subversion server
 and they're up to revision #356264 (including imported CVS commits).
 We've used it at my real job for over a year with zero problems.
 
 As far as being supported, not sure what you're referring to.
 Everything I've ever wanted to do with CVS I can do with SVN, plus
 a lot more.

Don't get me wrong I do like subversion. And I used it for multi
megabyte imports of classpath source into different gcc branches. And
most things do work really nicely. And even much smoother then with
CVS. 

But fact is that the first time I needed to use svn instead of cvs it
took twice as long, since it isn't really a 1-to-1 mapping (to be fair,
next time the same task will probably take me half the time). And I did
experience some glitches (which is why we needed version 1.3.0rc4 on
builder), nothing that looses data, but small inconveniences like very
slow or stalled network connections in automated scripts. Or the fact
that you really need to setup an external diff command since the
built-in one is not capable enough. 

With supported I meant that CVS can be expected to be available
everywhere in a really stable version. Subversion isn't there yet. It is
starting to become more standard, but it isn't yet something that is
just installed by default, so for people using multiple diverse
platform/distributions it takes much more time to get a working setup.

Also importing an old CVS repository like all of GCC seems possible now
but there were some small anomalies. So the switch will have to be done
carefully and will take some time to get right and double check.

Lastly working copies take more than twice as much diskspace as with CVS
(I do know that means some operations are much faster, but with large
repositories like classpath it does add up when you have multiple
checkouts).

All this isn't meant as saying we shouldn't adopt subversion when
savannah supports it though. Just to say that it isn't slam-dunk
decission given the diverse background of our hackers. I am still
convinced that if savannah supports it we should switch, but I do want
to let people know there are some (small) downsides.

Cheers,

Mark

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: Security manager problem

2005-12-12 Thread Gary Benson
Gary Benson wrote:
 Robert Lougher wrote:
  Do you have a testcase?
 
 If you build and run the attached testcase you ought to see only one
 checkPermission() between Calling checkRead() and Done. ... In
 reality, JamVM chokes on it pretty hard.  I _think_ what is
 happening is that the System.out.println in checkPermission() is
 itself doing some initialisation which causes security checks,
 causing an infinite loop.

The initialisation in question turns out to be:

 1. Loading java.lang.StringBuffer to build the message.
 2. Loading java.io.PrintStream to print it out.
 3. Converting the message to bytes using String.getBytes(encoding).

Any one of them will trigger a security check and hence an infinite
loop.  There's an awful lot I still don't undertstand here, but I'm
a step closer...  MaƱana.

In case anyone's interested I've attached a patched testcase and a
patch for classpath which together work on JamVM.

Cheers,
Gary
import java.security.Permission;

class Test
{
  static class TestSecurityManager extends SecurityManager
  {
public void checkPermission(Permission perm) {
  System.out.println(  checkPermission( + perm + ));
}
  }

  public static void main(String[] args) {
java.lang.StringBuffer XXX1 = new java.lang.StringBuffer();
java.io.PrintStream XXX2 = new java.io.PrintStream(null);
try {
  SecurityManager sm = new TestSecurityManager();
  System.setSecurityManager(sm);
  System.out.println(Calling checkRead());
  sm.checkRead(/);
  System.out.println(Done);
}
catch (Throwable t) {
  t.printStackTrace();
}
  }
}
Index: java/lang/String.java
===
RCS file: /cvsroot/classpath/classpath/java/lang/String.java,v
retrieving revision 1.77
diff -u -r1.77 String.java
--- java/lang/String.java   6 Dec 2005 18:52:25 -   1.77
+++ java/lang/String.java   12 Dec 2005 17:40:55 -
@@ -680,35 +680,9 @@
*/
   public byte[] getBytes(String enc) throws UnsupportedEncodingException
   {
-try 
-  {
-   CharsetEncoder cse = Charset.forName(enc).newEncoder();
-   cse.onMalformedInput(CodingErrorAction.REPLACE);
-   cse.onUnmappableCharacter(CodingErrorAction.REPLACE);
-   ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count));
-   if(bbuf.hasArray())
- return bbuf.array();
-   
-   // Doubt this will happen. But just in case.
-   byte[] bytes = new byte[bbuf.remaining()];
-   bbuf.get(bytes);
-   return bytes;
-  } 
-catch(IllegalCharsetNameException e)
-  {
-   throw new UnsupportedEncodingException(Encoding:  + enc
-  +  not found.);
-  } 
-catch(UnsupportedCharsetException e)
-  {
-   throw new UnsupportedEncodingException(Encoding:  + enc
-  +  not found.);
-  } 
-catch(CharacterCodingException e)
-  {
-   // This shouldn't ever happen.
-   throw (InternalError) new InternalError().initCause(e);
-  }  
+byte[] bytes = new byte[length()];
+getBytes(0, length(), bytes, 0);
+return bytes;
   }
 
   /**
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Andrew Haley
Mark Wielaard writes:
  Hi Archie,
  
  On Sun, 2005-12-11 at 13:39 -0600, Archie Cobbs wrote:
   Mark Wielaard wrote:
   If you have
   the cvsutils installed then you can easily switch to the new CVS
   location by running this in your CVS working copy:
   cvschroot savannah-user-name@cvs.savannah.gnu.org:/cvsroot/classpath

And for those of you using anonymous CVS you need to switch to pserver:
$ cvschroot :pserver:[EMAIL PROTECTED]:/cvsroot/classpath
   
   Hmm.. could this new infrastructure include possible a switchover from
   CVS to Subversion? (I'm so used to SVN now that CVS is gotten pretty
   gross to deal with).
  
  Subversion support for savannah is planned in the future. And it might
  make sense to adopt it then since other projects that rely on GNU
  Classpath also use it and it makes merging easier. On the other hand
  subversion is still a bit immature and not widely supported yet (for
  example on builder.classpath.org we needed to install the latest
  1.3.0rc4 to get around some network timeout issues). CVS might be old
  and clumsy at times, it is much more mature and supported atm. That
  said, if savannah adds subversion support I would vote for us to switch.

Oh, yes.  After a slightly painful start I'm starting really to enjoy
using svn.

Andrew.


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Tom Tromey
 Mark == Mark Wielaard [EMAIL PROTECTED] writes:

Mark You will notice that last one when running CVS update. It will explain
Mark that you have to update the Root of your CVS working directory. If you
Mark the cvsutils installed then you can easily switch to the new CVS
Mark location by running this in your CVS working copy:
Mark cvschroot savannah-user-name@cvs.savannah.gnu.org:/cvsroot/classpath

Eclipse users, you can open the cvs perspective and edit the
particular repository entry (right click on the entry and choose
Properties from the context menu).  This will update all the projects
in the workspace using this repository (e.g., this updated both
classpath and cp-tools for me).

Tom


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Tom Tromey
 Mark == Mark Wielaard [EMAIL PROTECTED] writes:

Mark Or the fact
Mark that you really need to setup an external diff command since the
Mark built-in one is not capable enough. 

?  I haven't noticed this one.

Mark Also importing an old CVS repository like all of GCC seems possible now
Mark but there were some small anomalies. So the switch will have to be done
Mark carefully and will take some time to get right and double check.

GCC has a long and complicated history, including evil repository
hacking and re-basing branches using 'cvs admin'.  I'm sure the
Classpath import won't be as bad.

Tom


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Mark Wielaard
Hi,

On Mon, 2005-12-12 at 13:42 -0700, Tom Tromey wrote:
 Mark Or the fact
 Mark that you really need to setup an external diff command since the
 Mark built-in one is not capable enough. 
 
 ?  I haven't noticed this one.

See the bottom of http://gcc.gnu.org/wiki/SvnSetup
Again, not a showstopper, just another example of small configuration
issues. They do add up for people and it takes some time to be as
productive as before. Just like the fact that emacs or eclipse doesn't
come with subversion support out of box but require additional scripts
and plugins. Not a big deal, but still annoying when you are used to the
availability of CVS in each and every tool out there.

 Mark Also importing an old CVS repository like all of GCC seems possible now
 Mark but there were some small anomalies. So the switch will have to be done
 Mark carefully and will take some time to get right and double check.
 
 GCC has a long and complicated history, including evil repository
 hacking and re-basing branches using 'cvs admin'.  I'm sure the
 Classpath import won't be as bad.

I do hope so. But it will take time, energy and some patience to do it
correctly and check the conversion.

Lets continue the discussion if/when savannah actually support
subversion. No need to start nitpicking the pros and cons at this time.
I actually think we will agree that all the little drawbacks/flaws are
nothing compared to the productivity boost in the long run. 

Cheers,

Mark


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Nic Ferrier
Archie Cobbs [EMAIL PROTECTED] writes:

 For example, all of Apache is on a single Subversion server
 and they're up to revision #356264 (including imported CVS commits).
 We've used it at my real job for over a year with zero problems.

 As far as being supported, not sure what you're referring to.
 Everything I've ever wanted to do with CVS I can do with SVN, plus
 a lot more.

Subversion seems to be another of those gnu vs apache things.

gnu people *tend* to prefer CVS (and to a lesser extent arch) because
they offer more centralized control. CVS is most popular because it is
very stable and well understood.



Nic


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: [cp-patches] RFC: HTMLDocument.HTMLReader partial implementation

2005-12-12 Thread Robert Schuster
Hi,
no objections on my part but just one thing.

If, for some reason, the work on this is suspended for some time please file a 
bug.

Btw: Thanks for working on this. That is a big bad package. :)

cya
Robert

Anthony Balkissoon wrote:
 This is a partial implementation of HTMLDocument.HTMLReader.  I am still
 working on this, so it will be more fully implemented soon.
 
 I submit this as RFC because it has several methods that have nothing
 more than FIXME: Implement as well as some debugging statements.
 These are there so that Lillian and myself can work on the entire HTML
 package.  Since some of the classes she's working on require
 HTMLDocument.HTMLReader I want these methods to be available so her
 classes can build even if they are not yet implemented, with the
 understanding that I will implement them shortly.  The debugging
 (System.out.println) statements are there so that as we run test apps we
 can see how the different classes are linked together.
 
 Since we are the only two people that I know of working on this
 javax.swing.text.html package I don't think this should be a problem but
 I'm still asking if anyone has objections to me checking in this patch
 with stubs and println's.  Note that all of the stubs have FIXME notes
 and that the println's can easily be taken out before the next release
 if we haven't finished implementing the methods yet.
 
 Objections?
 
 2005-12-12  Anthony Balkissoon  [EMAIL PROTECTED]
 
   * javax/swing/text/html/HTMLDocument.java:
   (tokenThreshold): New field.
   (parser): New field.
   (getParser): New API method.
   (setParser): New API method.
   (getTokenThreshold): New API method.
   (setTokenThreshold): New API method.
   (HTMLReader): New API class, partially implemented.
   (HTMLReader.BlockAction): New API class, not implemented.
   (HTMLReader.CharacterAction): Likewise.
   (HTMLReader.FormAction): Likewise.
   (HTMLReader.HiddenAction): Likewise.
   (HTMLReader.IsindexAction): Likewise.
   (HTMLReader.ParagraphAction): Likewise.
   (HTMLReader.PreAction): Likewise.
   (HTMLReader.SpecialAction): Likewise.
   (HTMLReader.TagAction): New API class, implemented.
   * javax/swing/text/html/HTMLEditorKit.java:
   (createDefaultDocument): Set the parser for the new HTMLDocument.
 
 --Tony
 
 
 
 
 Index: javax/swing/text/html/HTMLDocument.java
 ===
 RCS file: 
 /cvsroot/classpath/classpath/javax/swing/text/html/HTMLDocument.java,v
 retrieving revision 1.7
 diff -u -r1.7 HTMLDocument.java
 --- javax/swing/text/html/HTMLDocument.java   9 Dec 2005 17:52:54 -   
 1.7
 +++ javax/swing/text/html/HTMLDocument.java   12 Dec 2005 22:25:59 -
 @@ -39,12 +39,18 @@
  package javax.swing.text.html;
  
  import java.net.URL;
 +import java.util.HashMap;
 +import java.util.Stack;
 +import java.util.Vector;
  
  import javax.swing.text.AbstractDocument;
  import javax.swing.text.AttributeSet;
 +import javax.swing.text.BadLocationException;
  import javax.swing.text.DefaultStyledDocument;
  import javax.swing.text.Element;
  import javax.swing.text.ElementIterator;
 +import javax.swing.text.MutableAttributeSet;
 +import javax.swing.text.SimpleAttributeSet;
  import javax.swing.text.html.HTML.Tag;
  
  /**
 @@ -60,6 +66,49 @@
public static final String AdditionalComments = AdditionalComments;
URL baseURL = null;
boolean preservesUnknownTags = true;
 +  int tokenThreshold = Integer.MAX_VALUE;
 +  HTMLEditorKit.Parser parser;
 +  
 +  /**
 +   * Returns the parser used by this HTMLDocument to insert HTML.
 +   * 
 +   * @return the parser used by this HTMLDocument to insert HTML.
 +   */
 +  public HTMLEditorKit.Parser getParser()
 +  {
 +return parser; 
 +  }
 +  
 +  /**
 +   * Sets the parser used by this HTMLDocument to insert HTML.
 +   * 
 +   * @param p the parser to use
 +   */
 +  public void setParser (HTMLEditorKit.Parser p)
 +  {
 +parser = p;
 +  }
 +  /**
 +   * Sets the number of tokens to buffer before trying to display the
 +   * Document.
 +   * 
 +   * @param n the number of tokens to buffer
 +   */
 +  public void setTokenThreshold (int n)
 +  {
 +tokenThreshold = n;
 +  }
 +  
 +  /**
 +   * Returns the number of tokens that are buffered before the document
 +   * is rendered.
 +   * 
 +   * @return the number of tokens buffered
 +   */
 +  public int getTokenThreshold ()
 +  {
 +return tokenThreshold;
 +  }

/**
 * Returns the location against which to resolve relative URLs.
 @@ -267,6 +316,769 @@
}

/**
 +   * A reader to load an HTMLDocument with HTML structure.
 +   * 
 +   * @author Anthony Balkissoon abalkiss at redhat dot com
 +   *
 +   */
 +  public class HTMLReader extends HTMLEditorKit.ParserCallback
 +  {
 +/** Holds the current character attribute set **/
 +

Re: lists.gnu.org and savannah.gnu.org (CVS) updates

2005-12-12 Thread Per Bothner

Nic Ferrier wrote:


Subversion seems to be another of those gnu vs apache things.

gnu people *tend* to prefer CVS (and to a lesser extent arch) because
they offer more centralized control. CVS is most popular because it is
very stable and well understood.


I think you're got things mixed up.

Subversion is basically a better cvs, centralized in the same way,

arch is oriented towards a more distributed setup.
--
--Per Bothner
[EMAIL PROTECTED]   http://per.bothner.com/


___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


[commit-cp] classpath ./ChangeLog javax/swing/ViewportLayou...

2005-12-12 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/12/12 13:24:22

Modified files:
.  : ChangeLog 
javax/swing: ViewportLayout.java 

Log message:
2005-12-12  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/ViewportLayout.java
(layoutContainer): Always check and adjust the size, not only when
portSize = view.minSize.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5792tr2=1.5793r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/ViewportLayout.java.diff?tr1=1.19tr2=1.20r1=textr2=text




[commit-cp] classpath/gnu/xml/stream XMLInputFactoryImpl.ja...

2005-12-12 Thread Chris Burdess
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Chris Burdess [EMAIL PROTECTED]   05/12/12 11:35:38

Modified files:
gnu/xml/stream : XMLInputFactoryImpl.java 
Added files:
gnu/xml/stream : CRLFReader.java XMLInputStreamReader.java 
 XMLParser.java 

Log message:
2005-12-12  Chris Burdess  [EMAIL PROTECTED]

* gnu/xml/stream/XMLInputFactoryImpl.java,
gnu/xml/stream/CRLFReader.java,
gnu/xml/stream/XMLInputStreamReader.java,
gnu/xml/stream/XMLParser.java: New StAX parser.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/CRLFReader.java?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XMLInputFactoryImpl.java.diff?tr1=1.2tr2=1.3r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XMLInputStreamReader.java?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XMLParser.java?rev=1.1




[commit-cp] classpath ./ChangeLog java/security/Security.java

2005-12-12 Thread Gary Benson
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Gary Benson [EMAIL PROTECTED] 05/12/12 15:28:48

Modified files:
.  : ChangeLog 
java/security  : Security.java 

Log message:
2005-12-12  Gary Benson  [EMAIL PROTECTED]

* java/security/Security.java (setProperty): Spelling correction.
* java/security/Security.java (setProperty): Allow null values.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5793tr2=1.5794r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/security/Security.java.diff?tr1=1.37tr2=1.38r1=textr2=text




[commit-cp] classpath ChangeLog

2005-12-12 Thread Chris Burdess
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Chris Burdess [EMAIL PROTECTED]   05/12/12 18:40:48

Modified files:
.  : ChangeLog 

Log message:
2005-12-12  Chris Burdess  [EMAIL PROTECTED]

* gnu/xml/stream/XMLInputFactoryImpl.java,
gnu/xml/stream/CRLFReader.java,
gnu/xml/stream/XMLInputStreamReader.java,
gnu/xml/stream/XMLParser.java: New StAX parser.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5794tr2=1.5795r1=textr2=text




[commit-cp] classpath ./ChangeLog gnu/xml/stream/XMLParser....

2005-12-12 Thread Chris Burdess
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Chris Burdess [EMAIL PROTECTED]   05/12/12 19:53:05

Modified files:
.  : ChangeLog 
gnu/xml/stream : XMLParser.java 
Added files:
gnu/xml/stream : SAXParser.java SAXParserFactory.java 

Log message:
2005-12-12  Chris Burdess  [EMAIL PROTECTED]

* gnu/xml/stream/SAXParser.java,
gnu/xml/stream/SAXParserFactory.java,
gnu/xml/stream/XMLParser.java: SAX parser using StAX implementation.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5795tr2=1.5796r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/SAXParser.java?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/SAXParserFactory.java?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XMLParser.java.diff?tr1=1.1tr2=1.2r1=textr2=text




[commit-cp] classpath ./ChangeLog lib/Makefile.am m4/acincl...

2005-12-12 Thread Dalibor Topic
CVSROOT:/sources/classpath
Module name:classpath
Branch: 
Changes by: Dalibor Topic [EMAIL PROTECTED]   05/12/13 01:20:29

Modified files:
.  : ChangeLog 
lib: Makefile.am 
m4 : acinclude.m4 

Log message:
Build breakage fix for jikes 1.19

2005-12-12  Dalibor Topic  [EMAIL PROTECTED]

Fixes bug #25353
* m4/acinclude.m4: Added JIKESWARNINGS makefile variable.
Only add +Pno-shadow to JIKESWARNINGS if not using jikes 1.19.
* lib/Makefile.am: Use JIKESWARNINGS instead of explicitely
listing the warnings.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5796tr2=1.5797r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/lib/Makefile.am.diff?tr1=1.105tr2=1.106r1=textr2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/m4/acinclude.m4.diff?tr1=1.7tr2=1.8r1=textr2=text