<?xml version="1.0" encoding="UTF-8"?>











<rss version="2.0" xmlns:jf="http://www.jivesoftware.com/xmlns/jiveforums/rss">



<channel>
    <title>Support Forums: Message List - Nasty Little JDK 1.5 Compiler Bug: final + ternary</title>
    <link>http://www.theserverside.com</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    
        <generator>Jive Forums Silver 5.5.30 (www.jivesoftware.com)</generator>
    
    <pubDate>Tue, 21 May 2013 16:18:54 -0400</pubDate>


    <item>

        <title>works ok on NT 4.0</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[at work, using a NT4.0 sp6 machine, it works ok.<br><br>the javac -version does not exist in my jdk  1.5 version.....]]></description>
        

        <pubDate>Fri, 15 Oct 2004 04:38:54 -0400</pubDate>

        

        <jf:creationDate>Fri, 15 Oct 2004 04:38:54 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 15 Oct 2004 04:38:54 -0400</jf:modificationDate>
        <jf:date>Oct 15, 2004</jf:date>
        <jf:author>Alex Wouda</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Nasty?  I think not</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote>If using non-null initializers, like:&#xA0;&#xA0;&#xA0;&#xA0;static final String name = false ? &quot;Heinz&quot;: &quot;John&quot;;it seems to work Ok.</blockquote>Yip, that is right.  The bug happens when one side is null.  Also, if it is...]]></description>
        

        <pubDate>Fri, 15 Oct 2004 01:58:45 -0400</pubDate>

        

        <jf:creationDate>Fri, 15 Oct 2004 01:58:45 -0400</jf:creationDate>
        <jf:modificationDate>Fri, 15 Oct 2004 01:58:45 -0400</jf:modificationDate>
        <jf:date>Oct 15, 2004</jf:date>
        <jf:author>Heinz Kabutz</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>It's getting more interesting while looking at generated code...</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[If you'll compile it without -g compiler generates just:<br>&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Heinz&quot;);<br>In case of -g flag it is being compiled into:<br>&nbsp;&nbsp;&nbsp;&nbsp;name =...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 22:10:15 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 22:10:15 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 22:10:15 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Vitaliy Stulski</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Nasty?  I think not</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[If using non-null initializers, like:<br>&nbsp;&nbsp;&nbsp;&nbsp;static final String name = false ? &quot;Heinz&quot;: &quot;John&quot;;<br>it seems to work Ok.]]></description>
        

        <pubDate>Thu, 14 Oct 2004 21:26:25 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 21:26:25 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 21:26:25 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Yevgeny Libman</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>Maybe..</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[.. it's an attempt to deprecate those bloody ternary operators that allow people to produce nice concise unreadable code ;)<br><br>Nath]]></description>
        

        <pubDate>Thu, 14 Oct 2004 11:03:30 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 11:03:30 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 11:03:30 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Nathan Lee</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Confirmed With 1.5.0 beta</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[I don't have the final release installed, but I have confirmed that the bug does exist in the beta.<blockquote>public class CompilerBugTest {<br>	public static void main (String [] args) {<br>		final String foo = (false ? &quot;a&quot; :...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 10:58:49 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 10:58:49 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 10:58:49 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Michael Kolb</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Guarding Against Null</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote><blockquote><blockquote>final String name = false ? &quot;Heinz&quot; : null;</blockquote>So basically it won't compile obfuscated code?  Not exactly &quot;nasty&quot;.Seriously, this is not a great piece of code, I agree it should work and...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 10:42:43 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 10:42:43 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 10:42:43 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Michael Kolb</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Nasty Little JDK 1.5 Compiler Bug: final + ternary</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote><blockquote>Ran it on Win xp JDK 1.5 final release.Indeed, it returns null... weird.</blockquote>Did you also <b>compile</b> it with JDK 1.5 javac?  The bug is in the compiler, not the JVM.</blockquote>Of course I compiled it with the JDK 1.5...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 08:24:57 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 08:24:57 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 08:24:57 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>han theman</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Nasty?  I think not</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[Thanks, it helps to understand the example.<br>This case should not occur a lot and I guess Sun will soon correct this point in the upcomming release.]]></description>
        

        <pubDate>Thu, 14 Oct 2004 06:59:08 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 06:59:08 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 06:59:08 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>bruno chevalier</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>Nasty?  I think not</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote><blockquote>final String name = false ? &quot;Heinz&quot; : null;</blockquote>So basically it won't compile obfuscated code?  Not exactly &quot;nasty&quot;.Seriously, this is not a great piece of code, I agree it should work and that this is...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 05:36:01 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 05:36:01 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 05:36:01 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>peter jodeleit</jf:author>
        <jf:replyCount>6</jf:replyCount>
    </item>


    <item>

        <title>Nasty Little JDK 1.5 Compiler Bug: final + ternary</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote>Ran it on Win xp JDK 1.5 final release.Indeed, it returns null... weird.</blockquote>Did you also <b>compile</b> it with JDK 1.5 javac?  The bug is in the compiler, not the JVM.]]></description>
        

        <pubDate>Thu, 14 Oct 2004 05:18:58 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 05:18:58 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 05:18:58 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Heinz Kabutz</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Nasty Little JDK 1.5 Compiler Bug: final + ternary</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[Ran it on Win xp JDK 1.5 final release.<br><br>Indeed, it returns null... weird.]]></description>
        

        <pubDate>Thu, 14 Oct 2004 04:15:37 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 04:15:37 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 04:15:37 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>han theman</jf:author>
        <jf:replyCount>2</jf:replyCount>
    </item>


    <item>

        <title>Bug not apparent in the Linux VM</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[I compiled and ran this code on the Linux version of the Sun VM (1.5.0-b64) and it works fine (i.e. returns null).<br><br>Maybe it only affects Windows VM's.<br><br>Greg]]></description>
        

        <pubDate>Thu, 14 Oct 2004 04:05:57 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 04:05:57 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 04:05:57 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Greg Hall</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Don't understand</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote><blockquote>final String name = false ? &quot;Heinz&quot; : null;System.out.println(name);When compiled using the JDK 1.5 compiler, it will print out &quot;Heinz</blockquote>I don't understand the interest of this code.Usually you use the...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 03:53:41 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 03:53:41 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 03:53:41 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Jonathan Knight</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Nasty Little JDK 1.5 Compiler Bug: final + ternary</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=29404</link>

        

        
            <description><![CDATA[<blockquote><blockquote>final String name = false ? &quot;Heinz&quot; : null;System.out.println(name);When compiled using the JDK 1.5 compiler, it will print out &quot;Heinz&quot;.</blockquote>Not here. I get null. Are you sure you're using 1.5.0 final...]]></description>
        

        <pubDate>Thu, 14 Oct 2004 03:21:42 -0400</pubDate>

        

        <jf:creationDate>Thu, 14 Oct 2004 03:21:42 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 14 Oct 2004 03:21:42 -0400</jf:modificationDate>
        <jf:date>Oct 14, 2004</jf:date>
        <jf:author>Heinz Kabutz</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>



</channel>
</rss>

