Paul King created GROOVY-8126:
---------------------------------

             Summary: Inadvertent source code incompatibility in Groovy 2.4.7 
release
                 Key: GROOVY-8126
                 URL: https://issues.apache.org/jira/browse/GROOVY-8126
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.7
            Reporter: Paul King
            Assignee: Paul King


I just spotted a changed in 2.4.7 that inadvertently broke source code/contract 
compatibility. After 1 year it seems just as dangerous to revert as to leave. 
So I am creating this Jira to note the change and suggest a workaround. We'll 
change this issue if a better solution is found.

https://github.com/apache/groovy/commit/78b6cc54af85988829ecd6120b69f65e0d9a8ade
{noformat}
src/main/groovy/lang/GroovyCodeSource.java
-    public GroovyCodeSource(URL url) throws IOException {
+    public GroovyCodeSource(URL url) {
{noformat}
Suggested workarounds.
# If you are upgrading and are going to now only use Groovy 2.4.7 and above, 
just delete any catch statements catching IOException.
# If you have code that needs to work with old and new versions of Groovy and 
are checking for the IOException, change it to just Exception and check for 
IOException using instanceof if needed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to