[ 
http://issues.apache.org/jira/browse/HARMONY-103?page=comments#action_12367113 
] 

Nathan Beyer commented on HARMONY-103:
--------------------------------------

Well, I've figured the compile issue I was having. The StringBuilder API 
assumes Java 5 covariance capabilities, which is how it uplifts the methods in 
Appendable to be StringBuilder. I logged a bug with the Eclipse JDT and it was 
a bug in the Java 5 compiler that allowed covariance to be used when Java 1.4 
bytecode was requested. Here's the bug report, which has already been fixed: 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=128560.

As such, if we need to continue using a Java 1.4 compliant compiler, then we'll 
either need to remove the "implements Appendable" or change the return types to 
"Appendable". Since the end goal would be to get to the proper method 
signature, I would propose just removing the "implements Appendable" until we 
can move to a Java 5 compiler.

> java.lang.StringBuilder Implementation for LUNI
> -----------------------------------------------
>
>          Key: HARMONY-103
>          URL: http://issues.apache.org/jira/browse/HARMONY-103
>      Project: Harmony
>         Type: New Feature
>   Components: Classlib
>     Reporter: Nathan Beyer
>  Attachments: StringBuilder.java, StringBuilderTest.java
>
> This bug is for submitting an implementation of the java.lang.StringBuilder 
> to the LUNI module of classlib. The implementation and class definition is 
> based on the specification at 
> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html.
> The implementation is not complete, there are a few method that are either 
> incomplete or not implemented. All of these are related to the Unicode Code 
> Point support, as defined by Java 5. As for the rest of the implementation, 
> there are probably a number of optimization points, but the focus was to 
> complete the functionality and make it compatible with various Java 5 
> runtimes.
> Additionally, I had a problem with compiling this class in Eclipse 3.1.2. 
> When I set the compiler to Java 1.4 compliance level, the methods which 
> implement the Appendable interface cause compilation errors. When I set the 
> compiler to Java 5.0 compliance with Java 1.4 .class file compatability and 
> Java 1.4 source compatibility, the class compiled fine. I'm not sure if this 
> is quirk of the JDT compiler or what, but I'm going to do some investigation 
> and testing to see if I can isolate it.

-- 
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

Reply via email to