Re: [jira] Created: (HARMONY-62) java.text.BreakIterator.getSentenceInstance().next() treats '\n' as the end of the sentence
Dear Tatyana, As you may know, our (Harmony) implementation just wraps ICU4J's BreakIterator. And the rules of ICU4J's BreakIterator is compliant with Unicode TR29 which is different with the rules of RI. This is a common issue for most of the classes in text. If we want implementation to have the same behavior as RI, we should get the rules of RI. However, I think the rules must be controlled by some kinds of license. So a better solution may be wrapping icu4j's implementation for all text (internationalization) classes. As I know, ICU4J is special for i18n. Any comments? Thanks a lot. Please refer to ICU's homepage: http://icu.sourceforge.net/ Richard Liang China Software Development Lab, IBM tatyana doubtsova (JIRA) wrote: java.text.BreakIterator.getSentenceInstance().next() treats '\n' as the end of the sentence --- Key: HARMONY-62 URL: http://issues.apache.org/jira/browse/HARMONY-62 Project: Harmony Type: Bug Components: Classlib Reporter: tatyana doubtsova Problem details: java.text.BreakIterator.getSentenceInstance().next() stops searching for the sentence end, if the new-line character is found in the text and returns the index of the last seen non white space character. Due to j2se 1.4.2 method next() should return the boundary following the current boundary. Code for reproducing Test.java: import java.text.BreakIterator; public class Test { public static void main(String [] args) { BreakIterator it = BreakIterator.getSentenceInstance(); it.setText(One sentence \n on two lines.); System.out.println(it.next()); } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile Test.java using BEA 1.4 javac javac -d . Test.java 3. Run java using compatible VM (J9) java -showversion Test Output: java version 1.4.2 (subset) (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. 14 Output on BEA 1.4.2 to compare with: 28 Suggested junit test case: package org.apache.harmony.tests.java.text; import java.text.BreakIterator; import java.util.Locale; import junit.framework.TestCase; public class BreakIteratorTest extends TestCase { public void test_next() { // Regression test for HARMONY-30 BreakIterator bi = BreakIterator.getWordInstance(Locale.US); bi.setText(This is the test, WordInstance); int n = bi.first(); n = bi.next(); assertEquals(Assert 0: next() returns incorrect value , 4, n); // Regression test for the current issue bi = BreakIterator.getSentenceInstance(); bi.setText(One sentence \n on two lines.); n = bi.next(); assertEquals(Assert 1: next() returns incorrect value , 28, n); } }
Re: classlib build status emails?
Mark Hindess wrote: On 21/02/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Mark Hindess wrote: Hi, Is there any interest in having build status emails sent to this list? I'm building classlib trunk with continuum and it would be simple for me to have messages like the following sent to the list whenever the status of our builds change. Currently I'm building only on linux but I plan to get windows builds running in the next few days. Cool. Please, only send changes (pass-fail, fail-pass). Agreed. Done. (Will the non-subscriber [EMAIL PROTECTED] be able to send to the list or is there something that needs to be done to avoid moderation/spam filtering?) We can certainly add that.. Currently the builds are running the default target in make/build.xml but if there was a top-level build-and-test target then I could run that instead. This might produce more useful results. Ah. Can you do a sequence : $ cd make $ ant $ cd .. $ ant -f build-test.xml The current build is just a direct svn co and ant project at present. My next step is to use a local repository with svn:externals pulling in the harmony trunk so I'll have more flexibility. However, I suspect more people might run the test target if this process was simplified. Of course, as Tim mentioned it's not trivial because of the requirement for a VM and other dependencies so perhaps it is not worth it. I think it is. It's great that you have a private version of this running now for us, but we want to get to a point where a) anyone can do it b) The one that we reun for the project is running here on apache infrastructure I was thinking we might be able to have standard assumptions (encoded in ant properties) about the location of dependencies and document setting up the build and test process - much as Tim has done for the classlib build. Obviously we'd want a mechanism for overriding the standard assumptions - perhaps a local (optional) included property file. Yep Perhaps once I have setup the test run I'll have a better idea about how this could be simplified. I'm going to concentrate on testing first - since the test results are probably more important than the actual build artifacts at this point - but wrapping the build should also allow me to add a publish step to our parent build if there was somewhere I could publish to? Lets get that working - we can then run it here and have it publish locally to the infrastructure... On a related note, removing the output attributes from the targets that exec make (and thus allowing the output to go to stdout/console) would produce much more helpful results and probably result in more constructive bug reports if/when the native builds fail. Yes indeedy. I never understood why they were off in a file by default. We've already had one person get confused there... Thanks. Regards, Mark. -- Forwarded message -- From: Apache Harmony Build [EMAIL PROTECTED] Date: 20-Feb-0006 11:04 Subject: [continuum] BUILD SUCCESSFUL: Classlib/linux.ia32 To: [EMAIL PROTECTED] Online report : http://ibmonly.hursley.ibm.com/continuum/linux.ia32/servlet/continuum/target/ProjectBuild.vm/view/ProjectBuild/id/1/buildId/44 Build statistics: State: Ok Previous State: Failed Started at: Mon, 20 Feb 2006 11:03:46 + Finished at: Mon, 20 Feb 2006 11:04:56 + Total time: 1m 9s Build Trigger: Forced Exit code: 0 Building machine hostname: hy2 Operating system : Linux Java version : 1.4.2(IBM Corporation) Changes No files changed Output: [snip] -- Mark Hindess [EMAIL PROTECTED] IBM Java Technology Centre, UK.
Re: [jira] Created: (HARMONY-62) java.text.BreakIterator.getSentenceInstance().next() treats '\n' as the end of the sentence
As you may know, our (Harmony) implementation just wraps ICU4J's BreakIterator. And the rules of ICU4J's BreakIterator is compliant with Unicode TR29 which is different with the rules of RI. This is a common issue for most of the classes in text. If we want implementation to have the same behavior as RI, we should get the rules of RI. However, I think the rules must be controlled by some kinds of license. So a better solution may be wrapping icu4j's implementation for all text (internationalization) classes. As I know, ICU4J is special for i18n. Imho, I don't think that different BreakIterator implementations have to produce exactly the result (boundary analysis). What I meant is, the Behavior of them should be all the same, conform to what described in the Java API doc http://java.sun.com/j2se/1.5.0/docs/api/java/text/BreakIterator.html Line boundary analysis determines where ... Sentence boundary analysis allows ... Word boundary analysis is ... Character boundary analysis ... But their result, the Boundary Analysis, need not to be the same, just depends on how good each implementation could perform. That's my opinion. cheers, Art -- :: Art / Arthit Suriyawongkul :: Applied Computational Linguistics Lab, Uni Potsdam :: http://www.ling.uni-potsdam.de/acl-lab/ :: http://bact.blogspot.com/ ** Impeach Thaksin http://tuthaprajan.org
Re: [jira] Commented: (HARMONY-68) java.nio.charset.Charset.isSupported(String charsetName) does not throw IllegalCharsetNameException for spoiled standard sharset name
That seems like a reasonable interpretation, but who knows what the spec writer really meant?! and the result is the same, we will continue to match the reference implementation behavior by returning false. Thanks Tim Karan Malhi wrote: Hi Tim, I would add something to this discussion. My interpretation is that if the charset name does not comply with RFC 2278 , only then an IllegalCharsetNameException should be thrown. The spec says that charset should start with character or digit, but it does not specifically mention that it would be treated as illegal(it could also be treated as not supported). The one clear example for an illegal charset is an empty String (this rule matches with RFC 2278) A charset name must begin with either a letter or a digit. The empty string is not a legal charset name. I tested the reference implementation for this method and looks like the reference impl complies with RFC 2278 and simply returns false if the name starts with a - (This is also because there is no charset name in the IANA Charset registry which starts with a -). It does not throw an IllegalCharsetNameException So, one could also interpret the spec in the following way: If the charset name does not comply with RFC 2278 then throw IllegalCharsetNameException, otherwise if the charset is not supported, return false. On 2/18/06, karan malhi [EMAIL PROTECTED] wrote: Here is text from the j2se1.4.2 spec A charset name must begin with either a letter or a digit. The empty string is not a legal charset name. Charset names are not case-sensitive; that is, case is always ignored when comparing charset names. Charset names generally follow the conventions documented in /RFC 2278: IANA Charset Registration Procedures/ http://ietf.org/rfc/rfc2278.txt. According to RFC - 2278 Finally, charsets being registered for use with the text media type MUST have a primary name that conforms to the more restrictive syntax of the charset field in MIME encoded-words [RFC-2047, RFC-2184] and MIME extended parameter values [RFC-2184]. A combined ABNF definition for such names is as follows: mime-charset = 1*Any CHAR except SPACE, CTLs, and cspecials cspecials= ( / ) / / / @ / , / ; / : / / / / [ / ] / ? / . / = / * CHAR = any ASCII character; ( 0-177, 0.-127.) SPACE= ASCII SP, space; ( 40, 32.) CTL = any ASCII control ; ( 0- 37, 0.- 31.) character and DEL ; (177, 127.) If I have interpreted the above correctly, then it basically means that the name can start with any ASCII character except ASCII (octal) 40, 0-37, 177. A - is 055 and an _ is 137 which does not fall under the above exclude list. So primarily if I have a charset named -UTF-8 or _UTF-8, it is not an illegal name. So looks like the spec definition is further tightening the Charsets accepted by java in that the name can only start with a letter or a digit. How do we interpret *must* ? So Richard Liang wrote: Hello Tim, I'm wondering why I did not just copy the first sentence. :-) A charset name **must** begin with either a letter or a digit. Does this mean if the charset name which begin with neither a letter nor a digit should be regarded as an illegal charset name? Richard Liang China Software Development Lab, IBM Tim Ellison wrote: Richard Liang wrote: Hello Tim, I think this is caused by different understanding of the java spec: A charset name **must** begin with either a letter or a digit. The empty string is not a legal charset name What do think the implication of must here? :-) But the name isn't empty, it is -UTF-8 ? I must be missing something... Regards, Tim Tim Ellison (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-68?page=comments#action_12366784 ] Tim Ellison commented on HARMONY-68: The test looks invalid to me. You shoud only expect an java.nio.charset.IllegalCharsetNameException if the name itself contains disallowed characters, and both underscore and dash are permitted. The code Charset.isSupported(-UTF-8) should return false, not throw an exception. java.nio.charset.Charset.isSupported(String charsetName) does not throw IllegalCharsetNameException for spoiled standard sharset name - Key: HARMONY-68 URL: http://issues.apache.org/jira/browse/HARMONY-68 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Attachments: charset_patch.txt According to j2se 1.4.2 specification for Charset.isSupported(String charsetName) the method must throw IllegalCharsetNameException if the given charset name is
Harmony tools and utilities
Hi all, Are we interesting in providing a competitive set of tools and utilities for Harmony implementation? (for tools list see: http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html ) Are we going to provide the same set, subset or superset? Or it is too early to discuss tools list? As we agreed we need javadoc. And this is priority number one. What about others? What about javah, appletviewer or keytool? I'd suggest creating a prioritized list of tools and utilities that we need and place it on Harmony project's site, for example, in 'subcomponents' or 'road map/TODO' section. A tool's priority will define its demand for Harmony For example, Tool name Status Priority javadoc missing high javah missing medium keytool missing medium policytool missing low klist missingN/A Thanks, Stepan Mishura Intel Middleware Products Division
[Fwd: Re: [classlib] build / test system]
Sorry, was meant for the list... Forwarded Message From: David Tanzer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [classlib] build / test system Date: Tue, 21 Feb 2006 11:36:23 +0100 It has it's own repository format, and at the moment our repository is quite incomplete. Anyway, several resources in our repository will be downloaded from the maven repository at ibiblio.org. For a later version a feature to convert a complete maven repository to rr format (and maybe vice-versa) is planned AFAIK. Regards, David. On Mon, 2006-02-20 at 21:42 -0500, Geir Magnusson Jr wrote: Will it use a maven repository? This sounds like a lot of the functionality in Maven. Whether you like Maven or not, the fact that there are large repositories of jars is great, so I hope your friend will take advantage of that. David Tanzer wrote: A friend of mine is currently developing a program to manage Java project resources (jars and others) called gc resource repository (gc-rr): http://dev.guglhupf.net/commons/rr/index.html Some of the features are: * Central resource repository to share resources between multiple projects. * Needed resource are downloaded and stored in a local repository. * Dependencies between resources are solved. * Setup the classpath with all needed resources (jars). * Start java progams with the needed resources. * Ant integration to setup the classpath. * Modular ant build script support * Eclipse classpath builder to setup the classpath in eclipse. You may want to take a look at it. It is distributed under the Apache License, and I guess I could convince Rene Pirringer (the main developer of gc-rr) to contribute it to Apache Harmony if this is desired. Best Regards, David Tanzer On Tue, 2006-02-14 at 11:01 +, George Harley wrote: Hi Alexey, The usetimestamp attribute of Ant's get task kind of offers this functionality. Setting the attribute value to true means that the download only proceeds if the local copy of the resource is missing or stale. There is more information on this at http://ant.apache.org/manual/CoreTasks/get.html Best regards, George IBM UK Alexey Petrenko wrote: Well, it would be nice. However I don't like build scripts that depend on network. Yes, there should be the possibility to download needed jars once and forget about network. -- Alexey A. Petrenko Intel Middleware Products Division -- David Tanzer, Haghofstr. 29, A-3352 St. Peter/Au, Austria/Europe http://deltalabs.at -- http://dev.guglhupf.net -- http://guglhupf.net My PGP Public Key: http://guglhupf.net/david/david.asc -- Pinky, Are You Pondering What I'm Pondering? I think so Brain, but if was only supposed to be a three hour tour, why did Howells bring all his money? smime.p7s Description: S/MIME cryptographic signature
Re: local test server (Was: Re: [jira] Commented: (HARMONY-71) java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
Stepan Mishura wrote: I glanced through a local server code from HARMONY-57 contribution without looking into implementation details and ... this made me think. I catch hold of the following: 1) The server contains some testing code that looks not good for me Care to explain? 2) It is not as simple as I expected - my impression was that a local server implementation should be very simple because we are not going to test whether it corresponds to http spec. or not. IMHO, it should only provide a test case with: - a port number to open communication - access to a server's input/output streams to verify a request to a server or to form a server's response. Naive? Well, I'm aware that I'm not so experienced in java.net development and testing and may be I'm wrong. The local server I referenced can be used for a number of the java.net tests, some of which do require more sophisticated behavior, like basic authentication, eTags, etc. I agree that the tests in HARMONY-71 only need something to accept their connection, but I was simply pointing out that there will be a local server we can use if that contribution is accepted into the project, so probably not worth writing another. I'd like to start with the first issue (BTW, is it ok to discuss details of contribution implementation if it is not accepted yet?). Sure -- I would expect people to be evaluating it thoroughly so that they can vote the code in/out. The PPMC will shout early if the paperwork implies a contribution is unacceptable. Can we avoid adding a code that is specific for some test case to a local server? Does it interfere with what you want to do? In some cases, the test case needs to know what is on the server a priori, so that it can test the client behavior correctly. Regards, Tim On 2/16/06, Tim Ellison wrote: I would rather that you just opened a new JIRA issue for that as it doesn't relate to the original problem. FYI there is a local server incoming in the HARMONY-57 contribution, so don't spend any time on it, see: HARMONY-57\Harmony\Harmony_Tests\src\test\java\tests\support\Support_HttpServer.java Regards, Tim Stepan Mishura (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-71?page=comments#action_12366637] Stepan Mishura commented on HARMONY-71: --- Tim, Added test case (test_setUseCachesZ) depends on network and it fails if it can not create connection with apache.org. The same for HARMONY-72. I'm going to attach a patch file with a local server in it. Could you reopen this JIRA? Thanks, Stepan. java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError -- Key: HARMONY-71 URL: http://issues.apache.org/jira/browse/HARMONY-71 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison According to j2se 1.4.2 specification method java.net.URLConnection.setUseCaches(boolean) throws IllegalStateException, if already connected. Harmony throws java.lang.IllegalAccessError instead, that contradicts the specification. Code to reproduce: import java.io.IOException; import java.net.*; public class test2 { public static void main(String[] args) { HttpURLConnection u=null; try { u=(HttpURLConnection)(new URL(http://intel.com ).openConnection()); u.connect(); } catch (MalformedURLException e) { System.out.println(unexpected MalformedURLException+e); } catch (IOException f) { System.out.println(unexpected IOException+f); } try { u.setUseCaches(true); } catch (IllegalStateException e) { System.out.println(OK. Expected IllegalStateException); e.printStackTrace(); }; } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy: parallel) OK. Expected IllegalStateException java.lang.IllegalStateException: Already connected at java.net.URLConnection.setUseCaches(Z)V(URLConnection.java :828) at test2.main([Ljava.lang.String;)V(test2.java:17) C:\tmpC:\harmony\trunk\deploy\jre\bin\java -showversion test2 (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. java.lang.IllegalAccessError: Connection already established at java.net.URLConnection.setUseCaches(URLConnection.java:923)
Re: [classlib] using cpp
Instead of introducing this strict language rule, I suggest to consider this restriction case by case with some principles. One of the principles should be that our codes can be easily ported to as many platforms as possible. Obviously ANSI C has more compatibility on multi platforms and is much easier to support for platform provider than C++, and because we have few native codes in classlib written by c++ so far, it's not a bad idea that we consider ANSI C as the first choice to implement native codes in classlib. And of course, if someday in some cases, the implementation by C++ is obviously much better(elegant, simple, high performance, or anything else) than counterpart by C, so that the compatibility/complexity issue introduced can be ignored, I have no objection to use C++. Mikhail Loenko wrote: I'm OK with this change in the jaasnix. As for the whole classlib, I'm afraid that having such a strict language rule at this point might hold some potential contributors. Thanks, Mikhail On 2/14/06, Tim Ellison [EMAIL PROTECTED] wrote: Alexey Petrenko wrote: You suggest not to use C++ in Harmony at all? As Geir says elsewhere, I mean in classlib in particular. Regards, Tim -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK. -- Paulex Yang China Software Development Lab IBM
[jira] Assigned: (HARMONY-90) StringBuffer.setLength(int) doesn't throw IndexOutOfBoundsException if the argument is negative
[ http://issues.apache.org/jira/browse/HARMONY-90?page=all ] Tim Ellison reassigned HARMONY-90: -- Assign To: Tim Ellison StringBuffer.setLength(int) doesn't throw IndexOutOfBoundsException if the argument is negative --- Key: HARMONY-90 URL: http://issues.apache.org/jira/browse/HARMONY-90 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison According to j2se 1.4.2 and 1.5 specification java.lang.StringBuffer.setLength(int) must throw IndexOutOfBoundsException if the argument is negative Code to reproduce: public class test2 { public static void main(String[] args) throws Exception { StringBuffer buffer = new StringBuffer(abcde); try { buffer.setLength(-1); System.out.println(FAIL. IndexOutOfBoundsException must be thrown.); } catch (IndexOutOfBoundsException e) { System.out.println(PASS. +e); } } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy: parallel) PASS. java.lang.StringIndexOutOfBoundsException: String index out of range: -1 C:\tmpC:\harmony\trunk\deploy\jre\bin\java -showversion test2 (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. FAIL. IndexOutOfBoundsException must be thrown Suggected fix: Index: trunk/modules/luni/src/main/java/java/lang/StringBuffer.java === --- trunk/modules/luni/src/main/java/java/lang/StringBuffer.java (revision 377365) +++ trunk/modules/luni/src/main/java/java/lang/StringBuffer.java (working copy) @@ -798,7 +798,10 @@ * @see #length */ public synchronized void setLength(int length) { - if (length value.length) + if (length 0) { + throw new IndexOutOfBoundsException(argument is negative); + } + if (length value.length) Suggested junit test case: StringBufferTest.java - import junit.framework.*; public class StringBufferTest extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(StringBuffer.class); } public void test_read () { StringBuffer buffer = new StringBuffer(abcde); try { buffer.setLength(-1); fail(IndexOutOfBoundsException must be thrown); } catch (IndexOutOfBoundsException e) { //expected } } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: classlib build status emails?
On 21/02/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Mark Hindess wrote: On 21/02/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote: Mark Hindess wrote: Hi, Is there any interest in having build status emails sent to this list? I'm building classlib trunk with continuum and it would be simple for me to have messages like the following sent to the list whenever the status of our builds change. Currently I'm building only on linux but I plan to get windows builds running in the next few days. Cool. Please, only send changes (pass-fail, fail-pass). Agreed. Done. (Will the non-subscriber [EMAIL PROTECTED] be able to send to the list or is there something that needs to be done to avoid moderation/spam filtering?) We can certainly add that.. Thanks. Currently the builds are running the default target in make/build.xml but if there was a top-level build-and-test target then I could run that instead. This might produce more useful results. Ah. Can you do a sequence : $ cd make $ ant $ cd .. $ ant -f build-test.xml The current build is just a direct svn co and ant project at present. My next step is to use a local repository with svn:externals pulling in the harmony trunk so I'll have more flexibility. However, I suspect more people might run the test target if this process was simplified. Of course, as Tim mentioned it's not trivial because of the requirement for a VM and other dependencies so perhaps it is not worth it. I think it is. It's great that you have a private version of this running now for us, but we want to get to a point where a) anyone can do it b) The one that we reun for the project is running here on apache infrastructure I agree. I'd be happy to run it on apache infrastructure. I'd be happy to move development of the build-test-publish wrapper to apache infrastructure but that might slow things down a little. I'm going to concentrate on testing first - since the test results are probably more important than the actual build artifacts at this point - but wrapping the build should also allow me to add a publish step to our parent build if there was somewhere I could publish to? Lets get that working - we can then run it here and have it publish locally to the infrastructure... Agreed. Nothing we are doing here is really private except in that it is currently running on a private server. That's really a matter of getting results while avoiding the logistical issues - hardware, access, compiler licenses, etc - of running it on apache infrastructure. When it is working we can resolve those issues. Until it is working there isn't really much incentive. Regards, Mark. -- Forwarded message -- From: Apache Harmony Build [EMAIL PROTECTED] Date: 20-Feb-0006 11:04 Subject: [continuum] BUILD SUCCESSFUL: Classlib/linux.ia32 To: [EMAIL PROTECTED] Online report : http://ibmonly.hursley.ibm.com/continuum/linux.ia32/servlet/continuum/target/ProjectBuild.vm/view/ProjectBuild/id/1/buildId/44 Build statistics: State: Ok Previous State: Failed Started at: Mon, 20 Feb 2006 11:03:46 + Finished at: Mon, 20 Feb 2006 11:04:56 + Total time: 1m 9s Build Trigger: Forced Exit code: 0 Building machine hostname: hy2 Operating system : Linux Java version : 1.4.2(IBM Corporation) Changes No files changed Output: [snip] -- Mark Hindess [EMAIL PROTECTED] IBM Java Technology Centre, UK.
Re: Using APR for Harmony's native link to the OS?
Another advantages of portlib is that its function implementation can be easily replaced without recompiling the entire JVM, copied its document from [1] below: quote The port library is implemented as a table of function pointers. One advantage of a function pointer based table is the ability to replace any functionality without recompiling the entire Java virtual machine. For example if an application is experiencing a memory leak, the memory management functions of the port library can be replaced to help determine the root cause of this leak. Alternatively applications wishing to control all memory allocation can provide their own routines to override the platform specific allocation and deallocation of memory. Various implementations of the port library may choose not to implement all functionality contained in the port library table. If a platform does not support sockets, and thus the Java virtual machine does not utilize sockets, the port library does not need to provide a valid socket behavior. The port library contains version control information that enables applications to determine if required functionality is supported. In addition the version control information allows applications to determine if the port library provided is compatible with the one which they were compiled against. /quote Tim Ellison wrote: As I wrote earlier, I agree. Implementing the Harmony portability layer to run on APR is a good idea (volunteers?). The Harmony portlib [1] itself has some interesting characteristics that I would not want to loose by programming Java natives straight to APR. The portlib is a table of function pointers that is linked to a particular VM instance. Each function in turn has a parameter that is the function table it should use; and all this is wrapped up in some syntactic sugar to make palatable to the programmer. This means that an application that creates multiple VM's in the same process (i.e. repeated calls to JNI_CreateJavaVM) has the option to keep the resource management separated. It can ensure that one VM does not grab the entire OS heap, or that the resources are allocated a given security sandbox, or (heaven-forbid) if the VM abends it can clean-up just that VM's resources. It also makes things like tracing much easier, since you can augment a function at any given point by replacing it in the function table, and have that augmented function used by all downstream callers. This scenario will be familiar to the app server crowd, who want to run multiple VMs inside a webserver for example. Here's how it looks from a JNI programmer's pov [2]: void JNICALL Java_java_net_Socket_socketCloseImpl (JNIEnv * env, jclass thisClz, jobject fileDescriptor) { PORT_ACCESS_FROM_ENV (env); hysocket_t socketP; socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor); if (hysock_socketIsValid (socketP)) { /* Set the file descriptor before closing so the select polling loop will terminate. */ /* Some platforms wait in the socket close. */ setJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor, (void *) -1); hysock_close (socketP); } } The PORT_ACCESS_FROM_ENV(env) is a macro that reaches into the JNIEnv and gets the table of function pointers[3]. #define PORT_ACCESS_FROM_ENV(jniEnv) \ VMInterface *portPrivateVMI = VMI_GetVMIFromJNIEnv(jniEnv); \ HyPortLibrary *privatePortLibrary = \ (*portPrivateVMI)-GetPortLibrary(portPrivateVMI) After that you could tweak it if you choose, but this function doesn't. Then calls to 'functions' like hysock_socketIsValid and hysock_close are actually macros that expand out into offsets into the function table, and passing the function table down; i.e. hysock_socketIsValid (socketP) expands as follows [3] #define hysock_socketIsValid(param1) \ privatePortLibrary-sock_socketIsValid(privatePortLibrary,param1) You can see where this is going. The implementation of sock_socketIsValid inherits the caller's view of the portlib, and so on. The on-line doc describes it here [1]. While we would normally also use the portlayer as the OS porting layer, implementing this on APR would be a GoodThing too. [1] http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/classlib/trunk/doc/vm_doc/html/group__Port.html [2] taken from http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/socket.c?view=markup [3] look in http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/include/hyport.h?view=markup Regards, Tim Alexey Petrenko wrote: What do you think?
[jira] Assigned: (HARMONY-93) some methods in java.util.Collections don't throw NPE when the parameter is null
[ http://issues.apache.org/jira/browse/HARMONY-93?page=all ] Tim Ellison reassigned HARMONY-93: -- Assign To: Tim Ellison some methods in java.util.Collections don't throw NPE when the parameter is null - Key: HARMONY-93 URL: http://issues.apache.org/jira/browse/HARMONY-93 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison Attachments: CollectionsTest.java, fix.txt According to j2se 1.4.2 and 1.5 specification for the Collections class The methods of this class all throw a NullPointerException if the collections provided to them are null. Harmony does not throw NPE for some methods. Code to reproduce: import java.util.*; public class test2 { public static void main(String [] args) { SortedMap m = null; Map map=null; Set set=null; SortedSet sortedset=null; SortedMap sortedmap =null; Collection col=null; try { Collections.synchronizedCollection(col); System.out.println(synchronizedCollection(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSortedMap(sortedmap); System.out.println(synchronizedSortedMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedMap(map); System.out.println(synchronizedMap(map) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSet(set); System.out.println(synchronizedSet(set) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSortedSet(sortedset); System.out.println(synchronizedSortedSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableCollection(col); System.out.println(unmodifiableCollection(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableMap(map); System.out.println(unmodifiableMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSet(set); System.out.println(unmodifiableSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSortedMap(sortedmap); System.out.println(unmodifiableSortedMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSortedSet(sortedset); System.out.println(unmodifiableSortedSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy: parallel) PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED C:\tmpC:\harmony\trunk\deploy\jre\bin\java -showversion test2 (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. synchronizedCollection(null) must throw NPE synchronizedSortedMap(null) must throw NPE synchronizedMap(map) must throw NPE synchronizedSet(set) must throw NPE synchronizedSortedSet(null) must throw NPE unmodifiableCollection(null) must throw NPE unmodifiableMap(null) must throw NPE unmodifiableSet(null) must throw NPE unmodifiableSortedMap(null) must throw NPE unmodifiableSortedSet(null) must throw NPE Suggected fix and test in attachment. --
[jira] Resolved: (HARMONY-93) some methods in java.util.Collections don't throw NPE when the parameter is null
[ http://issues.apache.org/jira/browse/HARMONY-93?page=all ] Tim Ellison resolved HARMONY-93: Resolution: Fixed Svetlana, Fixed in LUNI module java.util.Collections at repo revision 379447. Please check this fully resolves your problem. some methods in java.util.Collections don't throw NPE when the parameter is null - Key: HARMONY-93 URL: http://issues.apache.org/jira/browse/HARMONY-93 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison Attachments: CollectionsTest.java, fix.txt According to j2se 1.4.2 and 1.5 specification for the Collections class The methods of this class all throw a NullPointerException if the collections provided to them are null. Harmony does not throw NPE for some methods. Code to reproduce: import java.util.*; public class test2 { public static void main(String [] args) { SortedMap m = null; Map map=null; Set set=null; SortedSet sortedset=null; SortedMap sortedmap =null; Collection col=null; try { Collections.synchronizedCollection(col); System.out.println(synchronizedCollection(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSortedMap(sortedmap); System.out.println(synchronizedSortedMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedMap(map); System.out.println(synchronizedMap(map) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSet(set); System.out.println(synchronizedSet(set) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.synchronizedSortedSet(sortedset); System.out.println(synchronizedSortedSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableCollection(col); System.out.println(unmodifiableCollection(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableMap(map); System.out.println(unmodifiableMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSet(set); System.out.println(unmodifiableSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSortedMap(sortedmap); System.out.println(unmodifiableSortedMap(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } try { Collections.unmodifiableSortedSet(sortedset); System.out.println(unmodifiableSortedSet(null) must throw NPE); } catch (NullPointerException e) { System.out.println(PASSED); } } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy: parallel) PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED PASSED C:\tmpC:\harmony\trunk\deploy\jre\bin\java -showversion test2 (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. synchronizedCollection(null) must throw NPE synchronizedSortedMap(null) must throw NPE synchronizedMap(map) must throw NPE synchronizedSet(set) must throw NPE synchronizedSortedSet(null) must throw NPE unmodifiableCollection(null) must throw NPE unmodifiableMap(null) must throw NPE unmodifiableSet(null) must throw NPE
Re: Harmony tools and utilities
Stepan Mishura wrote: Tool name Status Priority javadoc missing high javah missing medium keytool missing medium policytool missing low klist missingN/A FYI, jchevm contains a javah program (called jcjavah for now). -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com
classlib ant clean is incomplete
I'm a unix hacker used to working at the command line. (But that wasn't supposed to be a confession and I'm sure some of this will be visible to IDE users.) When preparing patches, for example for the the native-src, I might run: cd native-src ant clean svn stat to see what files I've added and/or removed. (Obviously I could use svn diff but that only really answers the changed files question.) At the moment when I do this I see: ? linux.IA32/build.log ? linux.IA32/include/unicode ? linux.IA32/text/libicuuc.so.34 ? linux.IA32/vmi/vmi.map ? linux.IA32/fdlibm/e_exp.c ? linux.IA32/fdlibm/s_finite.c ... [ 100+ lines removed ] ? linux.IA32/zlib/adler32.c ? linux.IA32/zlib/old ? linux.IA32/zlib/amiga ? linux.IA32/zlib/infback.c ? linux.IA32/zlib/examples (Aside: build.log should go soon I think. And one of my JIRA patches fixes the clean target of the makefile that creates vmi/vmi.map.) It's plain to see why most of these files are still around since, in native-src/build.xml, make-all and layout have corresponding clean targets but overlay-oss does not. Of course, this is slightly non-trivial to fix since you can't easily reverse the unzip. (You'd want an zip-content-list task that could be used to create a fileset for a delete task.) However, I think it's actually a good idea to do more to distinguish the files that come from the two zip files anyway - for instance so that people don't edit them and have changes clobbered by the next make. So I had a go at unzip'ing them to zlib/dist and fdlibm/dist respectively. (This has the added advantage that it is easier to maintain svn:ignore properties for two directory entries than for the dozens of files they contain individually.) On Linux this was straightforward since GNU make supports VPATH. I'm not really familiar with nmake on Windows but when I tried the same syntax it failed. Does anyone know what options we might have for a similar fix for Windows? One option is moving to GNU make on Windows but that's a relatively big step? I'd like to help completing this tidying up and the related exercise of determining appropriate svn:ignore properties (so you don't *have* to do ant clean before using svn stat). Regards, Mark. -- Mark Hindess [EMAIL PROTECTED] IBM Java Technology Centre, UK.
Re: [classlib] using cpp
yes, let me refine my position. I don't object to using the C++ language where it makes sense, e.g. to simplify things. IMHO the jaasnix native code's usage is somewhat gratuitous, and results in a larger binary for no great benefit. If people want to use vanilla C++ features then sure, but we have to be mindful of portability problems that would be caused by the areas of C++ that typically vary amongst implementations -- so dependencies on a particular STL, use of C++ exceptions / RTTI, etc. are all areas asking for portability trouble in the future. Regards, Tim Paulex Yang wrote: Instead of introducing this strict language rule, I suggest to consider this restriction case by case with some principles. One of the principles should be that our codes can be easily ported to as many platforms as possible. Obviously ANSI C has more compatibility on multi platforms and is much easier to support for platform provider than C++, and because we have few native codes in classlib written by c++ so far, it's not a bad idea that we consider ANSI C as the first choice to implement native codes in classlib. And of course, if someday in some cases, the implementation by C++ is obviously much better(elegant, simple, high performance, or anything else) than counterpart by C, so that the compatibility/complexity issue introduced can be ignored, I have no objection to use C++. Mikhail Loenko wrote: I'm OK with this change in the jaasnix. As for the whole classlib, I'm afraid that having such a strict language rule at this point might hold some potential contributors. Thanks, Mikhail On 2/14/06, Tim Ellison [EMAIL PROTECTED] wrote: Alexey Petrenko wrote: You suggest not to use C++ in Harmony at all? As Geir says elsewhere, I mean in classlib in particular. Regards, Tim -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK. -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
Re: newbie to project-where to start from
James, Feel free to take a look at all the math areas of JSE in Harmony -- try running some code (do you have any math apps that you use?) or try measuring some performance numbers. Performance enhancement patches will be most welcome. Regards, Tim James Pluck wrote: On 2/20/06, Vladimir Gorr [EMAIL PROTECTED] wrote: Hi James, in case if you are not aware yet I'd like to mention the HARMONY-39 contribution contains the full implementation for java.math package (both BigInteger BigDecimal). Thanks, Vladimir Gorr, Intel Middleware Products Division. Thanks Vladimir! I'll have a look. -- James Pluck PalmOS Ergo Sum -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
[jira] Assigned: (HARMONY-108) removing unused targets/variables from linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-108?page=all ] Tim Ellison reassigned HARMONY-108: --- Assign To: Tim Ellison removing unused targets/variables from linux makefiles -- Key: HARMONY-108 URL: http://issues.apache.org/jira/browse/HARMONY-108 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.remove.unused.targets.and.variables.diff We should remove the unused rules for .cpp to .o and .asm to .o (the latter references a script which isn't present). We should also remove the unused quick and BUILDLIB targets. I'll attach a patch shortly. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-108) removing unused targets/variables from linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-108?page=all ] Tim Ellison resolved HARMONY-108: - Resolution: Fixed Mark, Patch looks good. Committed in repo revision 379465. Please check that it has been applied as you expected. removing unused targets/variables from linux makefiles -- Key: HARMONY-108 URL: http://issues.apache.org/jira/browse/HARMONY-108 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.remove.unused.targets.and.variables.diff We should remove the unused rules for .cpp to .o and .asm to .o (the latter references a script which isn't present). We should also remove the unused quick and BUILDLIB targets. I'll attach a patch shortly. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-109) reducing the verbose auto-generated variable names in linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-109?page=all ] Tim Ellison reassigned HARMONY-109: --- Assign To: Tim Ellison reducing the verbose auto-generated variable names in linux makefiles - Key: HARMONY-109 URL: http://issues.apache.org/jira/browse/HARMONY-109 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.reduce.variables.diff The linux makefiles contain multiple variables such as BUILDFILES1, BUILDFILES2, etc. These should be reduce to single variables. Also the MDLLIBFILES* variables aren't used in the common/makefile. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-110) fixing the clean targets in linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-110?page=all ] Tim Ellison reassigned HARMONY-110: --- Assign To: Tim Ellison fixing the clean targets in linux makefiles --- Key: HARMONY-110 URL: http://issues.apache.org/jira/browse/HARMONY-110 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.fix.clean.targets.diff The linux makefiles use the actual filename in the clean targets. It would be more appropriate to use the defined variable name. Also, the vmi/makefile fails to remove $(LIBNAME).map in the clean target. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
java.lang.String.replaceFirst from IBM VM throws NPE
We got problem with Harmony on IBM VM on Windows. java.lang.String.replaceFirst throws NPE. Here is the testcase: public class Test { public static void main(String args[]) { String xx = test; xx = xx.replaceFirst(t,z); } } Here is the stack trace: C:\Work\Harmony\Sources\Harmony\deploy\jre\binjava Test Exception in thread main java.lang.NullPointerException at java.lang.String.replaceFirst(String.java:1642) at Test.main(Test.java:4) Since IBM VM is not an OpenSource I can not check java.lang.String for the cause of this problem :( Can we ask IBM guys somehow to fix this issue? -- Alexey A. Petrenko Intel Middleware Products Division
Re: [classlib] using cpp
Yep, agreed. 2006/2/21, Tim Ellison [EMAIL PROTECTED]: yes, let me refine my position. I don't object to using the C++ language where it makes sense, e.g. to simplify things. IMHO the jaasnix native code's usage is somewhat gratuitous, and results in a larger binary for no great benefit. If people want to use vanilla C++ features then sure, but we have to be mindful of portability problems that would be caused by the areas of C++ that typically vary amongst implementations -- so dependencies on a particular STL, use of C++ exceptions / RTTI, etc. are all areas asking for portability trouble in the future. Regards, Tim -- Alexey A. Petrenko Intel Middleware Products Division
Re: classlib build status emails?
Stuart Ballard stuart.a.ballard at gmail.com writes: If you can give me an url that will always point to the latest jar file(s), I can set up nightly japi results and mail diffs to this list. Geir gave me a pointer to the latest snapshots, so the japi results are now online: http://www.kaffe.org/~stuart/japi/htmlout/h-jdk10-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk11-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk15-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-harmony-jdk15 The last report triggers a recently-discovered bug in japitools that causes some StringBuffer methods to be incorrectly reported as missing in jdk15 (which would mean that they are extra methods in harmony). I suggest ignoring the last report for now, or at least verifying anything it claims against Sun's documentation before acting on it. Other than that the reports should give correct information about Harmony's coverage of the API defined in each JDK version. Whenever these results change for better or worse, (unless I've screwed something up), an email will be sent to this list with the differences. Stuart.
Re: [jira] Created: (HARMONY-110) fixing the clean targets in linux makefiles
Thanks for the clean-ups Mark -- can't wait for the Windows equivalents ;-) Regards, Tim Mark Hindess (JIRA) wrote: fixing the clean targets in linux makefiles --- Key: HARMONY-110 URL: http://issues.apache.org/jira/browse/HARMONY-110 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Priority: Trivial Attachments: harmony.fix.clean.targets.diff The linux makefiles use the actual filename in the clean targets. It would be more appropriate to use the defined variable name. Also, the vmi/makefile fails to remove $(LIBNAME).map in the clean target. -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
Re: Classpath on Cygwin: failed to open native library error
Hello, Archie Today I've made changes to eliminate the requirement that _JC_FULL_ALIGNMENT be at most sizeof(_jc_word), so this will fix the assertion in heap.c. Just compared my local version with svn repository at Harmony project.. Don't see any changes. Do you commit this changes in JCVM repository ? Thanks. Ivan
[jira] Commented: (HARMONY-108) removing unused targets/variables from linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-108?page=comments#action_12367208 ] Mark Hindess commented on HARMONY-108: -- Looks as I expected. Thanks Tim. removing unused targets/variables from linux makefiles -- Key: HARMONY-108 URL: http://issues.apache.org/jira/browse/HARMONY-108 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.remove.unused.targets.and.variables.diff We should remove the unused rules for .cpp to .o and .asm to .o (the latter references a script which isn't present). We should also remove the unused quick and BUILDLIB targets. I'll attach a patch shortly. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-110) fixing the clean targets in linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-110?page=comments#action_12367209 ] Mark Hindess commented on HARMONY-110: -- Looks as I expected. Thanks Tim. fixing the clean targets in linux makefiles --- Key: HARMONY-110 URL: http://issues.apache.org/jira/browse/HARMONY-110 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.fix.clean.targets.diff The linux makefiles use the actual filename in the clean targets. It would be more appropriate to use the defined variable name. Also, the vmi/makefile fails to remove $(LIBNAME).map in the clean target. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-109) reducing the verbose auto-generated variable names in linux makefiles
[ http://issues.apache.org/jira/browse/HARMONY-109?page=comments#action_12367210 ] Mark Hindess commented on HARMONY-109: -- Looks as I expected. Thanks Tim. reducing the verbose auto-generated variable names in linux makefiles - Key: HARMONY-109 URL: http://issues.apache.org/jira/browse/HARMONY-109 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Assignee: Tim Ellison Priority: Trivial Attachments: harmony.reduce.variables.diff The linux makefiles contain multiple variables such as BUILDFILES1, BUILDFILES2, etc. These should be reduce to single variables. Also the MDLLIBFILES* variables aren't used in the common/makefile. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: classlib ant clean is incomplete
Mark Hindess wrote: I'm a unix hacker used to working at the command line. (But that wasn't supposed to be a confession and I'm sure some of this will be visible to IDE users.) When preparing patches, for example for the the native-src, I might run: cd native-src ant clean svn stat to see what files I've added and/or removed. (Obviously I could use svn diff but that only really answers the changed files question.) At the moment when I do this I see: ? linux.IA32/build.log ? linux.IA32/include/unicode ? linux.IA32/text/libicuuc.so.34 ? linux.IA32/vmi/vmi.map ? linux.IA32/fdlibm/e_exp.c ? linux.IA32/fdlibm/s_finite.c ... [ 100+ lines removed ] ? linux.IA32/zlib/adler32.c ? linux.IA32/zlib/old ? linux.IA32/zlib/amiga ? linux.IA32/zlib/infback.c ? linux.IA32/zlib/examples (Aside: build.log should go soon I think. Done, removed in repo revision 379496. And one of my JIRA patches fixes the clean target of the makefile that creates vmi/vmi.map.) It's plain to see why most of these files are still around since, in native-src/build.xml, make-all and layout have corresponding clean targets but overlay-oss does not. Of course, this is slightly non-trivial to fix since you can't easily reverse the unzip. (You'd want an zip-content-list task that could be used to create a fileset for a delete task.) However, I think it's actually a good idea to do more to distinguish the files that come from the two zip files anyway - for instance so that people don't edit them and have changes clobbered by the next make. So I had a go at unzip'ing them to zlib/dist and fdlibm/dist respectively. (This has the added advantage that it is easier to maintain svn:ignore properties for two directory entries than for the dozens of files they contain individually.) I agree -- can you send the ant script / makefile changes via JIRA please? On Linux this was straightforward since GNU make supports VPATH. I'm not really familiar with nmake on Windows but when I tried the same syntax it failed. Does anyone know what options we might have for a similar fix for Windows? One option is moving to GNU make on Windows but that's a relatively big step? How about changing references to foobar.obj to dist/foobar.obj in the windows makefile? I know is is not quite as cool as VPATH, but then we can lay out the files in the same way while we continue the discussion of sharing multi-platform code. I'd like to help completing this tidying up and the related exercise of determining appropriate svn:ignore properties (so you don't *have* to do ant clean before using svn stat). I'd like you to help do that too ;-) Regards, Tim -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
Re: [jira] Created: (HARMONY-110) fixing the clean targets in linux makefiles
On 21/02/06, Tim Ellison [EMAIL PROTECTED] wrote: Thanks for the clean-ups Mark -- can't wait for the Windows equivalents ;-) I was planning a few more incremental changes on the linux ones then, assuming people were happy with them, repeat the changes on the windows makefiles in one patch. Regards, Mark.
Re: Classpath on Cygwin: failed to open native library error
snowdosker wrote: Today I've made changes to eliminate the requirement that _JC_FULL_ALIGNMENT be at most sizeof(_jc_word), so this will fix the assertion in heap.c. Just compared my local version with svn repository at Harmony project.. Don't see any changes. Do you commit this changes in JCVM repository ? Yes, r378953. -Archie __ Archie Cobbs *CTO, Awarix* http://www.awarix.com
Re: java.lang.String.replaceFirst from IBM VM throws NPE
Hi Alexey, ok, Ive recreated your problem using the latest snapshot and VME. Essentially the code at modules/kernel/src/main/java/java/lang/String.java is the same as that in the VME kernel.jar. Looking in there (these calls can also be seen if the test is run within a debugger), we see that the replaceFirst(String, String) implementation is: public String replaceFirst(String expr, String substitute) { return Pattern.compile(expr).matcher(this).replaceFirst(substitute); } Unfortunately the implementation of Pattern at modules/regex/src/main/java/java/util/regex/Pattern.java is only a stub (as HARMONY-39 has not yet been accepted into the Harmony SVN repository) and as such just returns null. Thus when we try to dereference the return from Pattern.compile(expr) we receive a NullPointerException. Once the regex in HARMONY-39 is moved into SVN this should go away. As a sideline, I think we should be able to move String.java out of kernel entirely anyway. We already have an implementation at modules/kernel/src/main/java/java/lang/String.java, and the only VM specific code in String is the intern() method. This method could simply be redirected to call VM.intern(String), a class which is within kernel, and then String.java can be moved into LUNI. It also means that the VM writer(s) need not implement the rest of the String class unnecessarily. Sound good? Alexey Petrenko wrote: We got problem with Harmony on IBM VM on Windows. java.lang.String.replaceFirst throws NPE. Here is the testcase: public class Test { public static void main(String args[]) { String xx = test; xx = xx.replaceFirst(t,z); } } Here is the stack trace: C:\Work\Harmony\Sources\Harmony\deploy\jre\binjava Test Exception in thread main java.lang.NullPointerException at java.lang.String.replaceFirst(String.java:1642) at Test.main(Test.java:4) Since IBM VM is not an OpenSource I can not check java.lang.String for the cause of this problem :( Can we ask IBM guys somehow to fix this issue? -- Alexey A. Petrenko Intel Middleware Products Division -- Oliver Deakin IBM United Kingdom Limited
[jira] Commented: (HARMONY-101) NPE in java.util.regex.Pattern.compile()
[ http://issues.apache.org/jira/browse/HARMONY-101?page=comments#action_12367228 ] Tim Ellison commented on HARMONY-101: - Svetlana, Until the HARMONY-39 contribution is accepted you won't have much joy with the regex code, since there are only compile-against stubs in the regex module. NPE in java.util.regex.Pattern.compile() Key: HARMONY-101 URL: http://issues.apache.org/jira/browse/HARMONY-101 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko According to 1.4.2 and 1.5 specifications for java.util.regex.Pattern.matches(String regex,CharSequence input) An invocation of this convenience method of the form Pattern.matches(regex, input); behaves in exactly the same way as the expression Pattern.compile(regex).matcher(input).matches() Harmony throws unspecified NPE for Pattern.compile and returns false instead of true for Pattern.matches(). Code to reproduce: import java.util.regex.Pattern; public class test2 { public static void main(String[] args) { System.out.println(boolean is true=+Pattern.matches([,\\p{Punct}], ,)); System.out.println(boolean is true=+Pattern.compile([,\\p{Punct}]).matcher(,).matches()); } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy: parallel) boolean is true=true boolean is true=true C:\tmpC:\harmony\trunk\deploy\jre\bin\java -showversion test2 (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. boolean is true=false java.lang.NullPointerException at test2.main(test2.java:5) Suggested junit test case: PatternTest.java - import junit.framework.*; import java.util.regex.Pattern; public class PatternTest extends TestCase { public static void main(String[] args) { junit.textui.TestRunner.run(PatternTest.class); } public void test_compile () { assertTrue(Pattern.matches([,\\p{Punct}], ,)); assertTrue(Pattern.compile([,\\p{Punct}]).matcher(,).matches()); } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: classlib build status emails?
These are very cool -- thanks Stuart. We need to figure out a way that we can run the japitools on a regular basis to track progress. It is also a great way to indicate where people can help round-out a particular package for example. How should I interpret a line whose percentage figures don't add up to 100% ? For example, looking at: http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-harmony The packages java.security.interfaces and java.text are flagged as less than 100% good, but without any minor/bad/missing/abs.add sins. Regards, Tim Stuart Ballard wrote: Stuart Ballard stuart.a.ballard at gmail.com writes: If you can give me an url that will always point to the latest jar file(s), I can set up nightly japi results and mail diffs to this list. Geir gave me a pointer to the latest snapshots, so the japi results are now online: http://www.kaffe.org/~stuart/japi/htmlout/h-jdk10-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk11-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-jdk15-harmony http://www.kaffe.org/~stuart/japi/htmlout/h-harmony-jdk15 The last report triggers a recently-discovered bug in japitools that causes some StringBuffer methods to be incorrectly reported as missing in jdk15 (which would mean that they are extra methods in harmony). I suggest ignoring the last report for now, or at least verifying anything it claims against Sun's documentation before acting on it. Other than that the reports should give correct information about Harmony's coverage of the API defined in each JDK version. Whenever these results change for better or worse, (unless I've screwed something up), an email will be sent to this list with the differences. Stuart. -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
Re: java.lang.String.replaceFirst from IBM VM throws NPE
2006/2/21, Oliver Deakin [EMAIL PROTECTED]: As a sideline, I think we should be able to move String.java out of kernel entirely anyway. We already have an implementation at modules/kernel/src/main/java/java/lang/String.java, and the only VM specific code in String is the intern() method. This method could simply be redirected to call VM.intern(String), a class which is within kernel, and then String.java can be moved into LUNI. It also means that the VM writer(s) need not implement the rest of the String class unnecessarily. Sound good? Yes, it will be great! Thanks. -- Alexey A. Petrenko Intel Middleware Products Division
Bug-to-bug compatibility - first issue
We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
This issue can be fixed either in Harmony classlib or kernel classes in VM. Thanks, Vladimir Strigun, Intel Middleware Products Division On 2/21/06, Alexey Petrenko [EMAIL PROTECTED] wrote: IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: newbie to project-where to start from
On 2/22/06, Tim Ellison [EMAIL PROTECTED] wrote: James, Feel free to take a look at all the math areas of JSE in Harmony -- try running some code (do you have any math apps that you use?) or try measuring some performance numbers. Performance enhancement patches will be most welcome. Good idea Tim. I've just completed my Science degree in Maths and CompSci so I have quite a few algorithms bouncing in my head that I might be able to use. Thanks for the suggestions. It's given me a better idea of where to start anyway. This is a huge project and it was a little daunting to know where I could best help out. Cheers James. -- James Pluck PalmOS Ergo Sum
Re: Platform dependent code placement (was: Re: repo layout again)
Hello, team, I've tried to simplify construction below, which is sample of Andrey's ant script, and end up with following regular expression which matches string containing particular OS identifier or strings w/o any OS identifiers: .*([_\\W]${env.OS}[_\\W].*$|.*(?!.*[\\W_](win|lin|sol)[\\W_].*)$) This would work fine with regex package from HARMONY-39 contribution, but fail to compile with SUN's classes (PatternSyntaxException: Look-behind group does not have an obvious maximum length, I would appreciate if someone point me to the place in any regex specification, stating that it's valid behavior). From the compatibility point of view this enhancement is no good, but to give a hint how to implement negative assertions in terms of regex negative look behind/ahead is the solution. propertyregex property=OS.match input=@{file} regexp=[\W_]${env.OS}[\W_] override=yes defaultValue=no select=yes/ propertyregex property=OS.any.match input=@{file} regexp=[\W_](win|linux|solaris)[\W_] override=yes defaultValue=no select=yes/ istrue value=${OS.match}/ not istrue value=${OS.any.match}/ /not Thank you. Nikolay Kuznetsov Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: This issue can be fixed either in Harmony classlib or kernel classes in VM. Yes, you are right. -- Alexey A. Petrenko Intel Middleware Products Division
[jira] Created: (HARMONY-112) native-src/build.xml should have clean-overlay-oss target
native-src/build.xml should have clean-overlay-oss target - Key: HARMONY-112 URL: http://issues.apache.org/jira/browse/HARMONY-112 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess There should really be a clean-overlay-oss target to remove the files generated by the overlay-oss target. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-112) native-src/build.xml should have clean-overlay-oss target
[ http://issues.apache.org/jira/browse/HARMONY-112?page=all ] Mark Hindess updated HARMONY-112: - Attachment: improved.native.clean.diff Patch to add clean-overlay-oss target. native-src/build.xml should have clean-overlay-oss target - Key: HARMONY-112 URL: http://issues.apache.org/jira/browse/HARMONY-112 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Attachments: improved.native.clean.diff There should really be a clean-overlay-oss target to remove the files generated by the overlay-oss target. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
auth natives (was: Re: svn commit: r378390 - in /incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/auth: ./ auth_copyright.c authwin32.c authwin32.h hyauth.def hyauth.rc makefile)
FYI: I have added the C versions of the auth natives into the build. They are building as hyayth.dll | libhyauth.so into jre/bin. However, I *haven't* removed the jaaswin.dll | libjaasnix.so code (and these are still being loaded by NTSystem.java | UnixSystem.java) until I've tested the new libraries. Regards, Tim Tim Ellison wrote: sure -- this is the C version of the jaaswin code (including some Hy portlib-ification), with building code in the makefile format that the other natives use. The Linux version still needs doing, so I wanted to stash it in SVN for discussion with Mikhail et al before linking it into the actual build. Thanks Tim Leo Simons wrote: On Thu, Feb 16, 2006 at 11:00:26PM -, [EMAIL PROTECTED] wrote: Author: tellison Date: Thu Feb 16 15:00:22 2006 New Revision: 378390 URL: http://svn.apache.org/viewcvs?rev=378390view=rev Log: Just stashing this code in svn, not included in the build. When you put new things in SVN, please either make sure to have some notes next to them describing what it is for / what it does / what you will use it for or, failing that, write a meaningful commit message that has this info. The subversion project has a great HACKING.html that describes the how and the why and the like for this kind of thing. Thanks! Leo -- Tim Ellison ([EMAIL PROTECTED]) IBM Java technology centre, UK.
[jira] Created: (HARMONY-113) java.nio.charset.Charset should regard empty charset name properly as Illegal CharsetName
java.nio.charset.Charset should regard empty charset name properly as Illegal CharsetName - Key: HARMONY-113 URL: http://issues.apache.org/jira/browse/HARMONY-113 Project: Harmony Type: Bug Components: Classlib Reporter: Richard Liang I think it's caused by the different between RI 1.4.2 and RI 5.0. Three test cases in JIRA#57 should be updated accordingly. public void testIsSupported_EmptyString() { try { Charset.isSupported(); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } public void testConstructor_EmptyCanonicalName() { try { new MockCharset(, new String[0]); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } public void testConstructor_EmptyAliases() { try { new MockCharset(mockChar, new String[] { }); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-113) java.nio.charset.Charset should regard empty charset name properly as Illegal CharsetName
[ http://issues.apache.org/jira/browse/HARMONY-113?page=all ] Richard Liang updated HARMONY-113: -- Attachment: charset_patch.txt Please try my patch. Thanks a lot. java.nio.charset.Charset should regard empty charset name properly as Illegal CharsetName - Key: HARMONY-113 URL: http://issues.apache.org/jira/browse/HARMONY-113 Project: Harmony Type: Bug Components: Classlib Reporter: Richard Liang Attachments: charset_patch.txt I think it's caused by the different between RI 1.4.2 and RI 5.0. Three test cases in JIRA#57 should be updated accordingly. public void testIsSupported_EmptyString() { try { Charset.isSupported(); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } public void testConstructor_EmptyCanonicalName() { try { new MockCharset(, new String[0]); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } public void testConstructor_EmptyAliases() { try { new MockCharset(mockChar, new String[] { }); fail(Should throw IllegalCharsetNameException!); } catch (IllegalCharsetNameException e) { // } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: local test server (Was: Re: [jira] Commented: (HARMONY-71) java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
Dears, Agree that server (maybe not local) is required for some sophisticated test cases. To make thing simply, we may provide more detail guide (step-by-step) on how to setup/configure a typical testing server. Or shall we setup a test server and allow user to share our testing server? Richard Liang China Software Development Lab, IBM Tim Ellison wrote: Stepan Mishura wrote: I glanced through a local server code from HARMONY-57 contribution without looking into implementation details and ... this made me think. I catch hold of the following: 1) The server contains some testing code that looks not good for me Care to explain? 2) It is not as simple as I expected - my impression was that a local server implementation should be very simple because we are not going to test whether it corresponds to http spec. or not. IMHO, it should only provide a test case with: - a port number to open communication - access to a server's input/output streams to verify a request to a server or to form a server's response. Naive? Well, I'm aware that I'm not so experienced in java.net development and testing and may be I'm wrong. The local server I referenced can be used for a number of the java.net tests, some of which do require more sophisticated behavior, like basic authentication, eTags, etc. I agree that the tests in HARMONY-71 only need something to accept their connection, but I was simply pointing out that there will be a local server we can use if that contribution is accepted into the project, so probably not worth writing another. I'd like to start with the first issue (BTW, is it ok to discuss details of contribution implementation if it is not accepted yet?). Sure -- I would expect people to be evaluating it thoroughly so that they can vote the code in/out. The PPMC will shout early if the paperwork implies a contribution is unacceptable. Can we avoid adding a code that is specific for some test case to a local server? Does it interfere with what you want to do? In some cases, the test case needs to know what is on the server a priori, so that it can test the client behavior correctly. Regards, Tim On 2/16/06, Tim Ellison wrote: I would rather that you just opened a new JIRA issue for that as it doesn't relate to the original problem. FYI there is a local server incoming in the HARMONY-57 contribution, so don't spend any time on it, see: HARMONY-57\Harmony\Harmony_Tests\src\test\java\tests\support\Support_HttpServer.java Regards, Tim Stepan Mishura (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-71?page=comments#action_12366637] Stepan Mishura commented on HARMONY-71: --- Tim, Added test case (test_setUseCachesZ) depends on network and it fails if it can not create connection with apache.org. The same for HARMONY-72. I'm going to attach a patch file with a local server in it. Could you reopen this JIRA? Thanks, Stepan. java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError -- Key: HARMONY-71 URL: http://issues.apache.org/jira/browse/HARMONY-71 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison According to j2se 1.4.2 specification method java.net.URLConnection.setUseCaches(boolean) throws IllegalStateException, if already connected. Harmony throws java.lang.IllegalAccessError instead, that contradicts the specification. Code to reproduce: import java.io.IOException; import java.net.*; public class test2 { public static void main(String[] args) { HttpURLConnection u=null; try { u=(HttpURLConnection)(new URL(http://intel.com ).openConnection()); u.connect(); } catch (MalformedURLException e) { System.out.println(unexpected MalformedURLException+e); } catch (IOException f) { System.out.println(unexpected IOException+f); } try { u.setUseCaches(true); } catch (IllegalStateException e) { System.out.println(OK. Expected IllegalStateException); e.printStackTrace(); }; } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, Native Threads, GC strategy:
[jira] Created: (HARMONY-114) [jchevm] rough draft of files that glue Harmony Class Lib to JCHEVM native methods
[jchevm] rough draft of files that glue Harmony Class Lib to JCHEVM native methods -- Key: HARMONY-114 URL: http://issues.apache.org/jira/browse/HARMONY-114 Project: Harmony Type: Improvement Components: Contributions Environment: initially just MS Windows Reporter: weldon washburn Attached is a zip file containing a first cut at gluing Harmony Class Library to the native methods exposed by JCHEVM. I call this glue, kernel_path. So far, no mods have been made to any JCHEVM files. All modifications to date have been to java files contained in the Harmony Class Library (HCL) kernel directory. We can use the above to start the debate on how files like Thread.java should be designed. We should also decide where to put kernel_path. Meanwhile, I plan to build jchevm and attempt to run hello_world.java using HCL. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jchevm] rough draft of Harmony Class Lib to gnu native method glue
Archie, Tim, I tried to attach a zip file but harmony-dev rejected it. I also tried to post the zip file to harmony/jira. It did not work. I will mail the zip file to you out of band while I try to figure out how to upload the zip file. Sent separately is a zip file containing a first cut at gluing Harmony Class Library to the native methods exposed by JCHEVM. I call this glue, kernel_path. So far, no mods have been made to any JCHEVM files. All modifications to date have been to java files contained in the Harmony Class Library (HCL) kernel directory. We can use the above to start the debate on how files like Thread.java should be designed. We should also decide where to put kernel_path. Meanwhile, I plan to build jchevm and attempt to run hello_world.java using HCL. Let me know what you think. -- Weldon Washburn Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
I agree with you that it is natural to copy RI behavior in this case, and I even don't think this is a bug, in the same reason with one of the bugs' evaluation [1], quoteAn empty path component is always (in both Unix/Posix-like and Windows systems) treated as ./quote Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division -- Paulex Yang China Software Development Lab IBM
Re: Harmony tools and utilities
Stepan Mishura wrote: Hi all, Are we interesting in providing a competitive set of tools and utilities for Harmony implementation? Of course. (for tools list see: http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html ) Are we going to provide the same set, subset or superset? Or it is too early to discuss tools list? Same or super. I can't see why we'd subset if people use them. As we agreed we need javadoc. And this is priority number one. What about others? What about javah, appletviewer or keytool? Y, Y, Y. I'd suggest creating a prioritized list of tools and utilities that we need and place it on Harmony project's site, for example, in 'subcomponents' or 'road map/TODO' section. A tool's priority will define its demand for Harmony For example, Tool name Status Priority javadoc missing high javah missing medium keytool missing medium policytool missing low klist missingN/A Go for it! Thanks, Stepan Mishura Intel Middleware Products Division
Re: local test server (Was: Re: [jira] Commented: (HARMONY-71) java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
Richard Liang wrote: Dears, Agree that server (maybe not local) is required for some sophisticated test cases. To make thing simply, we may provide more detail guide (step-by-step) on how to setup/configure a typical testing server. Or shall we setup a test server and allow user to share our testing server? I think that instructions for local setup is best. Or better, an ant script :) Richard Liang China Software Development Lab, IBM Tim Ellison wrote: Stepan Mishura wrote: I glanced through a local server code from HARMONY-57 contribution without looking into implementation details and ... this made me think. I catch hold of the following: 1) The server contains some testing code that looks not good for me Care to explain? 2) It is not as simple as I expected - my impression was that a local server implementation should be very simple because we are not going to test whether it corresponds to http spec. or not. IMHO, it should only provide a test case with: - a port number to open communication - access to a server's input/output streams to verify a request to a server or to form a server's response. Naive? Well, I'm aware that I'm not so experienced in java.net development and testing and may be I'm wrong. The local server I referenced can be used for a number of the java.net tests, some of which do require more sophisticated behavior, like basic authentication, eTags, etc. I agree that the tests in HARMONY-71 only need something to accept their connection, but I was simply pointing out that there will be a local server we can use if that contribution is accepted into the project, so probably not worth writing another. I'd like to start with the first issue (BTW, is it ok to discuss details of contribution implementation if it is not accepted yet?). Sure -- I would expect people to be evaluating it thoroughly so that they can vote the code in/out. The PPMC will shout early if the paperwork implies a contribution is unacceptable. Can we avoid adding a code that is specific for some test case to a local server? Does it interfere with what you want to do? In some cases, the test case needs to know what is on the server a priori, so that it can test the client behavior correctly. Regards, Tim On 2/16/06, Tim Ellison wrote: I would rather that you just opened a new JIRA issue for that as it doesn't relate to the original problem. FYI there is a local server incoming in the HARMONY-57 contribution, so don't spend any time on it, see: HARMONY-57\Harmony\Harmony_Tests\src\test\java\tests\support\Support_HttpServer.java Regards, Tim Stepan Mishura (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-71?page=comments#action_12366637] Stepan Mishura commented on HARMONY-71: --- Tim, Added test case (test_setUseCachesZ) depends on network and it fails if it can not create connection with apache.org. The same for HARMONY-72. I'm going to attach a patch file with a local server in it. Could you reopen this JIRA? Thanks, Stepan. java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError -- Key: HARMONY-71 URL: http://issues.apache.org/jira/browse/HARMONY-71 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison According to j2se 1.4.2 specification method java.net.URLConnection.setUseCaches(boolean) throws IllegalStateException, if already connected. Harmony throws java.lang.IllegalAccessError instead, that contradicts the specification. Code to reproduce: import java.io.IOException; import java.net.*; public class test2 { public static void main(String[] args) { HttpURLConnection u=null; try { u=(HttpURLConnection)(new URL(http://intel.com ).openConnection()); u.connect(); } catch (MalformedURLException e) { System.out.println(unexpected MalformedURLException+e); } catch (IOException f) { System.out.println(unexpected IOException+f); } try { u.setUseCaches(true); } catch (IllegalStateException e) { System.out.println(OK. Expected IllegalStateException); e.printStackTrace(); }; } } Steps to Reproduce: 1. Build Harmony (check-out on 2006-01-30) j2se subset as described in README.txt. 2. Compile test2.java using BEA 1.4 javac javac -d . test2.java 3. Run java using compatible VM (J9) java -showversion test2 Output: C:\tmpC:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test2 java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) BEA
Re: Bug-to-bug compatibility - first issue
I'd suggest splitting the issue into two different ones: The first one is interpreting the command line. I completely agree that we should do it similar to RI. The second one is as Vladimir said that behavior is caused by something in URLClassloader or kernel classes. Vladimir, if you could provide a piece of java code that shows difference in the behavoir of RI and Harmony in those classes, so we could discuss how to implement the classes the best. Thanks, Mikhail On 2/22/06, Paulex Yang [EMAIL PROTECTED] wrote: I agree with you that it is natural to copy RI behavior in this case, and I even don't think this is a bug, in the same reason with one of the bugs' evaluation [1], quoteAn empty path component is always (in both Unix/Posix-like and Windows systems) treated as ./quote Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division -- Paulex Yang China Software Development Lab IBM
Re: Bug-to-bug compatibility - first issue
I think this would be IBM's problem. Alexey Petrenko wrote: IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
There's an interesting issue - we probably need to find out under what license the source found in sun bug reports is available under :) geir Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division
Re: java.lang.String.replaceFirst from IBM VM throws NPE
Oliver Deakin wrote: Hi Alexey, ok, Ive recreated your problem using the latest snapshot and VME. Essentially the code at modules/kernel/src/main/java/java/lang/String.java is the same as that in the VME kernel.jar. Looking in there (these calls can also be seen if the test is run within a debugger), we see that the replaceFirst(String, String) implementation is: public String replaceFirst(String expr, String substitute) { return Pattern.compile(expr).matcher(this).replaceFirst(substitute); } Unfortunately the implementation of Pattern at modules/regex/src/main/java/java/util/regex/Pattern.java is only a stub (as HARMONY-39 has not yet been accepted into the Harmony SVN repository) and as such just returns null. Thus when we try to dereference the return from Pattern.compile(expr) we receive a NullPointerException. Once the regex in HARMONY-39 is moved into SVN this should go away. As a sideline, I think we should be able to move String.java out of kernel entirely anyway. We already have an implementation at modules/kernel/src/main/java/java/lang/String.java, and the only VM specific code in String is the intern() method. This method could simply be redirected to call VM.intern(String), a class which is within kernel, and then String.java can be moved into LUNI. It also means that the VM writer(s) need not implement the rest of the String class unnecessarily. Sound good? Why wasn't it that way to start? geir Alexey Petrenko wrote: We got problem with Harmony on IBM VM on Windows. java.lang.String.replaceFirst throws NPE. Here is the testcase: public class Test { public static void main(String args[]) { String xx = test; xx = xx.replaceFirst(t,z); } } Here is the stack trace: C:\Work\Harmony\Sources\Harmony\deploy\jre\binjava Test Exception in thread main java.lang.NullPointerException at java.lang.String.replaceFirst(String.java:1642) at Test.main(Test.java:4) Since IBM VM is not an OpenSource I can not check java.lang.String for the cause of this problem :( Can we ask IBM guys somehow to fix this issue? -- Alexey A. Petrenko Intel Middleware Products Division
Re: local test server (Was: Re: [jira] Commented: (HARMONY-71) java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError)
On 2/21/06, Tim Ellison [EMAIL PROTECTED] wrote: Stepan Mishura wrote: I glanced through a local server code from HARMONY-57 contribution without looking into implementation details and ... this made me think. I catch hold of the following: 1) The server contains some testing code that looks not good for me Care to explain? Support_HttpServer.java has the following code: class ServerThread implements Runnable { public void run() { // call the test function based on the requested resource if (resourceName.equals(CHUNKEDTEST)) chunkedTest(); ... lot of 'else if' ... ... } private void chunkedTest() { ... construct server's respond and send it ... } I'd prefer to avoid this and to have a server implementation that provides a way for unit test to check received request and to configure a server's respond. 2) It is not as simple as I expected - my impression was that a local server implementation should be very simple because we are not going to test whether it corresponds to http spec. or not. IMHO, it should only provide a test case with: - a port number to open communication - access to a server's input/output streams to verify a request to a server or to form a server's response. Naive? Well, I'm aware that I'm not so experienced in java.netdevelopment and testing and may be I'm wrong. The local server I referenced can be used for a number of the java.net tests, some of which do require more sophisticated behavior, like basic authentication, eTags, etc. I agree that the tests in HARMONY-71 only need something to accept their connection, but I was simply pointing out that there will be a local server we can use if that contribution is accepted into the project, so probably not worth writing another. I'd like to start with the first issue (BTW, is it ok to discuss details of contribution implementation if it is not accepted yet?). Sure -- I would expect people to be evaluating it thoroughly so that they can vote the code in/out. The PPMC will shout early if the paperwork implies a contribution is unacceptable. Can we avoid adding a code that is specific for some test case to a local server? Does it interfere with what you want to do? Sure, we have javax.security.auth.kerberos.KerberosTicket class that currently contains a stub. I was thinking about implementing the stub and how to test it. So I played a little bit with developing Kerberos stub server. When I saw that tests for URLConnection class failed because they need local stub server then I got interested how to solve this similar issue. Thanks, Stepan. In some cases, the test case needs to know what is on the server a priori, so that it can test the client behavior correctly. Regards, Tim On 2/16/06, Tim Ellison wrote: I would rather that you just opened a new JIRA issue for that as it doesn't relate to the original problem. FYI there is a local server incoming in the HARMONY-57 contribution, so don't spend any time on it, see: HARMONY-57\Harmony\Harmony_Tests\src\test\java\tests\support\Support_HttpServer.java Regards, Tim Stepan Mishura (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-71?page=comments#action_12366637 ] Stepan Mishura commented on HARMONY-71: --- Tim, Added test case (test_setUseCachesZ) depends on network and it fails if it can not create connection with apache.org. The same for HARMONY-72. I'm going to attach a patch file with a local server in it. Could you reopen this JIRA? Thanks, Stepan. java.net.URLConnection.setUseCaches throws unspecified IllegalAccessError -- Key: HARMONY-71 URL: http://issues.apache.org/jira/browse/HARMONY-71 Project: Harmony Type: Bug Components: Classlib Reporter: Svetlana Samoilenko Assignee: Tim Ellison According to j2se 1.4.2 specification method java.net.URLConnection.setUseCaches(boolean) throws IllegalStateException, if already connected. Harmony throws java.lang.IllegalAccessErrorinstead, that contradicts the specification. Code to reproduce: import java.io.IOException; import java.net.*; public class test2 { public static void main(String[] args) { HttpURLConnection u=null; try { u=(HttpURLConnection)(new URL(http://intel.com ).openConnection()); u.connect(); } catch (MalformedURLException e) { System.out.println(unexpected MalformedURLException+e); } catch (IOException f) { System.out.println(unexpected IOException+f); } try { u.setUseCaches(true); } catch (IllegalStateException e) {
[jira] Created: (HARMONY-115) set appropriate svn:ignore properties
set appropriate svn:ignore properties - Key: HARMONY-115 URL: http://issues.apache.org/jira/browse/HARMONY-115 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Priority: Trivial We should set svn:ignore properties to ignore generated files so that svn status output is less verbose. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-115) set appropriate svn:ignore properties
[ http://issues.apache.org/jira/browse/HARMONY-115?page=all ] Mark Hindess updated HARMONY-115: - Attachment: svn.ig.tar.gz Sadly patch doesn't support setting svn properties. The attached tar.gz contains svn.ignore files and trivial script to apply them to the appropriate directories (and remove the svn.ignore files). Best not to run it if you have other important files called svn.ignore in your Harmony tree. set appropriate svn:ignore properties - Key: HARMONY-115 URL: http://issues.apache.org/jira/browse/HARMONY-115 Project: Harmony Type: Improvement Components: Classlib Reporter: Mark Hindess Priority: Trivial Attachments: svn.ig.tar.gz We should set svn:ignore properties to ignore generated files so that svn status output is less verbose. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: classlib ant clean is incomplete
On 21/02/06, Tim Ellison [EMAIL PROTECTED] wrote: Mark Hindess wrote: However, I think it's actually a good idea to do more to distinguish the files that come from the two zip files anyway - for instance so that people don't edit them and have changes clobbered by the next make. So I had a go at unzip'ing them to zlib/dist and fdlibm/dist respectively. (This has the added advantage that it is easier to maintain svn:ignore properties for two directory entries than for the dozens of files they contain individually.) I agree -- can you send the ant script / makefile changes via JIRA please? Done. On Linux this was straightforward since GNU make supports VPATH. I'm not really familiar with nmake on Windows but when I tried the same syntax it failed. Does anyone know what options we might have for a similar fix for Windows? One option is moving to GNU make on Windows but that's a relatively big step? How about changing references to foobar.obj to dist/foobar.obj in the windows makefile? I know is is not quite as cool as VPATH, but then we can lay out the files in the same way while we continue the discussion of sharing multi-platform code. Agreed. I'd like to help completing this tidying up and the related exercise of determining appropriate svn:ignore properties (so you don't *have* to do ant clean before using svn stat). I'd like you to help do that too ;-) ;-) Submitted to JIRA. Regards, Mark. -- Mark Hindess [EMAIL PROTECTED] IBM Java Technology Centre, UK.