Changeset 288


Ignore:
Timestamp:
Apr 30, 2011, 1:39:32 AM (14 years ago)
Author:
dmik
Message:

jdk: Fixed: the dtdbuilder tool would write the binary DTD to stdout causing "\n" to "\r\n" expansion on OS/2 (Win32 too?) and thus breaking the resulting file which in turn would completely break support of HTML text in Swing components [vendor bug].

Location:
trunk/openjdk/jdk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/jdk/make/javax/swing/html32dtd/Makefile

    r278 r288  
    3939        @$(prep-target)
    4040        ($(BOOT_JAVA_CMD) -Ddtd_home=$(DTDDATA) \
    41                 -jar $(DTDBUILDER_JARFILE) html32 > $@) || exit 1
     41                -jar $(DTDBUILDER_JARFILE) html32 $@) || exit 1
    4242        @$(java-vm-cleanup)
    4343
  • trunk/openjdk/jdk/make/tools/src/build/tools/dtdbuilder/DTDBuilder.java

    r278 r288  
    3030import java.io.File;
    3131import java.io.FileInputStream;
     32import java.io.FileOutputStream;
    3233import java.io.IOException;
    3334import java.io.FileNotFoundException;
     
    289290        }
    290291
     292        if (argv.length < 2) {
     293            System.err.println("Must specify arguments: <dtd_file> <output_file>");
     294            return;
     295        }
     296
    291297        DTDBuilder dtd = null;
    292298        try {
     
    302308        }
    303309        try {
    304             DataOutputStream str = new DataOutputStream(System.out);
     310            DataOutputStream str = new DataOutputStream(new FileOutputStream(argv[1]));
    305311            dtd.save(str, argv[0]);
    306312            str.close();
    307313        } catch (IOException ex) {
    308             ex.printStackTrace();
     314            System.err.println("Could not save BDTD file "+argv[1]);
     315            e.printStackTrace(System.err);
    309316            System.exit(1);
    310317        }
  • trunk/openjdk/jdk/src/share/classes/javax/swing/text/html/parser/ParserDelegator.java

    r278 r288  
    8282            }
    8383        } catch (Exception e) {
    84             System.out.println(e);
     84            e.printStackTrace();
    8585        }
    8686        return dtd;
Note: See TracChangeset for help on using the changeset viewer.