True dat



  • Oh true logic state, how many ways can a library represent thou, let me count the ways:

         if (((Boolean)paramObject).booleanValue() == true)
          {
            if (paramInt2 == 1)
              return new Character('t');
            if (paramInt2 == 2)
              return new String("true");
            if (paramInt2 == 4)
              return new Integer(1);
            if (paramInt2 == 5)
              return new Long(1L);
            if (paramInt2 == 6)
              return new Float(1.0F);
            if (paramInt2 != 7)
              break;
            return new Double(1.0D);
          }

    ( jd-gui decompiled code, so the original code could have been much more interesting).



  • @RichP said:

    Oh true logic state, how many ways can a library represent thou thee, let me count the ways:

    FTFY.



  • Yes I can be an Olde English Grammar Nazi

    FTFY



  • @zelmak said:

    FTFY

    FÞFÞ

    FÞFÞ



  • @zelmak said:

    Yes I can be an Olde English Grammar Nazi

    FTFY

     

    EEEEE

    The old english folken never called their language "old english"! They called it... English! Or maybe something else I don't know. "Olde English" is an anachronism!

     



  • @mott555 said:

    @RichP said:

    Oh true logic state, how many ways can a library represent thou thee, let me count the ways:

    FTF[b]T[/b].

     

     

    FTFTFT

    (Fixed That Fixed That For Thee)

     

     



  • @dhromed said:

    @zelmak said:

    Yes I can be an Olde English Grammar Nazi

    FTFY

     

    EEEEE

    The old english folken never called their language "old english"! They called it... English! Or maybe something else I don't know. "Olde English" is an anachronism!

     

    Isn't that technically Early Modern English though?



  • @RichP said:

    FTFTFT

    (Fixed That Fixed That For TheeThou)

     

     


    FTFTFTFT



  • @RichP said:

    Oh true logic state, how many ways can a library represent thou, let me count the ways:

         if (((Boolean)paramObject).booleanValue() == true)
          {
            if (paramInt2 == 1)
              return new Character('t');
            if (paramInt2 == 2)
              return new String("true");
            if (paramInt2 == 4)
              return new Integer(1);
            if (paramInt2 == 5)
              return new Long(1L);
            if (paramInt2 == 6)
              return new Float(1.0F);
            if (paramInt2 != 7)
              break;
            return new Double(1.0D);
          }

    ( jd-gui decompiled code, so the original code could have been much more interesting).

    I'm not saying that the source isn't fucked up; but, I don't really think it's ever fair to post decompiled code as a wtf



  • @this_code_sucks said:

    I'm not saying that the source isn't fucked up; but, I don't really think it's ever fair to post decompiled code as a wtf
    I think in this case it is a worthy exception.



  • @MiffTheFox said:

    Isn't that technically Early Modern English though?
     

    ding!



  •  So wait, instead of taking an unpredictable input value and attempting to determine whether it is considered "true," this does the reverse?



  • @dhromed said:

    @zelmak said:

    Yes I can be an Olde English Grammar Nazi

    FTFY

     

    EEEEE

    The old english folken never called their language "old english"! They called it... English! Or maybe something else I don't know. "Olde English" is an anachronism!

     

    "Ænglisc".

    You know, in case it ever comes up again.

    If you want to hear what it sounded like, check out the movie "Beowulf", the one that was shot in motion capture.  Most of the characters speak in "Ye Olde Fashionéd Englishe" but Grendel (Crispin Glover) speaks genuine Old English, as does his mother (Angelina Jolie) whenever she's talking to him.

     



  • @ShatteredArm said:

     So wait, instead of taking an unpredictable input value and attempting to determine whether it is considered "true," this does the reverse?

     

    Bingo. For completeness, there's also a section that does the same for "false". I haven't found a "FILE_NOT_FOUND" case yet... it could be in there. I found the code in a huge class that does unspeakable type  ̶p̶e̶r̶v̶e̶r̶s̶i̶o̶n̶s̶  conversions.

     



  • @RichP said:

    @ShatteredArm said:

     So wait, instead of taking an unpredictable input value and attempting to determine whether it is considered "true," this does the reverse?

     

    Bingo. For completeness, there's also a section that does the same for "false". I haven't found a "FILE_NOT_FOUND" case yet... it could be in there. I found the code in a huge class that does unspeakable type  ̶p̶e̶r̶v̶e̶r̶s̶i̶o̶n̶s̶  conversions.

     

    Let me guess: The methods all have parameters of type Object and then somewhere within the method they say "oh crap we used the wrong type, let's switch it" and they convert to whatever they actually wanted on the fly.

    That's so useful because Java doesn't have overloaded methods and-- oh wait.


Log in to reply