Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9140

Re: Why can't I downcast in the following code

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Why can't I downcast in the following code
Date Sun, 23 Oct 2011 23:22:19 -0700 (PDT)
Organization http://groups.google.com
Lines 10
Message-ID <15065329.1019.1319437339685.JavaMail.geo-discussion-forums@yqgd7> (permalink)
References <2196c265-94c4-4fcb-beb5-ddf3a7135da8@l10g2000pra.googlegroups.com> <crg9a7tqoi1daf8ct9itqde4inunovv9rb@4ax.com> <sPCdnVV3XNY6WznTnZ2dnUVZ_tudnZ2d@posted.palinacquisition>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 72.14.225.65
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1319437342 22820 127.0.0.1 (24 Oct 2011 06:22:22 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Mon, 24 Oct 2011 06:22:22 +0000 (UTC)
In-Reply-To <sPCdnVV3XNY6WznTnZ2dnUVZ_tudnZ2d@posted.palinacquisition>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=72.14.225.65; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9140

Show key headers only | View raw


Peter Duniho wrote:
> He's getting a runtime error, not a compile-time error.

"Some casts can be proven incorrect at compile time; such casts result in a compile-time error."
JLS 5.5

I'd have to bestir myself to confirm this, but I think the OP's situation is in this category.

-- 
Lew

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why can't I downcast in the following code Chad <cdalten@gmail.com> - 2011-10-23 18:22 -0700
  Re: Why can't I downcast in the following code Chad <cdalten@gmail.com> - 2011-10-23 18:47 -0700
    Re: Why can't I downcast in the following code Travers Naran <tnaran@gmail.com> - 2011-10-24 07:57 -0700
  Re: Why can't I downcast in the following code Roedy Green <see_website@mindprod.com.invalid> - 2011-10-23 18:50 -0700
    Re: Why can't I downcast in the following code Chad <cdalten@gmail.com> - 2011-10-23 18:57 -0700
    Re: Why can't I downcast in the following code Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-10-23 19:00 -0700
      Re: Why can't I downcast in the following code Lew <lewbloch@gmail.com> - 2011-10-23 23:22 -0700
        Re: Why can't I downcast in the following code Lew <lewbloch@gmail.com> - 2011-10-23 23:27 -0700
  Re: Why can't I downcast in the following code Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-10-23 19:03 -0700
  Re: Why can't I downcast in the following code Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-23 23:16 -0400
    Re: Why can't I downcast in the following code Donkey Hottie <donkey@fredriksson.dy.fi> - 2011-10-24 07:19 +0300
      Re: Why can't I downcast in the following code Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 16:03 -0500
  Re: Why can't I downcast in the following code Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-10-24 00:08 -0500
  Re: Why can't I downcast in the following code Lew <lewbloch@gmail.com> - 2011-10-23 23:17 -0700
    Re: Why can't I downcast in the following code Lew <lewbloch@gmail.com> - 2011-10-23 23:19 -0700

csiph-web