Author: rfscholte
Date: Fri Aug 22 09:20:43 2014
New Revision: 1619714

URL: http://svn.apache.org/r1619714
Log:
revert r1619571, seems to be vendor specific

Modified:
    
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/exec/DefaultCheckstyleExecutor.java

Modified: 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/exec/DefaultCheckstyleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/exec/DefaultCheckstyleExecutor.java?rev=1619714&r1=1619713&r2=1619714&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/exec/DefaultCheckstyleExecutor.java
 (original)
+++ 
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/exec/DefaultCheckstyleExecutor.java
 Fri Aug 22 09:20:43 2014
@@ -257,14 +257,17 @@ public class DefaultCheckstyleExecutor
 
         checker.destroy();
 
-        try
-        {
-            projectClassLoader.close();
-        }
-        catch ( IOException ex )
+        if ( projectClassLoader instanceof Closeable )
         {
-            // Nothing we can do - and not detrimental to the build (save 
running out of file handles).
-            getLogger().info( "Failed to close custom Classloader - this 
indicated a bug in the code.", ex );
+            try
+            {
+                ( ( Closeable ) projectClassLoader ).close();
+            }
+            catch ( IOException ex ) 
+            {
+                // Nothing we can do - and not detrimental to the build (save 
running out of file handles).
+                getLogger().info( "Failed to close custom Classloader - this 
indicated a bug in the code.", ex );
+            }
         }
 
         if ( request.getStringOutputStream() != null )


Reply via email to