This looks dangerous to me. The output of 
```java
System.out.println(Double.valueOf(""));
```
is
```java
Exception in thread "main" java.lang.NumberFormatException: empty String
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1011)
	at java.lang.Double.valueOf(Double.java:504)
	at Main.main(Main.java:8)
```