public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "slatfatf at gmx dot de" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug libgcj/58414] New: String.format("%9d",(Long)null) returns null-pointer exception Date: Fri, 13 Sep 2013 15:45:00 -0000 [thread overview] Message-ID: <bug-58414-8172@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58414 Bug ID: 58414 Summary: String.format("%9d",(Long)null) returns null-pointer exception Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj Assignee: unassigned at gcc dot gnu.org Reporter: slatfatf at gmx dot de Created attachment 30817 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30817&action=edit minimal example String.format("%9d",(Long)null) returns null pointer exception but it should return the text " null". GCJ Returns the following: $ gcj --version gcj (Ubuntu/Linaro 4.6.3-1ubuntu2) 4.6.3 $ gcj -c src/BugReport.javajmueller@calculon:~/workspace/gcjTest$ gcj --main=BugReport -o BugReport BugReport.o $ ./BugReport The programm should return: null 10 but unfortunately it crashes: Exception in thread "main" java.lang.NullPointerException at java.util.Formatter.basicIntegralConversion(libgcj.so.12) at java.util.Formatter.decimalConversion(libgcj.so.12) at java.util.Formatter.format(libgcj.so.12) at java.util.Formatter.format(libgcj.so.12) at java.lang.String.format(libgcj.so.12) at java.lang.String.format(libgcj.so.12) at BugReport.main(BugReport) Whereas OpenJDK returns: $ /usr/lib/jvm/java-7-openjdk-amd64/bin/java -version java version "1.7.0_25" OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) $ /usr/lib/jvm/java-7-openjdk-amd64/bin/javac BugReport.java $ /usr/lib/jvm/java-7-openjdk-amd64/bin/java BugReport The programm should return: null 10 but unfortunately it crashes: null 10
reply other threads:[~2013-09-13 15:45 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-58414-8172@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@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).