Suppose I have caller Class named let's say A in a jar file a.jar that calls a method let say B.b() in a separate jar file b.jar.
Until there everything is ok.
Now B package developers are adding a checked Exception to B.b() which becomes something like B.b() throws Exception and redeploy the b.jar file. The a.jar file is kept intact, untouched so the A package developers do not notice the compile error requiring to catch the exception immediately.
What will happen at runtime ? More precisely how the JVM deals with that. From my experience, but surprisingly it works smoothly in the case where no exceptions are actually thrown at runtime. So it looks that the method resolution is performed even if signature does not match at the exception level. On the other hand, if B.b() actually throws an exception I have no idea of what will happen. Is this behaviour specified somewhere in the JVM or Java language specification or it is up to the JVM implementor or maybe even configurable with some JVM flags options ?
Thanks for your clarifications