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

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

Thanks to Jeremy, I have a patch that works on Java 1.4 and have attached a 
revised version of sdo.patch.

In addition to the changes in spec.patch and sdo.patch, these files needed to 
be changed
so that a Java 1.4 JRE could load and run the code (I tested with IBM's 142 
JVM):

impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
  Added private static methods to replace Node.isEqualNode(Node) method.
  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.

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\BytecodeInterfaceGenerator.java
  Changed from V1_5 to V1_4 in visitType method.

impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
  Added private static canonicalize method based on javadoc of Class.getName() 
and
  execution comparison with Class.getCanonicalName().
  Changed property.getType().getInstanceClass().getCanonicalName() to 
  canonicalize(property.getType().getInstanceClass().getName()).

Incidentally, I also discovered the reason I had problems applying sdo.patch:  
apparently "svn diff" preserves whatever line ending characters it finds in the 
patch file it generates.  The version of the "patch" command that I have (from 
cygwin) strips any CR characters it finds in a patch when the patched file 
lacks them but it refuses to add a CR character to match a line when the patch 
file lacks CR but the patched file has a CR and refuses to apply the patch at 
that location.

> 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, sdo_revised.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