You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2023/07/14 11:31:40 UTC

[groovy] branch GROOVY_4_0_X updated: make javadoc url search more robust

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
     new 1e50b32212 make javadoc url search more robust
1e50b32212 is described below

commit 1e50b322121c5c818addf09c11526b65a5ce91ad
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Jul 14 21:31:29 2023 +1000

    make javadoc url search more robust
---
 .../main/groovy/org/apache/groovy/groovysh/commands/DocCommand.groovy | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/DocCommand.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/DocCommand.groovy
index ba148b192b..ae119bd933 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/DocCommand.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/commands/DocCommand.groovy
@@ -201,7 +201,9 @@ class DocCommand extends CommandSupport {
             }
         }
 
-        if (ioe) fail "Sending a HEAD request to $url failed (${ioe}). Please check your network settings."
+        io.out.println "Sending a HEAD request to $url failed (${ioe}). Please check your network settings."
+        // allow timeout to fail since this will happen if we check e.g. for an early access URL for a release JDK version
+        if (ioe !instanceof SocketTimeoutException) fail "Unable to get URLs for documentation."
 
         return false
     }