File tree Expand file tree Collapse file tree
JavaSCR9/src/main/java/err06j Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//The MIT License (MIT)
22//
3- //Copyright (c) 2016 Robert C. Seacord
3+ //Copyright (c) 2020 Robert C. Seacord
44//
55//Permission is hereby granted, free of charge, to any person obtaining a copy
66//of this software and associated documentation files (the "Software"), to deal
2020//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121//SOFTWARE.
2222
23- package ERR06J ;
23+ package err06j ;
2424
2525import java .awt .AWTException ;
2626import java .io .IOException ;
2727
2828class Parser <T extends Exception > {
2929 @ SuppressWarnings ("unchecked" )
30- public void parse (String s ) throws T { // OK
31- throw (T ) new AWTException ("oopsie" ); //$NON-NLS-1$
30+ public void parse (String s ) throws T {
31+ throw (T ) new AWTException (s );
3232 }
3333
3434 public static void main (String [] args ) {
35- String s = "my new string" ; //$NON-NLS-1$
35+ String s = "my new string" ;
3636 Parser <IOException > p = new Parser <>();
3737 try {
3838 p .parse (s );
You can’t perform that action at this time.
0 commit comments