public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/7766: ZipInputStream.available returns 0 immediately after construction
@ 2002-08-29 17:16 jmr
  0 siblings, 0 replies; 2+ messages in thread
From: jmr @ 2002-08-29 17:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7766
>Category:       libgcj
>Synopsis:       ZipInputStream.available returns 0 immediately after construction
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 29 16:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jesse Rosenstock
>Release:        3.3 20020828 (experimental)
>Organization:
>Environment:
System: Linux churchill 2.4.3-12 #1 Fri Jun 8 15:05:56 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/home/user/jmr/app/gcc --enable-langs=c++,java --enable-shared --enable-threads=posix --with-as=/home/user/jmr/app/binutils/bin/as --with-ld=/home/user/jmr/app/binutils/bin/ld : (reconfigured) 
>Description:
	Immediately after construction of a ZipInputStream, available()
        will return 0.  Sun's javadoc states, "Returns 0 after EOF has
        reached for the current entry data, otherwise always return 1."
        My interpretation is there is no current entry, so EOF hasn't
        been reached on it yet, so return 1.
>How-To-Repeat:
; cat ZISAvailTest.java
import java.net.URL;
import java.util.zip.ZipInputStream;

public class ZISAvailTest {
    public static void main(String[] s) throws Exception {
        URL u = new URL("http://www.xwt.org/dist/xwt-0258.jar");
        System.err.println(new ZipInputStream(u.openStream()).available());
    }
}

; gcj ZISAvailTest.java --main=ZISAvailTest      
; ./a.out
0

Whereas Sun's jdk gives:
; javac ZISAvailTest.java
; java ZISAvailTest
1

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libgcj/7766: ZipInputStream.available returns 0 immediately after construction
@ 2002-09-25 13:10 tromey
  0 siblings, 0 replies; 2+ messages in thread
From: tromey @ 2002-09-25 13:10 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, jmr, nobody, tromey

Synopsis: ZipInputStream.available returns 0 immediately after construction

Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Wed Sep 25 13:10:04 2002
Responsible-Changed-Why:
    I'm handling the administrivia
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Wed Sep 25 13:10:04 2002
State-Changed-Why:
    Thanks, I'm checking in your patch.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7766


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-25 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-29 17:16 libgcj/7766: ZipInputStream.available returns 0 immediately after construction jmr
2002-09-25 13:10 tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).