I combined my source code with my colleague and I saw that he added an exception that would be thrown into the method declaration; however, I knew that an exception would never really be thrown from this method.
I wonder why the compiler did not warn me about the "declared non-excluded exception" (or something like that). I understand that you can declare a method that throws N exceptions, even if none of these exceptions are thrown by code in the method.
Why is this?
public void foo() throws IOException, IntrospectionException, BadStringOperationException, ... {
java exception
Pedro garcรญa medina
source share