public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: daveho@cs.umd.edu To: gcc-gnats@gcc.gnu.org Subject: libgcj/7180: possible bug in javax.naming.spi.NamingManager.getPlusPath() Date: Mon, 01 Jul 2002 13:36:00 -0000 [thread overview] Message-ID: <20020701203205.9607.qmail@sources.redhat.com> (raw) >Number: 7180 >Category: libgcj >Synopsis: possible bug in javax.naming.spi.NamingManager.getPlusPath() >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Jul 01 13:36:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: daveho@cs.umd.edu >Release: libjava from CVS, dated June 27, 2002 >Organization: >Environment: Jikes RVM, RedHat Linux 7.2 >Description: The javax.naming.spi.NamingManager.getPlusPath() method will instantiate a StringTokenizer() on a null string if a path element is found in neither the passed-in environment nor the passed-in Context, which will then cause a NullPointerException. However, for the getStateToBind() method (also in NamingManager), it should be legal for the path to be empty. I've attached a small patch which should fix the problem. Note that I'm not using gcj. However, this problem should be easy to reproduce on any VM. >How-To-Repeat: Any call to javax.naming.spi.NamingManager.getStateToBind() where neither the environment nor the Context contains a value associated with Context.STATE_FACTORIES. >Fix: diff -u -r1.1 NamingManager.java --- NamingManager.java 2002/06/27 21:00:14 1.1 +++ NamingManager.java 2002/07/01 20:10:14 @@ -170,7 +170,7 @@ path = path2; else if (path2 != null) path += ":" + path2; - return new StringTokenizer (path, ":"); + return new StringTokenizer (path != null ? path : "", ":"); } public static Object getObjectInstance (Object refInfo, >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-07-01 20:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-01 13:36 daveho [this message] 2002-07-01 19:46 Tom Tromey 2002-07-01 19:47 tromey
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020701203205.9607.qmail@sources.redhat.com \ --to=daveho@cs.umd.edu \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).