[ 
http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372035 
] 

Paul Golick commented on TUSCANY-137:
-------------------------------------

To enable a 1.4.2 JRE to load the generated code, only four files needed to be 
changed:

impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
  Added private static functions to replace Node.isEqualNode(Node) method (this 
was fairly extensive but easy
    since the isEqualNode documentation specified how to do it).
  Commented out use of Node.isEqualNode(Node) and added use of replacement 
method.
  Changed Document.normalizeDocument() to Document.normalize() twice.
  Commented out use of Document.getXmlVersion().

impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
  Changed StringBuilder to StringBuffer.
  Although this compiles with 1.4, execution by 1.4 JRE fails in 
testByteArrayProperty 
    in the assertEquals method.
  I will investigate this further.

impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
  Changed IllegalArgumentException(e) to 
IllegalArgumentException(e.getMessage()).

impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
  Changed Class.getCanonicalName() to Class.getName().

In addition to the changes I made, I ran "mvn" to check for other test breaks 
and found:
impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
  Although I made no additional changes to this file, all test cases fail 
execution by a 1.4 JRE
    with an UnsupportedClassVersionError while calling defineClass method in 
addclass.
  I will investigate this further as well.


> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
>          Key: TUSCANY-137
>          URL: http://issues.apache.org/jira/browse/TUSCANY-137
>      Project: Tuscany
>         Type: Bug
>   Components: Java SDO Implementation
>     Reporter: Daniel Kulp
>  Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4

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