larryi 02/03/21 20:12:01 Modified: util/java/org/apache/tomcat/util IntrospectionUtils.java util/java/org/apache/tomcat/util/buf DateTool.java util/java/org/apache/tomcat/util/log LogHandler.java Added: util/java/org/apache/tomcat/util/buf/res LocalStrings_ja.properties Log: Port missing changes from jakarta-tomcat. res/StringManager.java is the only remaining file that still needs updates. Revision Changes Path 1.2 +28 -7 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java Index: IntrospectionUtils.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IntrospectionUtils.java 26 Jan 2002 07:29:03 -0000 1.1 +++ IntrospectionUtils.java 22 Mar 2002 04:12:01 -0000 1.2 @@ -189,7 +189,10 @@ home=new File("./").getCanonicalPath(); } File f=new File( home ); - File f1=new File ( f, ".."); + String parentDir = f.getParent(); + if(parentDir == null) + parentDir = home; // unix style + File f1=new File ( parentDir ); install = f1.getCanonicalPath(); if( installSysProp != null ) System.getProperties().put( installSysProp, install ); @@ -204,7 +207,10 @@ if( new File( fname ).exists()) { try { File f=new File( path ); - File f1=new File ( f, ".."); + String parentDir = f.getParent(); + if( parentDir == null ) + parentDir = path; // unix style + File f1=new File ( parentDir ); install = f1.getCanonicalPath(); if( installSysProp != null ) System.getProperties().put( installSysProp, @@ -475,9 +481,24 @@ public static void addToolsJar( Vector v ) { try { - v.addElement( new URL( "file", "" , - System.getProperty( "java.home" ) + - "/../lib/tools.jar")); + // Add tools.jar in any case + File f=new File( System.getProperty( "java.home" ) + + "/../lib/tools.jar"); + + if( ! f.exists() ) { + // On some systems java.home gets set to the root of jdk. + // That's a bug, but we can work around and be nice. + f=new File( System.getProperty( "java.home" ) + + "/lib/tools.jar"); + if( f.exists() ) { + System.out.println("Detected strange java.home value " + + System.getProperty( "java.home" ) + + ", it should point to jre"); + } + } + URL url=new URL( "file", "" , f.getAbsolutePath() ); + + v.addElement( url ); } catch ( MalformedURLException ex ) { ex.printStackTrace(); } @@ -571,11 +592,11 @@ { Vector jarsV = new Vector(); if( dir!=null ) { - addToClassPath( jarsV, dir ); - // Add dir/classes, if it exists + // Add dir/classes first, if it exists URL url=getURL( dir, "classes"); if( url!=null ) jarsV.addElement(url); + addToClassPath( jarsV, dir ); } if( cpath != null ) 1.5 +2 -2 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/DateTool.java Index: DateTool.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/DateTool.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DateTool.java 31 Dec 2001 18:20:04 -0000 1.4 +++ DateTool.java 22 Mar 2002 04:12:01 -0000 1.5 @@ -142,7 +142,7 @@ /** */ public static String format1123( Date d ) { - long dt = d.getTime() % 1000; + long dt = d.getTime() / 1000; if ((rfc1123DS != null) && (dt == rfc1123Sec)) return rfc1123DS; rfc1123DS = rfc1123Format.format( d ); @@ -151,7 +151,7 @@ } public static String format1123( Date d,DateFormat df ) { - long dt = d.getTime() % 1000; + long dt = d.getTime() / 1000; if ((rfc1123DS != null) && (dt == rfc1123Sec)) return rfc1123DS; rfc1123DS = df.format( d ); 1.1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties Index: LocalStrings_ja.properties =================================================================== hexUtil.bad=\u7121\u52b9\u306a16\u9032\u6570\u5024\u3067\u3059 hexUtil.odd=\u5947\u6570\u6841\u306e16\u9032\u6570\u5024\u3067\u3059 httpDate.pe=\u7121\u52b9\u306a\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059: {0} 1.2 +1 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/log/LogHandler.java Index: LogHandler.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/log/LogHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LogHandler.java 6 Jan 2002 08:34:56 -0000 1.1 +++ LogHandler.java 22 Mar 2002 04:12:01 -0000 1.2 @@ -150,7 +150,7 @@ // -------------------- Default sink protected static PrintWriter defaultSink = - new PrintWriter( new OutputStreamWriter(System.err)); + new PrintWriter( new OutputStreamWriter(System.err), true); /** * Set the default output stream that is used by all logging
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>