File tree Expand file tree Collapse file tree
java/ql/test/query-tests/NumberFormatException Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import java .io .*;
22
33public class Test {
4- public static void main (String [] args ) {
4+ public static void main (String [] args ) {
55 test1 ();
66 test2 ();
77 test3 ();
@@ -49,7 +49,7 @@ static void test1() {
4949 Double .valueOf ("2.7818281828" );
5050 new Double ("2.7818281828" );
5151 new Double (2.7818281828 ); // don't flag: wrong constructor
52- }
52+ }
5353
5454 static void test2 () {
5555 // Don't flag any of these. The exception is caught.
@@ -93,7 +93,7 @@ static void test2() {
9393 catch (NumberFormatException e ) {
9494 // parse error
9595 }
96- }
96+ }
9797
9898 static void test3 () throws NumberFormatException {
9999 // Don't flag any of these: the exception is explcitly declared
@@ -132,5 +132,5 @@ static void test3() throws NumberFormatException {
132132 Double .parseDouble ("2.7818281828" );
133133 Double .valueOf ("2.7818281828" );
134134 new Double ("2.7818281828" );
135- }
135+ }
136136}
You can’t perform that action at this time.
0 commit comments