Re: [cp-patches] RFC: Datatypes library
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Burdess wrote: This patch adds the RELAX NG pluggable datatypes library to Classpath. This API, and an implementation of it, will be used by the W3C XML Schema and RELAX NG JAXP validators currently in development. [...] Please let me know how you feel about this. I feel supergood :-D thanks Chris ;-) - -- Arnaud Vandyck ,= ,-_-. =. ((_/)o o(\_)) `-'(. .)`-' \_/ Java Trap: http://www.gnu.org/philosophy/java-trap.html -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFD4gSA4vzFZu62tMIRAtTUAJ9BT4H9x/8vSdWcdT5nLr518vnVIwCgoXxm RC8lqdaJbxOjLyYAgnxFw/Y= =7ljt -END PGP SIGNATURE-
Re: [cp-patches] Use gnu.java.security.jce.sig.DSSKeyPairGeneratorSpi for DSS/DSA
On Thursday 02 February 2006 02:42, Casey Marshall wrote: On Jan 30, 2006, at 3:55 AM, Mark Wielaard wrote: Hi Raif, On Mon, 2006-01-30 at 19:57 +1100, Raif S. Naffah wrote: this patch designates gnu.java.security.jce.sig.DSSKeyPairGeneratorSpi as the implementation of DSS (alias DSA), effectively crippling gnu.java.security.provider.DSAKeyPairGenerator. I am not an expert on the different implementations of this algorithm. But if you and Casey agree on this and there are some test results that show no regressions then I would say go for it. One thing we should make sure of is that all keys returned by this generator have `getEncoded' methods that return ASN.1 encoded data. The key implementations already in GNU Classpath should all do this, and IIRC, none of GNU Crypto's do. correct. none so far. cheers; rsn pgpZq6ZSJaRK0.pgp Description: PGP signature
[cp-patches] FYI: Make AbstractCollection.toString() more robust
Hi, This makes AbstractCollection.toString() more robust by only using the Iterator (in case some subclass has a strange or expensive size() implementation) and deals with collections directly containing themselves. 2006-02-02 Mark Wielaard [EMAIL PROTECTED] Fixes bug #25769 reported by Artemus Harper [EMAIL PROTECTED] * java/util/AbstractCollection.java (toString): Only use Iterator, check whether collection contains itself. A Mauve test was added that passes with this patch. Committed, Mark Index: java/util/AbstractCollection.java === RCS file: /cvsroot/classpath/classpath/java/util/AbstractCollection.java,v retrieving revision 1.17 diff -u -r1.17 AbstractCollection.java --- java/util/AbstractCollection.java 2 Jul 2005 20:32:41 - 1.17 +++ java/util/AbstractCollection.java 2 Feb 2006 13:23:56 - @@ -423,7 +423,9 @@ * of the form [a, b, ...] where a and b etc are the results of calling * toString on the elements of the collection. This implementation obtains an * Iterator over the Collection and adds each element to a StringBuffer as it - * is returned by the iterator. + * is returned by the iterator. this is inserted when the collection + * contains itself (only works for direct containment, not for collections + * inside collections). * * @return a String representation of the Collection */ @@ -431,10 +433,16 @@ { Iterator itr = iterator(); StringBuffer r = new StringBuffer([); -for (int pos = size(); pos 0; pos--) +boolean hasNext = itr.hasNext(); +while (hasNext) { -r.append(itr.next()); -if (pos 1) +Object o = itr.next(); + if (o == this) + r.append(this); + else + r.append(o); + hasNext = itr.hasNext(); +if (hasNext) r.append(, ); } r.append(]); signature.asc Description: This is a digitally signed message part
Re: [cp-patches] RFC: Datatypes library
Hi Chris, On Tue, 2006-01-31 at 20:07 +, Chris Burdess wrote: This patch adds the RELAX NG pluggable datatypes library to Classpath. This API, and an implementation of it, will be used by the W3C XML Schema and RELAX NG JAXP validators currently in development. Please let me know how you feel about this. Could you explain a bit more how this will be used. I see javax.xml.validation.SchemaFactory.newInstance() has a big TODO and I assume you are working on an implementation of this. For which schema languages? And how does using this datatypes library fit into that implementation? We would expose this package (indirectly) which is why I am a bit hesitant to say great, go ahead. We could do like kaffe does in case it merges an external library and rename it to gnu.xml.org.relaxng.datatype, on the other hand this package has been stable for years so it is unlikely that a user wants to replace it with another version. I saw you already notified FSF legal of this and they checked the license to be compatible for inclusion. And adding it to external is the right thing to do. The only other thing needed would be to update the top-level LICENSE file when we decide to include this. Cheers, Mark signature.asc Description: This is a digitally signed message part
[cp-patches] default PRNG
hello there, this patch (except for gnu/java/security/key/dss/DSSKeyPairGenerator) replaces the new SecureRandom() occurrences with the use of an instance field (or in two cases where the class has only static methods, with a class field) set to an instance of a default PRNG (a seeded MDGenerator). Casey's concerns of using the PRNG Singleton originally used in GNU Crypto have been hopefully addressed by the use of local instances. the DSSKeyPairGenerator class in addition (i know it should have been a separate patch) adds a new (boolean) parameter to the generator used during its setup: STRICT_DEFAULTS. by default this is false, for backward compatibility. it's added to allow fulfilling a JCE requirement of throwing an exception when default parameters are requested but not available. the ChangeLog entry follows: 2006-02-02 Raif S. Naffah [EMAIL PROTECTED] * gnu/javax/crypto/sasl/srp/SRPServer.java (prng): New field. (getDefaultPRNG): New method. (parseO): Use method above. * gnu/javax/crypto/sasl/srp/SRPClient.java (prng): New field. (getDefaultPRNG): New method. (createO): Use method above. * gnu/javax/crypto/sasl/srp/KDF.java (prng): New class field. (nextByte): Use above field. * gnu/javax/crypto/pad/PKCS1_V1_5.java (selfTest): Use PRNG instance. * gnu/java/security/sig/rsa/RSA.java: New class field. (newR): Use above field * gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java (prng): New field. (encode): Use field.above. * gnu/java/security/key/dss/FIPS186.java (prng): New field. (getDefaultPRNG): new method. (nextRandomBytes): Use above method. * gnu/java/security/key/rsa/RSAKeyPairGenerator.java: Likewise. * gnu/java/security/sig/BaseSignature.java: Likewise. * gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java: Likewise. * gnu/javax/crypto/key/dh/RFC2631.java: Likewise. * gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java: Likewise. * gnu/javax/crypto/key/BaseKeyAgreementParty.java: Likewise. * gnu/java/security/key/dss/DSSKeyPairGenerator.java (prng): New field. (getDefaultPRNG): new method. (nextRandomBytes): Use above method. (STRICT_DEFAULTS): new class field. (USE_DEFAULTS): more documentation to clarify behavior. (setup): amended to handle new attribute. ok to commit? cheers; rsn Index: DSSKeyPairGenerator.java === RCS file: /cvsroot/classpath/classpath/gnu/java/security/key/dss/DSSKeyPairGenerator.java,v retrieving revision 1.1 diff -u -r1.1 DSSKeyPairGenerator.java --- DSSKeyPairGenerator.java 26 Jan 2006 02:25:10 - 1.1 +++ DSSKeyPairGenerator.java 2 Feb 2006 09:03:37 - @@ -41,6 +41,7 @@ import gnu.java.security.Registry; import gnu.java.security.hash.Sha160; import gnu.java.security.key.IKeyPairGenerator; +import gnu.java.security.util.PRNG; import java.io.PrintWriter; import java.math.BigInteger; @@ -88,10 +89,55 @@ /** Property name of the length (Integer) of the modulus (p) of a DSS key. */ public static final String MODULUS_LENGTH = gnu.crypto.dss.L; - /** Property name of the Boolean indicating wether or not to use defaults. */ + /** + * Property name of the Boolean indicating wether or not to use default pre- + * computed values of codep/code, codeq/code and codeg/code for + * a given modulus length. The ultimate behaviour of this generator with + * regard to using pre-computed parameter sets will depend on the value of + * this property and of the following one [EMAIL PROTECTED] #STRICT_DEFAULTS}: + * + * ol + * liIf this property is [EMAIL PROTECTED] Boolean#FALSE} then this generator + * will accept being setup for generating parameters for any modulus length + * provided the modulus length is between code512/code and + * code1024/code, and is of the form code512 + 64 * n/code. In + * addition, a new paramter set will always be generated; i.e. no pre- + * computed values are used./li + * + * liIf this property is [EMAIL PROTECTED] Boolean#TRUE} and the value of + * [EMAIL PROTECTED] #STRICT_DEFAULTS} is also [EMAIL PROTECTED] Boolean#TRUE} then this generator + * will only accept being setup for generating parameters for modulus + * lengths of code512/code, code768/code and code1024/code. Any + * other value, of the modulus length, even if between code512/code and + * code1024/code, and of the form code512 + 64 * n/code, will cause + * an [EMAIL PROTECTED] IllegalArgumentException} to be thrown. When those modulus + * length (code512/code, code768/code, and code1024/code) are + * specified, the paramter set is always the same./li + * + * liFinally, if this property is [EMAIL PROTECTED] Boolean#TRUE} and the value of + * [EMAIL PROTECTED] #STRICT_DEFAULTS} is [EMAIL
Re: [cp-patches] RFC: Datatypes library
Mark Wielaard wrote: This patch adds the RELAX NG pluggable datatypes library to Classpath. This API, and an implementation of it, will be used by the W3C XML Schema and RELAX NG JAXP validators currently in development. Please let me know how you feel about this. Could you explain a bit more how this will be used. I see javax.xml.validation.SchemaFactory.newInstance() has a big TODO and I assume you are working on an implementation of this. For which schema languages? I am personally working on a RELAX NG validator. I'm also in contact with someone else who is working on an XML Schema validator, but they haven't signed papers yet (and I haven't seen any code). And how does using this datatypes library fit into that implementation? The validators will use the datatypes library interface in order to look up datatypes by name. The datatype implementation will be responsible for validating just the datatype part of the overall schema. I have a datatype library implementation in development. It is currently based on the relaxngDatatype API. We would expose this package (indirectly) which is why I am a bit hesitant to say great, go ahead. We could do like kaffe does in case it merges an external library and rename it to gnu.xml.org.relaxng.datatype, on the other hand this package has been stable for years so it is unlikely that a user wants to replace it with another version. Arguably, if we change the name we lose any benefit of being able to plug in a 3rd party datatype library implementation. It would be trivial to duplicate just the part of the API we need in a private namespace and use that for our own providers, but we would only be able to use our own implementation. My primary reason for including this API is that it is the current standard API. I believe that much as with JAXP itself, free software benefits by being able to interface with alternate implementations, to provide more choice and facilitate testing. I saw you already notified FSF legal of this and they checked the license to be compatible for inclusion. And adding it to external is the right thing to do. The only other thing needed would be to update the top-level LICENSE file when we decide to include this. Sure -- 犬 Chris Burdess They that can give up essential liberty to obtain a little safety deserve neither liberty nor safety. - Benjamin Franklin PGP.sig Description: This is a digitally signed message part
[cp-patches] RFC: gnu.regexp.RETokenNamedProperty: Unicode block supported
ChangeLog 2006-02-02 Ito Kazumitsu [EMAIL PROTECTED] * gnu/regexp/RETokenNamedProperty.java(getHandler): Check for a Unicode block if the name starts with In. (UnicodeBlockHandler): New inner class. Index: classpath/gnu/regexp/RETokenNamedProperty.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/RETokenNamedProperty.java,v retrieving revision 1.2 diff -u -r1.2 RETokenNamedProperty.java --- classpath/gnu/regexp/RETokenNamedProperty.java 1 Feb 2006 22:49:34 - 1.2 +++ classpath/gnu/regexp/RETokenNamedProperty.java 2 Feb 2006 16:28:58 - @@ -148,7 +148,14 @@ return new POSIXHandler(name); } if (name.startsWith(In)) { - throw new REException(Unicode block is not supported yet, REException.REG_ESCAPE, 0); + try { + name = name.substring(2); + Character.UnicodeBlock block = Character.UnicodeBlock.forName(name); + return new UnicodeBlockHandler(block); + } + catch (IllegalArgumentException e) { + throw new REException(Invalid Unicode block name: + name, REException.REG_ESCAPE, 0); + } } if (name.startsWith(Is)) { name = name.substring(2); @@ -275,4 +282,16 @@ return false; } } + + private static class UnicodeBlockHandler extends Handler { + public UnicodeBlockHandler(Character.UnicodeBlock block) { + this.block = block; + } + private Character.UnicodeBlock block; + public boolean includes(char c) { + Character.UnicodeBlock cblock = Character.UnicodeBlock.of(c); + return (cblock != null cblock.equals(block)); + } + } + }
[cp-patches] Patch: DefaultStyledDocument
Another fix for DefaultStyledDocument. These functions still need more work. 2006-02-02 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (insertUpdate): Rewrote code for Originate. This prevents leaves being created multiple times. If it is on the last ElementSpec, the leaves need to be created right then; otherwise, only a branch is created. (insertContentTag): Rewrote to add new leaf directly if this is a branch with no children. Otherwise, it recreates the remainder of the tree as before. Index: javax/swing/text/DefaultStyledDocument.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v retrieving revision 1.55 diff -u -r1.55 DefaultStyledDocument.java --- javax/swing/text/DefaultStyledDocument.java 1 Feb 2006 21:29:24 - 1.55 +++ javax/swing/text/DefaultStyledDocument.java 2 Feb 2006 18:48:42 - @@ -757,9 +757,20 @@ elementStack.push(paragraph.getElement(ix)); break; default: - // Create a new paragraph and push it onto the stack. - Element newParagraph = insertParagraph(paragraph, offset); - elementStack.push(newParagraph); + Element br = null; + if (data.length i + 1) +{ + // leaves will be added to paragraph later + int x = paragraph.getElementIndex(pos) + 1; + Edit e = getEditForParagraphAndIndex(paragraph, x); + br = (BranchElement) createBranchElement(paragraph, + data[i].getAttributes()); + e.added.add(br); +} + else +// need to add leaves to paragraph now +br = insertParagraph(paragraph, pos); + elementStack.push(br); break; } break; @@ -919,12 +932,13 @@ int len = tag.getLength(); int dir = tag.getDirection(); AttributeSet tagAtts = tag.getAttributes(); - int index = paragraph.getElementIndex(pos); - Element target = paragraph.getElement(index); - Edit edit = getEditForParagraphAndIndex(paragraph, index); if (dir == ElementSpec.JoinNextDirection) { + int index = paragraph.getElementIndex(pos); + Element target = paragraph.getElement(index); + Edit edit = getEditForParagraphAndIndex(paragraph, index); + if (paragraph.getStartOffset() pos) { Element first = paragraph.getElement(0); @@ -962,31 +976,42 @@ } } } - else + else { int end = pos + len; - Element leaf = createLeafElement(paragraph, tag.getAttributes(), pos, - end); - boolean onlyContent = true; - BranchElement toRec = paragraph; - if (!target.isLeaf()) -{ - onlyContent = false; - toRec = (BranchElement) target; -} - - if (pos target.getStartOffset()) -index++; + Element leaf = createLeafElement(paragraph, tag.getAttributes(), pos, end); - edit = getEditForParagraphAndIndex(paragraph, index); - edit.addAddedElement(leaf); - - if (end != toRec.getEndOffset()) -recreateLeaves(end, toRec, onlyContent); + // Check for overlap with other leaves/branches + if (paragraph.getElementCount() 0) +{ + int index = paragraph.getElementIndex(pos); + Element target = paragraph.getElement(index); + boolean onlyContent = target.isLeaf(); + + BranchElement toRec = paragraph; + if (!onlyContent) +toRec = (BranchElement) target; + + // Check if we should place the leaf before or after target + if (pos target.getStartOffset()) +index++; - // FIXME: this is not fully correct - if (target.isLeaf()) -edit.addRemovedElement(target); + Edit edit = getEditForParagraphAndIndex(paragraph, index); + edit.addAddedElement(leaf); + + if (end != toRec.getEndOffset()) +{ + recreateLeaves(end, toRec, onlyContent); + + if (onlyContent) +edit.addRemovedElement(target); +} +} + else +{ + Edit edit = getEditForParagraphAndIndex(paragraph, paragraph.getElementCount()); +
[cp-patches] Patch: DefaultStyledDocument
Another small fix. DefaultStyledDocument.ElementBuffer is working a whole lot better now. There is two cases that still need to be fixed. I hope to be done this by the weekend!!! 2006-02-02 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (insertUpdate): JoinNextDirection should push the 'next' paragraph on the stack. Index: javax/swing/text/DefaultStyledDocument.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v retrieving revision 1.56 diff -u -r1.56 DefaultStyledDocument.java --- javax/swing/text/DefaultStyledDocument.java 2 Feb 2006 18:51:36 - 1.56 +++ javax/swing/text/DefaultStyledDocument.java 2 Feb 2006 19:28:11 - @@ -727,7 +727,6 @@ createFracture(data); i = 0; } - // Handle each ElementSpec individually. for (; i data.length; i++) { @@ -753,7 +752,7 @@ case ElementSpec.JoinNextDirection: // Push the next paragraph element onto the stack so // future insertions are added to it. - int ix = paragraph.getElementIndex(offset); + int ix = paragraph.getElementIndex(pos) + 1; elementStack.push(paragraph.getElement(ix)); break; default: @@ -766,11 +765,11 @@ br = (BranchElement) createBranchElement(paragraph, data[i].getAttributes()); e.added.add(br); + elementStack.push(br); } else // need to add leaves to paragraph now br = insertParagraph(paragraph, pos); - elementStack.push(br); break; } break;
Re: [cp-patches] java/security/KeyPairGenerator.java
On Thu, 2006-02-02 at 21:41 +1100, Raif S. Naffah wrote: Currently KeyPairGenerator extends KeyPairGeneratorSpi, but the if statement was testing for instanceof KeyPairGeneratorSpi before KeyPairGenerator, and handling them differently (in terms of wrapper classes). the patch corrects the test order. 2006-02-02 Raif S. Naffah [EMAIL PROTECTED] * java/security/KeyPairGenerator.java (getInstance): Test for instanceof KeyPairGenerator before KeyPairGeneratorSpi. ok to commit? Yes please. This looks like a obvious correct patch to me. Cheers. Mark signature.asc Description: This is a digitally signed message part
[cp-patches] FYI: RepaintManager optimization
I once more optimized the Swing RepaintManager to limit the amount of painting work that is carried out by Swing. While observing painting behaviour I noticed that sometimes (especially with overlapping components) the painting is carried out in a 2-step manner, which results in strange artifacts visible for a short time. This was caused by an unfortunate ordering of the paint jobs. I adjusted this class in the following way: - Removed the use of working copies for invalidComponents and dirtyComponents. Before, when the RepaintWorker job was dequeued from the EventQueue, it swapped over the working copies with the real one, itself working on the copies and allowing other threads to queue new work requests in the empty working copies (which were then processed by the next RepaintWorker). This is now implemented so that all threads access the real structures and fine tuned synchronization. - The ordering of the paint jobs is now done based on the sizes of the damaged regions. Before it was ordered by the depth of the component in the component hierarchy, which is similar but has different results when rendering multiple-layered containers (see above - 'two step rendering'). Bigger damaged regions are painted first. This makes it quite likely that all the smaller regions are painted with this request, thus increasing overall performance. Imagine the smaller regions would be painted first, and then the bigger regions that enclose the smaller ones, this would result in the small regions painted twice or more often. - The RepaintWorker has been marked 'dead' when it begins its work. This had the bad effect that there could be more than one RepaintWorker active on the EventQueue. This is not desired, I moved the setLive(false) call to after the RepaintWorker finished it's job and wrapped it up in a try{} finally{} clause to make sure it cleans up when something in between fails. 2006-02-02 Roman Kennke [EMAIL PROTECTED] * javax/swing/RepaintManager.java Made fields private. (RepaintWorker.run): Enclosed work stuff in try finally block in order to clean up correctly if invalidation or painting fails, otherwise we would get no more RepaintWorkers onto the EventQueue. Also, now the RepaintWorker is marked 'dead' only after it has finished its work, avoid more than one RepaintWorker on the queue. (ComponentComparator.compareTo): Compare dirty rectangle sizes instead of hierarchy depths. (workDirtyComponents): Removed unused field. (repaintOrder): Removed unused field. (workRepaintOrder): Removed unused field. (workInvalidComponents): Removed unused field. (RepaintManager()): Removed initialization of removed fields. (addInvalidComponent): Fine tuned synchronization. (removeInvalidComponent): Fine tune synchronization. (addDirtyRegion): Short circuit invalid dirty regions. Fine tuned synchronization. Don't manager repaintOrder here. (insertRepaintOrder): Removed method. (markCompletelyClean): Fine tuned synchronization. (validateInvalidComponents): Dont use a working copy of the invalidComponents list, instead fine tuned synchronization on this list. Also, don't search validateRoot, this is already done in addInvalidComponent(). (paintDirtyRegions): Compute repaint order here, based on size of damaged regions. Fine tuned synchronization. Avoid use of working copies of dirtyComponent. /Roman Index: javax/swing/RepaintManager.java === RCS file: /cvsroot/classpath/classpath/javax/swing/RepaintManager.java,v retrieving revision 1.22 diff -u -r1.22 RepaintManager.java --- javax/swing/RepaintManager.java 27 Jan 2006 10:10:00 - 1.22 +++ javax/swing/RepaintManager.java 2 Feb 2006 21:13:26 - @@ -62,6 +62,7 @@ * href=http://java.sun.com/products/jfc/tsc/articles/painting/index.html;this * document/a for more details./p * + * @author Roman Kennke ([EMAIL PROTECTED]) * @author Graydon Hoare ([EMAIL PROTECTED]) */ public class RepaintManager @@ -107,12 +108,18 @@ public void run() { - ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); - RepaintManager rm = -(RepaintManager) currentRepaintManagers.get(threadGroup); - setLive(false); - rm.validateInvalidComponents(); - rm.paintDirtyRegions(); + try +{ + ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); + RepaintManager rm = +(RepaintManager) currentRepaintManagers.get(threadGroup); + rm.validateInvalidComponents(); + rm.paintDirtyRegions(); +} + finally +{ + setLive(false); +} } } @@ -135,41 +142,23 @@ * @param o1 the first component * @param o2 the second component * - *
[cp-testresults] FAIL: regressions for mauve-jamvm on Thu Feb 2 11:27:50 UTC 2006
Baseline from: Sun Jan 29 02:20:28 UTC 2006 Regressions: FAIL: gnu.testlet.javax.swing.event.SwingPropertyChangeSupport.removePropertyChangeListener: (String, PropertyChangeListener) (number 4) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create eighth leaf element (number 3) Improvements: PASS: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create seventh leaf element (number 1) New fails: FAIL: gnu.testlet.java.lang.Double.DoubleTest: test_equals CYGNUS: Double.equals - 8 (number 1) FAIL: gnu.testlet.java.lang.Double.DoubleTest: test_toString - 8 (number 1) FAIL: gnu.testlet.java.lang.Float.FloatTest: test_equals - 8 (number 1) FAIL: gnu.testlet.java.lang.Float.FloatTest: test_toString - 8 (number 1) FAIL: gnu.testlet.java.lang.Math.MathTest: test_atan2 - 5 (number 1) FAIL: gnu.testlet.java.net.Socket.SocketTest: Error : test_Basics failed - 7 exception should not have been thrown. (number 1) FAIL: gnu.testlet.java.net.Socket.SocketTest: Error : test_params failed - 10 exception was thrown. (number 1) FAIL: gnu.testlet.javax.swing.event.SwingPropertyChangeSupport.hasListeners: uncaught exception: java.lang.NullPointerException FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create eleventh leaf element (number 3) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create eleventh leaf element (number 4) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create tenth leaf element (number 3) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create tenth leaf element (number 4) Totals: PASS: 28761 XPASS: 0 FAIL: 381 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: mauve serialization tests on Thu Feb 2 11:35:47 UTC 2006
___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: mauve serialization tests on Fri Feb 3 01:46:42 UTC 2006
___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for libgcj on Fri Feb 3 05:40:49 UTC 2006
Baseline from: Fri Feb 3 00:57:57 UTC 2006 Regressions: FAIL: Thread_Sleep output - source compiled test Totals: PASS: 3377 XPASS: 0 FAIL: 1 XFAIL: 10 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
GNU classpath contribution question
Hi, I have read the FAQ on contributing to GNU classpath, and I am still left with a question: Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. I want to write a replacement for FileFormat, so I write a program System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? Thanks, Ken Larson, Larson Technologies, Inc.
Re: Crypto/Security component in Bugzilla
On Wed, 2006-02-01 at 20:01 -0500, Andrew Pinski wrote: On Feb 1, 2006, at 7:52 PM, Tom Tromey wrote: I thought this question was more about security in the sense of bugs we know of in our security code, not security flaws requiring a quick turnaround. Likewise. After reading Casey's email that Mark responded to. In that case it seems we don't need a keyword or meta-bug but just a new 'security' component covering java.security.* (Permissions, Policies, SecurityManager)? Cheers, Mark signature.asc Description: This is a digitally signed message part
Re: GNU classpath contribution question
Hi Ken, what you describe is called black box testing and is a legit mean. cya Robert Ken Larson wrote: Hi, I have read the FAQ on contributing to GNU classpath, and I am still left with a question: Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. I want to write a replacement for FileFormat, so I write a program System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? Thanks, Ken Larson, Larson Technologies, Inc. signature.asc Description: OpenPGP digital signature
Re: GNU classpath contribution question
Hi Ken, On Wed, 2006-02-01 at 16:09 -0500, Ken Larson wrote: System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? Normally public constants are listed in the public documentation. Otherwise you can look them up in the O'Reilly or Addison-Wesley books. Checking constants to make sure different implementations use the same public interface is fine. In general public user visible constants like this should be similar to make us more compatible with other implementations (especially since constants are embedded into the .class file when compiling sources) so programs work as is with our implementation. You can also add a Mauve test to make sure we stay compatible. Cheers, Mark signature.asc Description: This is a digitally signed message part
Re: GNU classpath contribution question
Ken Larson wrote: Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. Actually, it probably does: http://java.sun.com/j2se/1.5.0/docs/api/constant-values.html -- --Per Bothner [EMAIL PROTECTED] http://per.bothner.com/
Re: GNU classpath contribution question
Hi Ken, Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. I want to write a replacement for FileFormat, so I write a program System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? First of all, if a constant is not in the JavaDoc, it is most likely initialized with a value that may differ in different environments in the static initializer of a class and the value you get from System.out.println(FileFormat.BINARY) may be right, but others are also possible. This might be the case for platform dependend constants, language specific constants etc. To really answer your questions, I would think that this is ok. At least this is what we do in lots of Mauve test cases (Mauve is our testsuite for compatibility testing). /Roman signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: GNU classpath contribution question
On Wed, Feb 01, 2006 at 04:09:00PM -0500, Ken Larson wrote: Hi, I have read the FAQ on contributing to GNU classpath, and I am still left with a question: Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. I want to write a replacement for FileFormat, so I write a program System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? In that case, I'd say yes. The number 1 is not copyrightable, and you need the correct value for interoperability. With recent J2SE API documentation, Sun publishes constants and serialization layouts, so I'd hope that the question is moot these days. In general, it depends on the information. If, say, the Java bytecode format was ammended to include annotations for the source code each bytecode in a class corresponds to, for better debugger support, and there was an javax.bytecode.annotations.debugger API to work on those annotations, then harvesting the annotations programmatically would not result in something one could safely put into GNU Classpath to quickly finish the missing classes. :) Sometimes the values Sun uses also don't make sense outside Sun's world, for example when selecting a default provider for some javax.xml SPI. That's pretty runtime dependant. cheers, dalibor topic Thanks, Ken Larson, Larson Technologies, Inc.
Re: GNU classpath contribution question
Roman Kennke writes: Hi Ken, Let's say for example standard Java defines some constant like FileFormat.BINARY. The Javadoc does not specify the value of this constant. I want to write a replacement for FileFormat, so I write a program System.out.println(FileFormat.BINARY) and run it against Sun's implementation. I find out that the value is 1, and I put that in my implementation. Is this legit for the purposes of contribuing to classpath? First of all, if a constant is not in the JavaDoc, it is most likely initialized with a value that may differ in different environments No, that's simply impossible. If a constant is part of a public interface it must _not_ change between platforms that support that public interface. This is because the compiler inlines the values of integer constants. It must do that because otherwise static final fields couldn't be used in tableswitch instructions. This is probably a bug in the design... Andrew.
Re: New native layer
Casey Marshall wrote: On Jan 31, 2006, at 6:10 PM, David P Grove wrote: Jikes RVM also does m-to-n threading, so it's there's more than 1 VM that's whacky in this regard. The things we need to do are most likely different than what Kaffe needs to do, but having a chance to inject a VM callback before the thread dives off into a blocking system call is something we would like to be able to do. We have some linux specific hacks (evil with dlopen to intercept poll, select, etc), but it's fragile and doesn't work on other platforms like AIX and OS X that Jikes RVM runs on. Would my suggestion for Enter/Exit callbacks help this? Though enter/exit callbacks may help for a few syscalls but it won't for some (like blocking read/write). For these new calls you need handle blocking queues in the VM thread scheduler. That needs to put the fd into non-blocking mode and when you do a read you first check if there is any data (in non-blocking mode) and if there is not data then the thread system queues the current thread and tells the scheduler to jump somewhere else until some datas are available on the specified fd. So we must really stick to rerouting a few IOs. I am sure that handling m-to-n threading system is as difficult as what we are doing (maybe more). Regards, Guilhem.
[Bug awt/23931] ToolKit.createImage() throws unexpected IllegalArgumentException
--- Comment #7 from multix at gmail dot com 2006-02-02 16:11 --- Created an attachment (id=10772) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10772action=view) gtk image patch this is a slightly revised version of the patch Mark proposed. It seems to well for me, a great improvemt both compared to the existing code and mark's version. (although the change is just one line, as described in a prior comment, on the original code after the patch form mark was applied). This suggestion is from roman. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23931 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug classpath/25812] gnu.regexp: support for (?=X), (?!X), (?X) wanted
--- Comment #1 from mark at gcc dot gnu dot org 2006-02-02 13:45 --- *** Bug 26075 has been marked as a duplicate of this bug. *** -- mark at gcc dot gnu dot org changed: What|Removed |Added CC||andrew at ||operationaldynamics dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25812 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug classpath/22884] java.util.regex.Pattern doesn't understand (?s)
--- Comment #5 from kaz at maczuka dot gcd dot org 2006-02-02 17:02 --- *** Bug 26075 has been marked as a duplicate of this bug. *** -- kaz at maczuka dot gcd dot org changed: What|Removed |Added CC||andrew at ||operationaldynamics dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22884 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[commit-cp] classpath ./ChangeLog gnu/java/security/x509/ex...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Casey Marshall [EMAIL PROTECTED] 06/02/02 07:16:22 Modified files: . : ChangeLog gnu/java/security/x509/ext: GeneralNames.java Log message: 2006-02-01 Casey Marshall [EMAIL PROTECTED] Tag check and OTHER_NAME fixes suggested by ???. * gnu/java/security/x509/ext/GeneralNames.java (init): fix tag check; fix OTHER_NAME parsing; fix DIRECTORY_NAME parsing. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6248tr2=1.6249r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/java/security/x509/ext/GeneralNames.java.diff?tr1=1.3tr2=1.4r1=textr2=text
[commit-cp] classpath ./ChangeLog java/util/AbstractCollect...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 06/02/02 13:29:01 Modified files: . : ChangeLog java/util : AbstractCollection.java Log message: Fixes bug #25769 reported by Artemus Harper [EMAIL PROTECTED] * java/util/AbstractCollection.java (toString): Only use Iterator, check whether collection contains itself. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6250tr2=1.6251r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/util/AbstractCollection.java.diff?tr1=1.17tr2=1.18r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/java/security/der/DER...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Casey Marshall [EMAIL PROTECTED] 06/02/02 07:06:35 Modified files: . : ChangeLog gnu/java/security/der: DERValue.java DERWriter.java Log message: 2006-02-01 Casey Marshall [EMAIL PROTECTED] toString fix suggested by ???. * gnu/java/security/der/DERValue.java (getLength, getEncoded, getEncodedLength): throw an exception, don't initialize `encoded' to a bogus value. (toString): return a more helpful string. Partial fix for PR classpath/25144. * gnu/java/security/der/DERWriter.java (write): if the value is the pseudo-value used for CONSTRUCTED, write the encoded value directly. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6247tr2=1.6248r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/java/security/der/DERValue.java.diff?tr1=1.4tr2=1.5r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/java/security/der/DERWriter.java.diff?tr1=1.5tr2=1.6r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/regexp/REMatch.java g...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Ito Kazumitsu [EMAIL PROTECTED] 06/02/02 15:16:59 Modified files: . : ChangeLog gnu/regexp : REMatch.java RETokenOneOf.java RETokenRepeated.java Log message: 2006-02-02 Ito Kazumitsu [EMAIL PROTECTED] * gnu/regexp/REMatch.java(REMatchList): New inner utility class for making a list of REMatch instances. * gnu/regexp/RETokenOneOf.java(match): Rewritten using REMatchList. * gnu/regexp/RETokenRepeated.java(findDoables): New method. (match): Rewritten using REMatchList. (matchRest): Rewritten using REMatchList. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6252tr2=1.6253r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/REMatch.java.diff?tr1=1.5tr2=1.6r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RETokenOneOf.java.diff?tr1=1.4tr2=1.5r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RETokenRepeated.java.diff?tr1=1.7tr2=1.8r1=textr2=text
[commit-cp] classpath examples/gnu/classpath/examples/CORBA...
CVSROOT:/sources/classpath Module name:classpath Branch: Changes by: Audrius Meskauskas [EMAIL PROTECTED] 06/02/02 14:11:50 Modified files: examples/gnu/classpath/examples/CORBA/swing/x5: PlayingDesk.java . : ChangeLog Log message: 2006-02-02 Audrius Meskauskas [EMAIL PROTECTED] * examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java (friendsMove): Call repaint() only after endOfGame is assigned. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java.diff?tr1=1.1tr2=1.2r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6251tr2=1.6252r1=textr2=text
[commit-cp] classpath javax/swing/RepaintManager.java ./Cha...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/02/02 21:13:54 Modified files: javax/swing: RepaintManager.java . : ChangeLog Log message: 2006-02-02 Roman Kennke [EMAIL PROTECTED] * javax/swing/RepaintManager.java Made fields private. (RepaintWorker.run): Enclosed work stuff in try finally block in order to clean up correctly if invalidation or painting fails, otherwise we would get no more RepaintWorkers onto the EventQueue. Also, now the RepaintWorker is marked 'dead' only after it has finished its work, avoid more than one RepaintWorker on the queue. (ComponentComparator.compareTo): Compare dirty rectangle sizes instead of hierarchy depths. (workDirtyComponents): Removed unused field. (repaintOrder): Removed unused field. (workRepaintOrder): Removed unused field. (workInvalidComponents): Removed unused field. (RepaintManager()): Removed initialization of removed fields. (addInvalidComponent): Fine tuned synchronization. (removeInvalidComponent): Fine tune synchronization. (addDirtyRegion): Short circuit invalid dirty regions. Fine tuned synchronization. Don't manager repaintOrder here. (insertRepaintOrder): Removed method. (markCompletelyClean): Fine tuned synchronization. (validateInvalidComponents): Dont use a working copy of the invalidComponents list, instead fine tuned synchronization on this list. Also, don't search validateRoot, this is already done in addInvalidComponent(). (paintDirtyRegions): Compute repaint order here, based on size of damaged regions. Fine tuned synchronization. Avoid use of working copies of dirtyComponent. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/RepaintManager.java.diff?tr1=1.22tr2=1.23r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6255tr2=1.6256r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/text/DefaultS...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 06/02/02 18:51:36 Modified files: . : ChangeLog javax/swing/text: DefaultStyledDocument.java Log message: 2006-02-02 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (insertUpdate): Rewrote code for Originate. This prevents leaves being created multiple times. If it is on the last ElementSpec, the leaves need to be created right then; otherwise, only a branch is created. (insertContentTag): Rewrote to add new leaf directly if this is a branch with no children. Otherwise, it recreates the remainder of the tree as before. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6253tr2=1.6254r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/DefaultStyledDocument.java.diff?tr1=1.55tr2=1.56r1=textr2=text