- my webspace

- my webspace

Latest Comment

Allama Iqbal - Selective verse...
Yahoouj
Really good work about this website was done. Keep trying mo...
07/03/10 21:04 More...
By Roderick

Allama Iqbal - Selective verse...
Great Job
You have dont a great job of collecting these... Even I had ...
25/08/09 07:01 More...
By Sikandar

O ye who don't believe !
It's like Lehman Brothers :grin
11/10/08 16:31 More...
By anurag Chaturvedi

I Protest
@Sikku
Thanks Sikku for the feedback. I never intend to blame, a...
29/07/08 17:06 More...
By Aminur Rashid

I Protest
Great !!!
:zzz this is a wonderful story and very honest from the hea...
29/07/08 10:33 More...
By Jennifer Gallagher

Login






Lost Password?
No account yet? Register

Tell a Friend

Home arrow Java arrow Java hangs converting 2-2250738585072012e-308
Java hangs converting 2-2250738585072012e-308 PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Aminur Rashid   
Saturday, 12 February 2011
As explained @exploringbinary.com, try following code
 public class DoubleBug {
      private static void hangRunTime()
      {
          System.out.println("Test:");
          double d = Double.parseDouble("2.2250738585072012e-308");
          System.out.println("Value: " + d);
      }
      public static void hangCompiler()
      {
          //double d = 2.2250738585072012e-308;
          //System.out.println("Value: " + d);
      }
      public static void main(String args[])
      {
         hangRunTime();
      }
}
to get your runtime hanged. Oracle has already released a patch for this and quite interestingly the fix for this was just one keyword addition. Get your jre patched. BTW, this is a PHP bug as well. So in the meantime, you can try bringing down your own website, by sending the String (assuming the server does a double conversion)



StumbleUponDigg This!Bookmark on Delicious

Add as favourites (61) | Quote this article on your site | Views: 605 | E-mail

Be first to comment this article
RSS comments

Only registered users can write comments.
Please login or register.

Last Updated ( Saturday, 12 February 2011 )
 
< Prev   Next >
Aminur Rashid