At work we had a recent release to our shared pom.xml and users started to report issues. Below is one of those bug reports.
Hi David! After switching to the new pom.xml, I am receiving the error below.
So what I did is start to look through the code and look at the changes to the new pom.xml file.
The error above is just saying that whatever we have in the try block does not have the potential to throw a InterruptedException. This means something must have changed in the try block that is causing this issue since the user reported it used to work.
Main.java
The issue is that the Helper.printMessage() method does not throw any Exceptions. Since main is trying to catch an Exception that will never get thrown, the compiler throws an error.
Helper.java
Now what I ended up finding out was that the Helper class used to throw the “InterruptedException” but it lo longer. This is going to require anyone who was calling the printMessage method remove any exception handling.