Re: [cp-patches] Patch: javax.print.attribute.HashAttributeSet fixlets

2005-11-13 Thread Mark Wielaard
Hi Wolfgang,

On Sun, 2005-11-13 at 20:58 +0100, Wolfgang Baer wrote:
> 2005-11-13  Wolfgang Baer  <[EMAIL PROTECTED]>
> 
> * javax/print/attribute/HashAttributeSet.java:
> Added api docs to class and clarified method documentation.
> (toArray): Use iterator from values instead of entries.
> (hashCode): Compute hashcode according to specification.
> (get): Throw NullPointerException if category is null.
> (HashAttributeSet(Attribute[], Class)): Changed to allow
> Attribute[] to be null.

Should a HashAttributeSet be thread-safe? In that case you will have to
synchronize on the attributeMap while manipulating it or iterating over
it.

>/**
> -   * Returns the hashcode for this object.
> -   *
> -   * @return the hashcode
> +   * Returns the hashcode value. The hashcode value is the sum of all 
> hashcodes
> +   * of the attributes contained in this set.
> +   * 
> +   * @return The hashcode for this attribute set.
> */
>public int hashCode()
>{
> -return attributeMap.hashCode() + interfaceName.hashCode();
> +int hashcode = 0;
> +Iterator it = attributeMap.values().iterator();
> +while (it.hasNext())
> +  hashcode = hashcode + it.next().hashCode();
> +  
> +return hashcode;
>}

It would be better to xor (^) the hashCode() values unless this
computation of the hashcode has been specified to use addition of
course. (Note the thread-safety issue above if there is a possibility
that some other thread adds or removes an attribute then this Iterator
could throw ConcurrentModificationException.)

> OK to commit ?

Yes if you can look at/answer the above two observations/questions.

Thanks,

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


[cp-patches] javax.swing.Timer rewrite

2005-11-13 Thread Mark Wielaard
Hi,

As discussed on the main list Timer was not behaving correctly. Joao
tested and suggested to just wrap util.Timer. And this seems to work
well and the code is much simpler now. Thanks Joao.

2005-11-13  Mark Wielaard  <[EMAIL PROTECTED]>

As suggested by Joao Victor <[EMAIL PROTECTED]>:
* javax/swing/Timer.java (Waker): Removed class.
(Task): New class.
(timer): New field.
(running): Removed field.
(waker): Likewise.
(task): New field.
(isRunning): Check whether task is null.
(start): Create task and schedule it with timer.
(stop): Cancel task and clear field.
(queueEvent): Synchronized on queueLock.

It would be appreciated if someone could try out this patch and see if
it works as expected. Mauve tests all pass and the programs that I
tested seem to work as expected.

BTW. While testing this patch I saw that DefaultCaret is not always
stopping its blinkingTimer when it looses focus. This is mostly harmless
since the caret is hidden in that case anyway. But it makes the Timer do
much more work then needed. I didn't completely understand the
interaction between the focus events, the visibility of the caret and
the textComponent editiable and enabled properties so I haven't fixed
this yet.

Cheers,

Mark
Index: javax/swing/Timer.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/Timer.java,v
retrieving revision 1.24
diff -u -r1.24 Timer.java
--- javax/swing/Timer.java	6 Nov 2005 22:59:25 -	1.24
+++ javax/swing/Timer.java	13 Nov 2005 23:12:30 -
@@ -46,7 +46,12 @@
 import javax.swing.event.EventListenerList;
 
 /**
- * Fires one or more action events after the specified delay.
+ * Fires one or more action events after the specified delay.  This is
+ * a specialised version of java.util.Timer just for
+ * firing ActionEvents. All Timers share one (daemon)
+ * Thread (or java.util.Timer). All events are fired from the event
+ * queue.
+ * 
  * @author Ronald Veldema
  * @author Audrius Meskauskas ([EMAIL PROTECTED]) - bug fixes
  * and documentation comments
@@ -55,64 +60,19 @@
   implements Serializable
 {
   /**
-   * The timer thread
+   * Given to the shared java.util.Timer to (possibly repeatedly) call
+   * queueEvent().
*/
-  private class Waker
-extends Thread
+  private class Task extends java.util.TimerTask
   {
-/**
- * Fires events, pausing for required intervals.
- */
 public void run()
 {
-  synchronized (queueLock)
-{
-	  try
-	{
-  try
-{
-  queueLock.wait(initialDelay);
-}
-  catch (InterruptedException e)
-{
-  // Ignored
-}
-
-  if (!running)
-return;
-
-  queueEvent();
-
-  if (repeats)
-while (running)
-  {
-try
-  {
-queueLock.wait(delay);
-  }
-catch (InterruptedException e)
-  {
- // Ignored
-  }
-
-if (!running)
-  break;
-
-queueEvent();
-
-if (logTimers)
-  System.out.println("javax.swing.Timer -> clocktick");
-
-if (!repeats)
-  break;
-  }
-}
-	  finally
-	{
-	  // The timer is no longer running.
-	  running = false;
-	}
-}
+  if (logTimers)
+	System.out.println("javax.swing.Timer -> queueEvent()");
+  queueEvent();
+
+  if (!repeats)
+	task = null;
 }
   }
 
@@ -134,6 +94,14 @@
 };
 
   /**
+   * The static java.util.Timer daemon which will be used to schedule
+   * all javax.swing.Timer.Task objects. The daemon will always be
+   * running, even if there's no task scheduled in it.
+   */
+  private static java.util.Timer timer = new java.util.Timer("swing.Timer",
+			 true);
+
+  /**
* If true, the timer prints a message to
* [EMAIL PROTECTED] System#out} when firing each event.
*/
@@ -155,12 +123,6 @@
   boolean repeats = true;
 
   /**
-   * true if the timer is currently active, firing events
-   * as scheduled. Should only be checked/set with queueLock held.
-   */
-  boolean running;
-
-  /**
* The delay between subsequent repetetive events.
*/
   int delay;
@@ -178,10 +140,9 @@
   int ticks;
 
   /**
-   * Stores the thread that posts events to the queue at required time
-   * intervals.
+   * The task that calls queueEvent(). When null this Timer is stopped.
*/
-  private Waker waker;
+  private Task task;
 
   /**
* This object manages a "queue" of virtual actionEvents, maintained as a
@@ -376,7 +337,7 @@
*/
   public boolean isRunning()
   {
-   

[cp-patches] VMStackWalker infinite loop fix

2005-11-13 Thread Archie Cobbs

I've committed the attached patch to fix an infinite loop
between VMStackWalker.getCallingClassLoader() and Class.getClassLoader().

2005-11-13  Archie Cobbs  <[EMAIL PROTECTED]>

* vm/reference/gnu/classpath/VMStackWalker.java (getClassLoader()):
added to fix an infinite loop bug.
* NEWS: note VM interface change.

-Archie

__
Archie Cobbs  *CTO, Awarix*  http://www.awarix.com
Index: NEWS
===
RCS file: /cvsroot/classpath/classpath/NEWS,v
retrieving revision 1.104
diff -u -r1.104 NEWS
--- NEWS2 Nov 2005 22:31:47 -   1.104
+++ NEWS13 Nov 2005 22:25:48 -
@@ -1,3 +1,10 @@
+New in release 0.20
+
+Runtime interface changes:
+
+* New method VMStackWalker.getClassLoader() was added to avoid an infinite
+  loop between getCallingClassLoader() and Class.getClassLoader().
+
 New in release 0.19 (Nov 2, 2005)
 
 * The Swing RepaintManager has been reworked for more efficient painting,
Index: vm/reference/gnu/classpath/VMStackWalker.java
===
RCS file: 
/cvsroot/classpath/classpath/vm/reference/gnu/classpath/VMStackWalker.java,v
retrieving revision 1.5
diff -u -r1.5 VMStackWalker.java
--- vm/reference/gnu/classpath/VMStackWalker.java   2 Jul 2005 20:33:08 
-   1.5
+++ vm/reference/gnu/classpath/VMStackWalker.java   13 Nov 2005 22:25:51 
-
@@ -88,9 +88,9 @@
 
   /**
* Get the class loader associated with the Class returned by
-   * getCallingClass(), or null if no
-   * such class exists or it is the boot loader. This method is an optimization
-   * for the expression getClassContext()[1].getClassLoader()
+   * getCallingClass(), or null if no such class
+   * exists or it is the boot loader. This method is an optimization for the
+   * expression VMStackWalker.getClassLoader(getClassContext()[1])
* and should return the same result.
*
* 
@@ -102,7 +102,15 @@
 Class[] ctx = getClassContext();
 if (ctx.length < 3)
   return null;
-return ctx[2].getClassLoader();
+return getClassLoader(ctx[2]);
   }
+
+  /**
+   * Retrieve the class's ClassLoader, or null if loaded
+   * by the bootstrap loader. I.e., this should return the same thing
+   * as [EMAIL PROTECTED] java.lang.VMClass#getClassLoader}. This duplicate 
version
+   * is here to work around access permissions.
+   */
+  public static native ClassLoader getClassLoader(Class cl);
 }
 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: Getting the system clipboard in javax/swing/TransferHandler

2005-11-13 Thread Meskauskas Audrius
The private method getClipboard in TransferHandler was always returning 
the VM local clipboard and not the system clipboard in the case when the 
security manager is not installed (typical case).


With this patch, I am able to paste the external data from the system 
clipboard into the text field if manually calling the .paste() method 
(test case for PR 24733 
). Ctrl-V still does 
not show any signs of life.


PR 24733 
2005-11-13  Audrius Meskauskas  <[EMAIL PROTECTED]>

* javax/swing/TransferHandler.java (getClipboard): Rewritten.

Index: javax/swing/TransferHandler.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/TransferHandler.java,v
retrieving revision 1.10
diff -u -r1.10 TransferHandler.java
--- javax/swing/TransferHandler.java19 Oct 2005 15:45:05 -  1.10
+++ javax/swing/TransferHandler.java13 Nov 2005 19:19:44 -
@@ -75,30 +75,38 @@
}
 }
   
+/**
+ * Get the system cliboard. If not available, create and return the 
VM-local
+ * clipboard.
+ * 
+ * @param component a component, used to get the toolkit.
+ * @return the clipboard
+ */
 private static Clipboard getClipboard(JComponent component)
 {
-  SecurityManager sm = System.getSecurityManager();
-
-  if (sm != null)
-   {
- try
-   {
- sm.checkSystemClipboardAccess();
+  // Avoid throwing exception if the system clipboard access failed
+  // in the past.
+  if (clipboard != null)
+return clipboard;
+  else
+{
+  try
+{
+  SecurityManager sm = System.getSecurityManager();
+  if (sm != null)
+sm.checkSystemClipboardAccess();
 
- // We may access system clipboard.
- return component.getToolkit().getSystemClipboard();
-   }
- catch (SecurityException e)
-   {
- // We may not access system clipboard.
-   }
-   }
-
-  // Create VM-local clipboard if non exists yet.
-  if (clipboard == null)
-clipboard = new Clipboard("Clipboard");
-
-  return clipboard;
+  // We may access system clipboard.
+  return component.getToolkit().getSystemClipboard();
+}
+  catch (Exception e)
+{
+  // We may not access system clipboard.
+  // Create VM-local clipboard if none exists yet.
+  clipboard = new Clipboard("Clipboard");
+  return clipboard;
+}
+}
 }
   }
   
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Patch: javax.print.attribute.HashAttributeSet fixlets

2005-11-13 Thread Wolfgang Baer

Hi,

this patch adds and enhances api docs all over the class.
Futher it fixes some minor bugs found by the mauve tests for this class.

2005-11-13  Wolfgang Baer  <[EMAIL PROTECTED]>

* javax/print/attribute/HashAttributeSet.java:
Added api docs to class and clarified method documentation.
(toArray): Use iterator from values instead of entries.
(hashCode): Compute hashcode according to specification.
(get): Throw NullPointerException if category is null.
(HashAttributeSet(Attribute[], Class)): Changed to allow Attribute[]
to be null.

OK to commit ?

Regards,
Wolfgang
Index: javax/print/attribute/HashAttributeSet.java
===
RCS file: /cvsroot/classpath/classpath/javax/print/attribute/HashAttributeSet.java,v
retrieving revision 1.4
diff -u -r1.4 HashAttributeSet.java
--- javax/print/attribute/HashAttributeSet.java	2 Jul 2005 20:32:46 -	1.4
+++ javax/print/attribute/HashAttributeSet.java	13 Nov 2005 19:53:59 -
@@ -1,5 +1,5 @@
 /* HashAttributeSet.java -- 
-   Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -41,6 +41,10 @@
 import java.util.HashMap;
 import java.util.Iterator;
 
+/**
+ * HashAttributeSet provides an implementation of
+ * [EMAIL PROTECTED] javax.print.attribute.AttributeSet}.
+ */
 public class HashAttributeSet implements AttributeSet, Serializable
 {
   private static final long serialVersionUID = 5311560590283707917L;
@@ -73,9 +77,11 @@
* Creates a HashAttributeSet object with the given
* attributes in it.
*
-   * @param attributes the attributes to put into the set
+   * @param attributes the array of attributes to put into the set. If
+   * null an empty set is created.
*
-   * @exception NullPointerException If attributes is null
+   * @exception NullPointerException if one of the attributes of the given
+   * array is null.
*/
   public HashAttributeSet(Attribute[] attributes)
   {
@@ -83,12 +89,11 @@
   }
 
   /**
-   * Creates a HashAttributeSet object with the given
-   * attributes in it.
-   *
-   * @param attributes the attributes to put into the set
+   * Creates a HashAttributeSet object with attributes
+   * of the given attributes set in it.
*
-   * @exception NullPointerException If attributes is null
+   * @param attributes the attributes set to put into the set. If 
+   * null an empty set is created.
*/
   public HashAttributeSet(AttributeSet attributes)
   {
@@ -111,7 +116,11 @@
   }
   
   /**
-   * Creates an empty HashAttributeSet object.
+   * Creates a HashAttributeSet object with the given
+   * attribute in it.
+   * 
+   * @param attribute the attribute to put into the set.
+   * @param interfaceName the interface that all members must implement.
*
* @exception ClassCastException if attribute is not an interface of
* interfaceName
@@ -128,7 +137,12 @@
   }
 
   /**
-   * Creates an empty HashAttributeSet object.
+   * Creates a HashAttributeSet object with the given
+   * attributes in it.
+   *
+   * @param attributes the array of attributes to put into the set. If
+   * null an empty set is created.
+   * @param interfaceName the interface that all members must implement.
*
* @exception ClassCastException if any element of attributes is not an
* interface of interfaceName
@@ -138,15 +152,20 @@
   {
 this(interfaceName);
 
-if (attributes == null)
-  throw new NullPointerException();
-
-for (int index = 0; index < attributes.length; index++)
-  addInternal(attributes[index], interfaceName);
+if (attributes != null)
+  {
+for (int index = 0; index < attributes.length; index++)
+  addInternal(attributes[index], interfaceName);
+  }
   }
 
   /**
-   * Creates an empty HashAttributeSet object.
+   * Creates a HashAttributeSet object with attributes
+   * of the given attributes set in it.
+   *
+   * @param attributes the attributes set to put into the set. If 
+   * null an empty set is created.
+   * @param interfaceName the interface that all members must implement.
*
* @exception ClassCastException if any element of attributes is not an
* interface of interfaceName
@@ -160,15 +179,16 @@
   }
 
   /**
-   * Adds the given attribute to the set.
-   *
-   * @param attribute the attribute to add
-   *
-   * @return true if the attribute set has changed, false otherwise
-   *
-   * @exception NullPointerException if attribute is null
-   * @exception UnmodifiableSetException if this attribute set does not
-   * support this action.
+   * Adds the specified attribute value to this attribute set 
+   * if it is not already present.
+   * 
+   * This operation removes any existing attribute of the same category 
+   * before adding the given attribute to the set. 
+   * 
+   * @param attribute the attribute to

Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Tom Tromey
Anthony> Nice.  But for file I/O, shouldn't we just write a libsndfile
Anthony> provider?

Yeah, good idea.
Though, having some in pure java may also be useful.  I think we can
decide not to decide and just accept whatever folks write...

Tom


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


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Anthony Green
On Sun, 2005-11-13 at 11:23 -0700, Tom Tromey wrote:
> > "Anthony" == Anthony Green <[EMAIL PROTECTED]> writes:
> 
> Anthony> I think you should just commit this.  I've started a jack
> Anthony> based MixerProvider based on your work, and expect to finish
> Anthony> this week during my travels.
> 
> Awesome.  Also, Sven sent me some code to handle AU files.  Maybe he
> could post that here...

Nice.  But for file I/O, shouldn't we just write a libsndfile provider?

> I'm going to go ahead and check this in now.

Great.

AG




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


Re: [cp-patches] FYI: API docs update javax.print.attribute

2005-11-13 Thread Wolfgang Baer

Sorry the changlog slipped into the patch. Here the patch without
the changelog entry.

Wolfgang

2005-11-13  Wolfgang Baer  <[EMAIL PROTECTED]>

* javax/print/attribute/HashDocAttributeSet.java,
* javax/print/attribute/HashPrintJobAttributeSet.java,
* javax/print/attribute/HashPrintRequestAttributeSet.java,
* javax/print/attribute/HashPrintServiceAttributeSet.java,
Added class api docs and enhanced method api docs.


Index: javax/print/attribute/HashDocAttributeSet.java
===
RCS file: /cvsroot/classpath/classpath/javax/print/attribute/HashDocAttributeSet.java,v
retrieving revision 1.2
diff -u -r1.2 HashDocAttributeSet.java
--- javax/print/attribute/HashDocAttributeSet.java	2 Jul 2005 20:32:46 -	1.2
+++ javax/print/attribute/HashDocAttributeSet.java	13 Nov 2005 18:56:12 -
@@ -1,5 +1,5 @@
 /* HashDocAttributeSet.java -- 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,10 @@
 
 import java.io.Serializable;
 
+/**
+ * HashDocAttributeSet provides an implementation of
+ * [EMAIL PROTECTED] javax.print.attribute.DocAttributeSet}.
+ */
 public class HashDocAttributeSet extends HashAttributeSet
   implements DocAttributeSet, Serializable
 {
@@ -56,7 +60,7 @@
* Creates a HashDocAttributeSet object with the given
* attribute in it.
*
-   * @param attribute the attriute tu put into the attribute set
+   * @param attribute the attribute to put into the attribute set
*
* @exception NullPointerException if attribute is null
*/
@@ -69,9 +73,11 @@
* Creates a HashDocAttributeSet object with the given
* attributes in it.
*
-   * @param attributes the attributes to put into the attribute set
+   * @param attributes the array of attributes to put into the set. If
+   * null an empty set is created.
*
-   * @exception NullPointerException if attributes is null
+   * @exception NullPointerException if one of the attributes of the given
+   * array is null.
*/
   public HashDocAttributeSet(DocAttribute[] attributes)
   {
@@ -79,11 +85,11 @@
   }
 
   /**
-   * Creates a HashDocAttributeSet object with the given
-   * attributes in it.
-   *
-   * @param attributes the attributes to put into the attribute set
+   * Creates a HashDocAttributeSet object with the attributes
+   * of the given attributes set in it.
*
+   * @param attributes the attributes set to put into the set. If 
+   * null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of DocAttribute
*/
Index: javax/print/attribute/HashPrintJobAttributeSet.java
===
RCS file: /cvsroot/classpath/classpath/javax/print/attribute/HashPrintJobAttributeSet.java,v
retrieving revision 1.2
diff -u -r1.2 HashPrintJobAttributeSet.java
--- javax/print/attribute/HashPrintJobAttributeSet.java	2 Jul 2005 20:32:46 -	1.2
+++ javax/print/attribute/HashPrintJobAttributeSet.java	13 Nov 2005 18:56:12 -
@@ -1,5 +1,5 @@
 /* HashPrintJobAttributeSet.java -- 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,10 @@
 
 import java.io.Serializable;
 
+/**
+ * HashPrintJobAttributeSet provides an implementation of
+ * [EMAIL PROTECTED] javax.print.attribute.PrintJobAttributeSet}.
+ */
 public class HashPrintJobAttributeSet extends HashAttributeSet
   implements Serializable, PrintJobAttributeSet
 {
@@ -56,7 +60,7 @@
* Creates a HashPrintJobAttributeSet object with the given
* attribute in it.
*
-   * @param attribute the attriute tu put into the attribute set
+   * @param attribute the attribute to put into the attribute set
*
* @exception NullPointerException if attribute is null
*/
@@ -69,9 +73,11 @@
* Creates a HashPrintJobAttributeSet object with the given
* attributes in it.
*
-   * @param attributes the attributes to put into the attribute set
+   * @param attributes the array of attributes to put into the set. If
+   * null an empty set is created.
*
-   * @exception NullPointerException if attributes is null
+   * @exception NullPointerException if one of the attributes of the given
+   * array is null.
*/
   public HashPrintJobAttributeSet(PrintJobAttribute[] attributes)
   {
@@ -79,11 +85,11 @@
   }
   
   /**
-   * Creates a HashPrintJobAttributeSet object with the given
-   * attributes in it.
-   *
-   * @param attributes the attributes to put into the attribute set
+   * Creates a HashPrintJobAttributeSet object with the attributes
+   * of the given attributes set in it.
*
+   * @param attributes the attributes set to put into the set. If 
+   * null an empty set is created.
* @exception ClassCastExc

[cp-patches] FYI: API docs update javax.print.attribute

2005-11-13 Thread Wolfgang Baer

Hi,

this adds and enhances some api docs for some classes
in javax.print.attribute.

2005-11-13  Wolfgang Baer  <[EMAIL PROTECTED]>

* javax/print/attribute/HashDocAttributeSet.java,
* javax/print/attribute/HashPrintJobAttributeSet.java,
* javax/print/attribute/HashPrintRequestAttributeSet.java,
* javax/print/attribute/HashPrintServiceAttributeSet.java,
Added class api docs and enhanced method api docs.

Regards,
Wolfgang


Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.5565
diff -u -r1.5565 ChangeLog
--- ChangeLog	13 Nov 2005 17:36:10 -	1.5565
+++ ChangeLog	13 Nov 2005 18:56:12 -
@@ -1,3 +1,11 @@
+2005-11-13  Wolfgang Baer  <[EMAIL PROTECTED]>
+
+	* javax/print/attribute/HashDocAttributeSet.java,
+	* javax/print/attribute/HashPrintJobAttributeSet.java,
+	* javax/print/attribute/HashPrintRequestAttributeSet.java,
+	* javax/print/attribute/HashPrintServiceAttributeSet.java,
+	Added class api docs and enhanced method api docs.
+
 2005-11-13  Tom Tromey  <[EMAIL PROTECTED]>
 
 	* native/jni/midi-dssi/.cvsignore: Updated.
Index: javax/print/attribute/HashDocAttributeSet.java
===
RCS file: /cvsroot/classpath/classpath/javax/print/attribute/HashDocAttributeSet.java,v
retrieving revision 1.2
diff -u -r1.2 HashDocAttributeSet.java
--- javax/print/attribute/HashDocAttributeSet.java	2 Jul 2005 20:32:46 -	1.2
+++ javax/print/attribute/HashDocAttributeSet.java	13 Nov 2005 18:56:12 -
@@ -1,5 +1,5 @@
 /* HashDocAttributeSet.java -- 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,10 @@
 
 import java.io.Serializable;
 
+/**
+ * HashDocAttributeSet provides an implementation of
+ * [EMAIL PROTECTED] javax.print.attribute.DocAttributeSet}.
+ */
 public class HashDocAttributeSet extends HashAttributeSet
   implements DocAttributeSet, Serializable
 {
@@ -56,7 +60,7 @@
* Creates a HashDocAttributeSet object with the given
* attribute in it.
*
-   * @param attribute the attriute tu put into the attribute set
+   * @param attribute the attribute to put into the attribute set
*
* @exception NullPointerException if attribute is null
*/
@@ -69,9 +73,11 @@
* Creates a HashDocAttributeSet object with the given
* attributes in it.
*
-   * @param attributes the attributes to put into the attribute set
+   * @param attributes the array of attributes to put into the set. If
+   * null an empty set is created.
*
-   * @exception NullPointerException if attributes is null
+   * @exception NullPointerException if one of the attributes of the given
+   * array is null.
*/
   public HashDocAttributeSet(DocAttribute[] attributes)
   {
@@ -79,11 +85,11 @@
   }
 
   /**
-   * Creates a HashDocAttributeSet object with the given
-   * attributes in it.
-   *
-   * @param attributes the attributes to put into the attribute set
+   * Creates a HashDocAttributeSet object with the attributes
+   * of the given attributes set in it.
*
+   * @param attributes the attributes set to put into the set. If 
+   * null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of DocAttribute
*/
Index: javax/print/attribute/HashPrintJobAttributeSet.java
===
RCS file: /cvsroot/classpath/classpath/javax/print/attribute/HashPrintJobAttributeSet.java,v
retrieving revision 1.2
diff -u -r1.2 HashPrintJobAttributeSet.java
--- javax/print/attribute/HashPrintJobAttributeSet.java	2 Jul 2005 20:32:46 -	1.2
+++ javax/print/attribute/HashPrintJobAttributeSet.java	13 Nov 2005 18:56:12 -
@@ -1,5 +1,5 @@
 /* HashPrintJobAttributeSet.java -- 
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -39,6 +39,10 @@
 
 import java.io.Serializable;
 
+/**
+ * HashPrintJobAttributeSet provides an implementation of
+ * [EMAIL PROTECTED] javax.print.attribute.PrintJobAttributeSet}.
+ */
 public class HashPrintJobAttributeSet extends HashAttributeSet
   implements Serializable, PrintJobAttributeSet
 {
@@ -56,7 +60,7 @@
* Creates a HashPrintJobAttributeSet object with the given
* attribute in it.
*
-   * @param attribute the attriute tu put into the attribute set
+   * @param attribute the attribute to put into the attribute set
*
* @exception NullPointerException if attribute is null
*/
@@ -69,9 +73,11 @@
* Creates a HashPrintJobAttributeSet object with the given
* attributes in it.
*
-   * @param attributes the attributes to put into the attribute set
+   * @param attributes the array of attributes to put into the 

[cp-patches] Patch: FYI: .cvsignore cleanups

2005-11-13 Thread Tom Tromey
I'm checking this in.
This adds or updates .cvsignore in a few places.

Tom

2005-11-13  Tom Tromey  <[EMAIL PROTECTED]>

* native/jni/midi-dssi/.cvsignore: Updated.
* native/jni/midi-alsa/.cvsignore: New file.
* lib/.cvsignore: Updated.

Index: lib/.cvsignore
===
RCS file: /cvsroot/classpath/classpath/lib/.cvsignore,v
retrieving revision 1.18
diff -u -r1.18 .cvsignore
--- lib/.cvsignore  19 Aug 2005 15:37:56 -  1.18
+++ lib/.cvsignore  13 Nov 2005 17:34:23 -
@@ -31,3 +31,4 @@
 META-INF
 Makefile.deps
 lists
+copy-vmresources.sh
Index: native/jni/midi-alsa/.cvsignore
===
RCS file: /cvsroot/classpath/classpath/native/jni/midi-alsa/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- native/jni/midi-alsa/.cvsignore 14 Oct 2005 05:33:06 -  1.1
+++ native/jni/midi-alsa/.cvsignore 13 Nov 2005 17:34:23 -
@@ -5,3 +5,5 @@
 .libs
 .depsMakefile
 Makefile.in
+Makefile
+.deps
Index: native/jni/midi-dssi/.cvsignore
===
RCS file: /cvsroot/classpath/classpath/native/jni/midi-dssi/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- native/jni/midi-dssi/.cvsignore 14 Oct 2005 05:33:06 -  1.1
+++ native/jni/midi-dssi/.cvsignore 13 Nov 2005 17:34:23 -
@@ -5,3 +5,5 @@
 .libs
 .depsMakefile
 Makefile.in
+.deps
+Makefile


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


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Tom Tromey
> "Anthony" == Anthony Green <[EMAIL PROTECTED]> writes:

Anthony> I think you should just commit this.  I've started a jack
Anthony> based MixerProvider based on your work, and expect to finish
Anthony> this week during my travels.

Awesome.  Also, Sven sent me some code to handle AU files.  Maybe he
could post that here...

I'm going to go ahead and check this in now.

Tom


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


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Tom Tromey
> "Michael" == Michael Koch <[EMAIL PROTECTED]> writes:

Michael> I would say: Please commit. Bugs can be fixed later. Its too
Michael> bad that we cant just use tritonus ...

We can probably use the parts that hook it up to ALSA and whatnot.
I was using Tritonus for testing, but apparently it assumes that the
runtime has a couple of built-in providers.

Tom


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


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Anthony Green
On Sat, 2005-11-12 at 17:51 -0700, Tom Tromey wrote:
> I'm not checking this in yet.  I haven't really done much testing of
> it, and I wanted some feedback first as well.
> 
> This implements javax.sound.sampled and javax.sound.sampled.spi.

I think you should just commit this.  I've started a jack based
MixerProvider based on your work, and expect to finish this week during
my travels.

AG




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


Re: [cp-patches] Patch: javax.print.attribute.EnumSyntax

2005-11-13 Thread Wolfgang Baer

Mark Wielaard wrote:

Hi,

On Sat, 2005-11-12 at 21:06 +0100, Wolfgang Baer wrote:


2005-11-12  Wolfgang Baer  <[EMAIL PROTECTED]>

   * javax/print/attribute/EnumSyntax.java:
   API docs added and enhanced for class and methods.
   (readResolve): New method.

OK to commit ?



Yes please.


Committed.

Wolfgang


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


[cp-patches] FYI: CORBA 1.5 API fixes

2005-11-13 Thread Meskauskas Audrius

This adds several missing 1.5 methods.

2005-11-13  Audrius Meskauskas  <[EMAIL PROTECTED]>

   * gnu/CORBA/Interceptor/gnuIorInfo.java (state): Made public.
   * gnu/CORBA/Interceptor/gnuServerRequestInfo.java
   (adapter_name, orb_id, server_id): New methods.
   * org/omg/PortableInterceptor/IORInfoOperations.java
   (state): New method.
   * org/omg/PortableInterceptor/ServerRequestInfoOperations.java
   (adapter_name, orb_id, server_id): New methods.
Index: gnu/CORBA/Interceptor/gnuIorInfo.java
===
RCS file: /cvsroot/classpath/classpath/gnu/CORBA/Interceptor/gnuIorInfo.java,v
retrieving revision 1.2
diff -u -r1.2 gnuIorInfo.java
--- gnu/CORBA/Interceptor/gnuIorInfo.java   11 Nov 2005 11:39:34 -  
1.2
+++ gnu/CORBA/Interceptor/gnuIorInfo.java   13 Nov 2005 09:40:36 -
@@ -115,7 +115,7 @@
   /**
* Return the state of the object POA.
*/
-  short state()
+  public short state()
   {
 return (short) poa.the_POAManager().get_state().value();
   }
Index: gnu/CORBA/Interceptor/gnuServerRequestInfo.java
===
RCS file: 
/cvsroot/classpath/classpath/gnu/CORBA/Interceptor/gnuServerRequestInfo.java,v
retrieving revision 1.1
diff -u -r1.1 gnuServerRequestInfo.java
--- gnu/CORBA/Interceptor/gnuServerRequestInfo.java 28 Aug 2005 11:23:37 
-  1.1
+++ gnu/CORBA/Interceptor/gnuServerRequestInfo.java 13 Nov 2005 09:53:02 
-
@@ -42,6 +42,7 @@
 import gnu.CORBA.GIOP.RequestHeader;
 import gnu.CORBA.ObjectCreator;
 import gnu.CORBA.Poa.gnuServantObject;
+import gnu.CORBA.OrbFunctional;
 import gnu.CORBA.Unexpected;
 import gnu.CORBA.gnuRequest;
 
@@ -453,4 +454,23 @@
   }
 return p;
   }
+
+  /** @inheritDoc */
+  public String[] adapter_name()
+  {
+return m_object.poa.getReferenceTemplate().adapter_name();
+  }
+
+  /** @inheritDoc */
+  public String orb_id()
+  {
+return m_object.orb.orb_id;
+  }
+
+  /** @inheritDoc */
+  public String server_id()
+  {
+return OrbFunctional.server_id;
+  }
+  
 }
Index: org/omg/PortableInterceptor/IORInfoOperations.java
===
RCS file: 
/cvsroot/classpath/classpath/org/omg/PortableInterceptor/IORInfoOperations.java,v
retrieving revision 1.3
diff -u -r1.3 IORInfoOperations.java
--- org/omg/PortableInterceptor/IORInfoOperations.java  11 Nov 2005 11:39:34 
-  1.3
+++ org/omg/PortableInterceptor/IORInfoOperations.java  13 Nov 2005 09:40:54 
-
@@ -124,4 +124,15 @@
* @see IORInterceptor_3_0Operations#adapter_manager_state_changed
*/
   public int manager_id();
+  
+  /**
+   * Get the state of the adapter manager.
+   * 
+   * @since 1.5
+   * 
+   * @return the state of the adapters to that the IOR being created belongs.
+   * One of the [EMAIL PROTECTED] HOLDING#value}, [EMAIL PROTECTED] 
DISCARDING#value},
+   * [EMAIL PROTECTED] INACTIVE#value} or [EMAIL PROTECTED] 
NON_EXISTENT#value}.
+   */
+  short state(); 
 }
Index: org/omg/PortableInterceptor/ServerRequestInfoOperations.java
===
RCS file: 
/cvsroot/classpath/classpath/org/omg/PortableInterceptor/ServerRequestInfoOperations.java,v
retrieving revision 1.1
diff -u -r1.1 ServerRequestInfoOperations.java
--- org/omg/PortableInterceptor/ServerRequestInfoOperations.java28 Aug 
2005 11:23:37 -  1.1
+++ org/omg/PortableInterceptor/ServerRequestInfoOperations.java13 Nov 
2005 09:49:44 -
@@ -216,7 +216,8 @@
  *
  * @author Audrius Meskauskas, Lithuania ([EMAIL PROTECTED])
  */
-public interface ServerRequestInfoOperations extends RequestInfoOperations
+public interface ServerRequestInfoOperations
+  extends RequestInfoOperations
 {
   /**
* Allows the interceptor to add service contexts to the request. Such added
@@ -231,9 +232,7 @@
* @throws BAD_INV_ORDER minor 15 if the context with the same Id already
* exists and replace=false.
*/
-  void add_reply_service_context(ServiceContext service_context,
-boolean replace
-  );
+  void add_reply_service_context(ServiceContext service_context, boolean 
replace);
 
   /**
* Get the identifier for the object adapter (POA).
@@ -257,14 +256,15 @@
* @throws INV_POLICY minor 2 if no factory was registered to produce this
* type of policy or the policy is otherwise invalid.
*/
-  Policy get_server_policy(int type) throws INV_POLICY;
+  Policy get_server_policy(int type)
+throws INV_POLICY;
 
   /**
* Get the exception to be returned to the client. If the returned Any cannot
* not support holding of that exception, it holds
* [EMAIL PROTECTED] org.omg.CORBA.UNKNOWN} minor 1 instead.
*
-   * @return an Any, holding exception that has been thrown and will be 
returned
+   * @return an Any, holding exception that has been thrown and will be 
returned
* to client.
*/
   Any send

Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Michael Koch
On Sat, Nov 12, 2005 at 05:51:55PM -0700, Tom Tromey wrote:
> I'm not checking this in yet.  I haven't really done much testing of
> it, and I wanted some feedback first as well.
> 
> This implements javax.sound.sampled and javax.sound.sampled.spi.

I would say: Please commit. Bugs can be fixed later. Its too bad that we
cant just use tritonus ...


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

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


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


Re: [cp-patches] Patch: API docs for javax/print/attribute Interfaces and Exception

2005-11-13 Thread Wolfgang Baer

Mark Wielaard wrote:

Hi Wolfgang,

On Sat, 2005-11-12 at 20:39 +0100, Wolfgang Baer wrote:


this adds documentation to the interfaces and one exception
in javax.print.attribute.

2005-11-12  Wolfgang Baer  <[EMAIL PROTECTED]>

* javax/print/attribute/Attribute.java,
javax/print/attribute/AttributeSet.java,
javax/print/attribute/DocAttribute.java,
javax/print/attribute/DocAttributeSet.java,
javax/print/attribute/PrintJobAttribute.java,
javax/print/attribute/PrintJobAttributeSet.java,
javax/print/attribute/PrintRequestAttribute.java,
javax/print/attribute/PrintRequestAttributeSet.java,
javax/print/attribute/PrintServiceAttribute.java,
javax/print/attribute/PrintServiceAttributeSet.java,
javax/print/attribute/SupportedValuesAttribute.java,
javax/print/attribute/UnmodifiableSetException.java:
Added api documentation to class and method definitions.
* javax/print/attribute/package.html: Included a package
description.

OK to commit ?



Yes, very nice.


Commited.


Please feel free to commit further documentation additions without
needing to ask for permission.


OK

Wolfgang


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


Re: [cp-patches] Patch: RFC: javax.sound.sampled

2005-11-13 Thread Meskauskas Audrius

+1

Audrius.




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