java/1301: Properties not working with load

magnus.persson@thephonepages.com magnus.persson@thephonepages.com
Wed Dec 20 12:24:00 GMT 2000


>Number:         1301
>Category:       java
>Synopsis:       Properties not working with load
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:18:51 PST 2000
>Closed-Date:    Tue Aug 08 10:29:14 PDT 2000
>Last-Modified:  Tue Aug  8 10:30:01 PDT 2000
>Originator:     magnus.persson@thephonepages.com
>Release:        unknown-1.0
>Organization:
>Environment:
linux
>Description:
after creating a java.util.Properties-object, I populate it with some strings. I call the store()-method. this works ok.
when calling the load()-method, the program just prints
"Abort" and the exits.
>How-To-Repeat:
perform the steps above.
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/280


From: Tom Tromey <tromey@cygnus.com>
To: magnus.persson@thephonepages.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: java.util/280: Properties not working with load
Date: Thu, 6 Jul 2000 23:12:31 -0700 (PDT)

 >> after creating a java.util.Properties-object, I populate it with
 >> some strings. I call the store()-method. this works ok.  when
 >> calling the load()-method, the program just prints "Abort" and the
 >> exits.
 
 Do you have a fairly simple test case you could send?
 Or, failing that, a stack trace?
 
 Tom

From: Tom Tromey <tromey@cygnus.com>
To: "Magnus Persson" <magnus.persson@thephonepages.com>
Cc: "Tom Tromey" <tromey@cygnus.com>,
        Java Gnats Server <java-gnats@sourceware.cygnus.com>
Subject: RE: java.util/280: Properties not working with load
Date: Fri, 7 Jul 2000 14:32:42 -0700 (PDT)

 Magnus> here it is:
 
 Thanks.  Please CC java-gnats so this ends up in the PR.
 (That's why I'm quoting the whole program in this reply...)
 
 I looked at this a bit.  It looks like a recently introduced bug in
 libgcc.  If the local Java exception expert doesn't know the problem
 offhand, I'll forward this to the appropriate gcc hackers.
 
 
 Note that your program won't work.  You don't flush or close the
 FileOutputStream before trying to read the input stream.  In essence
 you're relying on a GC between the store and the load -- unadvisable.
 
 Magnus> import java.util.*;
 Magnus> import java.io.*;
 
 Magnus> public class P {
 Magnus>     public static void main(String[] a) {
 Magnus> 	System.out.println("start");
 Magnus> 	Properties p=new Properties();
 Magnus> 	p.put("hej","hejsan");
 Magnus> 	try {
 Magnus> 	    p.store(new FileOutputStream("out"),"test");
 Magnus> 	    p.load(new FileInputStream("out"));
 Magnus> 	} catch(Exception e) {
 Magnus> 	    System.out.println(e);
 Magnus> 	}
 Magnus>     }
 Magnus> }
 
 Tom
Responsible-Changed-From-To: warrenl->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Fri Jul  7 15:09:20 2000
Responsible-Changed-Why:
    I'm tracking this.
    It looks to be a bug in libgcc.
State-Changed-From-To: open->analyzed
State-Changed-By: tromey
State-Changed-When: Fri Jul  7 15:09:20 2000
State-Changed-Why:
    I've looked at it a bit.

From: tromey@cygnus.com
To: java-gnats@sourceware.cygnus.com, magnus.persson@thephonepages.com,
  tromey@cygnus.com, warrenl@cygnus.com
Cc:  
Subject: Re: gcj/280
Date: 7 Jul 2000 22:09:20 -0000

 Synopsis: Properties not working with load
 
 Responsible-Changed-From-To: warrenl->tromey
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Fri Jul  7 15:09:20 2000
 Responsible-Changed-Why:
     I'm tracking this.
     It looks to be a bug in libgcc.
 State-Changed-From-To: open->analyzed
 State-Changed-By: tromey
 State-Changed-When: Fri Jul  7 15:09:20 2000
 State-Changed-Why:
     I've looked at it a bit.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=280&database=java
State-Changed-From-To: analyzed->closed
State-Changed-By: tromey
State-Changed-When: Tue Aug  8 10:29:14 2000
State-Changed-Why:
    I'm closing this.
    The test program works fine for me.
    If you still have a problem, reply and we can reopen the PR.

From: tromey@cygnus.com
To: java-gnats@sourceware.cygnus.com, magnus.persson@thephonepages.com,
  tromey@cygnus.com
Cc:  
Subject: Re: gcj/280
Date: 8 Aug 2000 17:29:14 -0000

 Synopsis: Properties not working with load
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: tromey
 State-Changed-When: Tue Aug  8 10:29:14 2000
 State-Changed-Why:
     I'm closing this.
     The test program works fine for me.
     If you still have a problem, reply and we can reopen the PR.
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=280&database=java
>Unformatted:




More information about the Gcc-prs mailing list