public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* Is InputStreamReader.ready method deprecated ?
@ 2003-03-04 19:49 Patrick Ellis
  2003-03-04 22:22 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Ellis @ 2003-03-04 19:49 UTC (permalink / raw)
  To: mauve-discuss

Question: I have a testcase that is failing across several platforms (UNIX, LINUX, WINDOWS, etc) that according to the comment in the code was deprecated after 1.1 but I can NOT find any documentation or statement from the SUN JavaTM 2 Platform, Standard Edition, v 1.4.1 website or any books that say the code should be deprecated for the
InputStreamReader.ready method . Has the function been deprecated ?

Code:
// Tags: JDK1.1

package gnu.testlet.java.io.InputStreamReader;

import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;

import java.io.*;

public class jdk11 implements Testlet
{
  public void test (TestHarness harness)
  {
    try
      {
                InputStreamReader isr = new InputStreamReader (new StringBufferInputStream ("zardoz has spoken"));
                harness.check(!isr.ready(), "ready()");   // deprecated post-1.1
                harness.check(isr.getEncoding(), "8859_1", "getEncoding");
                char[] cbuf = new char[10];
                isr.read (cbuf, 0, cbuf.length);
                String tst = new String(cbuf);
                harness.check(tst, "zardoz has", "read(buf[], off, len)");
                harness.check(isr.read(), ' ', "read()");
                isr.close ();
                harness.check(true, "close()");
      }
    catch (IOException e)
      {
                harness.check(false, "IOException unexpected");
      }
  }
}

Pat Ellis
SDE Build and Test Team
Phone:      (919) 531-0355   
R2263     Patrick.Ellis@sas.com
SAS...  The Power to Know

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

* Re: Is InputStreamReader.ready method deprecated ?
  2003-03-04 19:49 Is InputStreamReader.ready method deprecated ? Patrick Ellis
@ 2003-03-04 22:22 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2003-03-04 22:22 UTC (permalink / raw)
  To: Patrick Ellis; +Cc: mauve-discuss

Hi,

On Tue, 2003-03-04 at 20:49, Patrick Ellis wrote:
> Question: I have a testcase that is failing across several platforms (UNIX, LINUX, WINDOWS, etc) that according to the comment in the code was deprecated after 1.1 but I can NOT find any documentation or statement from the SUN JavaTM 2 Platform, Standard Edition, v 1.4.1 website or any books that say the code should be deprecated for the
> InputStreamReader.ready method . Has the function been deprecated ?

Not to my knowledge.

The test looks strange I would expect the first test to always fail.
But with gcj it actaully doesn't/ Haven't figured out why yet.

Cheers,

Mark

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

end of thread, other threads:[~2003-03-04 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-04 19:49 Is InputStreamReader.ready method deprecated ? Patrick Ellis
2003-03-04 22:22 ` Mark Wielaard

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).