Issue 25085 - JDK1.3: filter/source/xsltfilter/XSLTransformer.java
Summary: JDK1.3: filter/source/xsltfilter/XSLTransformer.java
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 1.1.1a
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 1.1.1
Assignee: fa
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-04 22:19 UTC by pavel
Modified: 2004-03-14 21:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2004-02-04 22:19:45 UTC
Hi,

while compiling fix3 with JDK 1.3.1:

javac -classpath
".:../../unxlngi4.pro/class:/usr/lib/java/jre/lib/rt.jar:.:/home/pavel/BuildDir/ooo_1.1.1_src/solver/645/unxlngi4.pro/bin/sandbox.jar:/home/pavel/BuildDir/ooo_1.1.1_src/solver/645/unxlngi4.pro/bin/ridl.jar:/home/pavel/BuildDir/ooo_1.1.1_src/solver/645/unxlngi4.pro/bin/unoil.jar:/home/pavel/BuildDir/ooo_1.1.1_src/solver/645/unxlngi4.pro/bin/jurt.jar:/home/pavel/BuildDir/ooo_1.1.1_src/solver/645/unxlngi4.pro/bin/juh.jar"
-d ../../unxlngi4.pro/class    XSLTFilter.java  XSLTransformer.java
XSLTransformer.java:142: cannot resolve symbol
symbol  : constructor FileOutputStream  (java.io.File,boolean)
location: class java.io.FileOutputStream
                statsp = new PrintStream(new FileOutputStream(statsfile, false));
                                         ^
1 error
dmake:  Error code 1, while making '../../unxlngi4.pro/misc/XSLTFilter_dummy.java'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making
/home/pavel/BuildDir/ooo_1.1.1_src/filter/source/xsltfilter

According to http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileOutputStream.html

public FileOutputStream(File file,
                        boolean append)
...
Since:
    1.4

Thus this broke the JDK 1.3 backward compatibility. Please fix this.
Comment 1 pavel 2004-02-04 22:22:08 UTC
Kevin, JFYI (because of JDK 1.3 incomatibility).
Comment 2 khendricks 2004-02-05 14:30:32 UTC
Hi Pavel,

Thanks for adding me to this one.

Here is the workaround patch I am using to continue the build.  

There is a String,boolean constructor in jdk 1.3.1 as there should be in jdk 1.4.X so this should work as 
well for everyone.   

We can simply use statsfile.getFD() and in the default constructor it will set boolean values as false 
anyway (according to the source)

Of course another solution is just to remove the false in the current implementation since the source 
shows it defaults to false.


--- XSLTransformer.java.~1.1.6.1.~      2004-01-09 12:20:47.000000000 -0500
+++ XSLTransformer.java 2004-02-05 09:09:02.000000000 -0500
@@ -139,7 +139,7 @@
         if ((statsfilepath = System.getProperty(STATSPROP)) != null) {
             try {
                 File statsfile = new File(statsfilepath);
-                statsp = new PrintStream(new FileOutputStream(statsfile, false));
+                statsp = new PrintStream(new FileOutputStream(statsfile.getPath(), false));
             } catch (java.lang.Exception e)
             {


Kevin
Comment 3 pavel 2004-02-05 20:13:43 UTC
This fixed the problem, commited to cws_srx645_ooo111fix3.

Kevin: Thanks!

Dan: please verify.
Comment 4 pavel 2004-02-06 18:14:17 UTC
This is fixed, please reopen when it is not OK.
Comment 5 Martin Hollmichel 2004-02-27 13:16:29 UTC
close issue
Comment 6 pavel 2004-03-14 20:48:30 UTC
I just fixed the same problem in cws_src680_ooo20040329.

Comment 7 khendricks 2004-03-14 21:06:30 UTC
Hi pavel, 
 
Thanks for fixing that.  I am just starting my 0329 build and will CVS update to get the fix you 
committed. 
 
Thanks, 
 
Kevin