Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.2386.2.77 diff -u -3 -p -u -r1.2386.2.77 ChangeLog --- ChangeLog 2 Feb 2005 01:56:00 -0000 1.2386.2.77 +++ ChangeLog 3 Feb 2005 00:52:02 -0000 @@ -1,3 +1,19 @@ +2005-02-02 Mark Wielaard + + * gnu/java/net/protocol/jar/Connection.java (is_trying): Removed + field. + (get): Don't use or set is_trying. + +2005-02-02 Sven de Marothy + + * java/util/Calendar.java + (set) Invalidate all fields on first call to set(). + +2005-02-02 Mark Wielaard + + * vm/reference/java/lang/VMClassLoader.java: Remove SystemClassLoader + import statement. + 2005-02-02 Andrew John Hughes * java/text/SimpleDateFormat.java Index: gnu/java/net/protocol/jar/Connection.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/jar/Connection.java,v retrieving revision 1.4 diff -u -3 -p -u -r1.4 Connection.java --- gnu/java/net/protocol/jar/Connection.java 4 Jan 2004 21:10:42 -0000 1.4 +++ gnu/java/net/protocol/jar/Connection.java 3 Feb 2005 00:52:03 -0000 @@ -1,5 +1,5 @@ /* Connection - jar url connection for java.net - Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,7 +68,6 @@ public final class Connection extends Ja { private static Hashtable cache = new Hashtable(); private static final int READBUFSIZE = 4*1024; - private static boolean is_trying = false; public static synchronized JarFile get (URL url) throws IOException { @@ -77,45 +76,33 @@ public final class Connection extends Ja if (jf != null) return jf; - if (is_trying) - return null; - - try - { - is_trying = true; - - if ("file".equals (url.getProtocol())) - { - File f = new File (url.getFile()); - jf = new JarFile (f, true, ZipFile.OPEN_READ); - } - else - { - URLConnection urlconn = url.openConnection(); - InputStream is = urlconn.getInputStream(); - byte[] buf = new byte [READBUFSIZE]; - File f = File.createTempFile ("cache", "jar"); - FileOutputStream fos = new FileOutputStream (f); - int len = 0; - - while ((len = is.read (buf)) != -1) - { - fos.write (buf, 0, len); - } - - fos.close(); - // Always verify the Manifest, open read only and delete when done. - // XXX ZipFile.OPEN_DELETE not yet implemented. - // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); - jf = new JarFile (f, true, ZipFile.OPEN_READ); - } + if ("file".equals (url.getProtocol())) + { + File f = new File (url.getFile()); + jf = new JarFile (f, true, ZipFile.OPEN_READ); + } + else + { + URLConnection urlconn = url.openConnection(); + InputStream is = urlconn.getInputStream(); + byte[] buf = new byte [READBUFSIZE]; + File f = File.createTempFile ("cache", "jar"); + FileOutputStream fos = new FileOutputStream (f); + int len = 0; + + while ((len = is.read (buf)) != -1) + { + fos.write (buf, 0, len); + } + + fos.close(); + // Always verify the Manifest, open read only and delete when done. + // XXX ZipFile.OPEN_DELETE not yet implemented. + // jf = new JarFile (f, true, ZipFile.OPEN_READ | ZipFile.OPEN_DELETE); + jf = new JarFile (f, true, ZipFile.OPEN_READ); + } - cache.put (url, jf); - } - finally - { - is_trying = false; - } + cache.put (url, jf); return jf; } Index: java/util/Calendar.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/Calendar.java,v retrieving revision 1.25.2.8 diff -u -3 -p -u -r1.25.2.8 Calendar.java --- java/util/Calendar.java 2 Feb 2005 01:56:01 -0000 1.25.2.8 +++ java/util/Calendar.java 3 Feb 2005 00:52:03 -0000 @@ -677,15 +677,19 @@ public abstract class Calendar */ public void set(int field, int value) { + if (isTimeSet) + for (int i = 0; i < FIELD_COUNT; i++) + isSet[i] = false; isTimeSet = false; fields[field] = value; isSet[field] = true; -// 1 YEAR + MONTH + DAY_OF_MONTH -// 2 YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK -// 3 YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK -// 4 YEAR + DAY_OF_YEAR -// 5 YEAR + DAY_OF_WEEK + WEEK_OF_YEAR + // The five valid date patterns, in order of validity + // 1 YEAR + MONTH + DAY_OF_MONTH + // 2 YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK + // 3 YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK + // 4 YEAR + DAY_OF_YEAR + // 5 YEAR + DAY_OF_WEEK + WEEK_OF_YEAR switch (field) { case MONTH: // pattern 1,2 or 3 Index: vm/reference/java/lang/VMClassLoader.java =================================================================== RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMClassLoader.java,v retrieving revision 1.16.2.4 diff -u -3 -p -u -r1.16.2.4 VMClassLoader.java --- vm/reference/java/lang/VMClassLoader.java 2 Feb 2005 01:56:01 -0000 1.16.2.4 +++ vm/reference/java/lang/VMClassLoader.java 3 Feb 2005 00:52:04 -0000 @@ -1,6 +1,6 @@ /* VMClassLoader.java -- Reference implementation of native interface required by ClassLoader - Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation + Copyright (C) 1998, 2001, 2002, 2004, 2005 Free Software Foundation This file is part of GNU Classpath.