Get the text of the Groovy script at the given location. If the location is a file path and it does not exist as given, then GroovyMain#huntForTheScriptFile(String) is called to try with some Groovy extensions appended. This method is not used to process scripts and is retained for backward
(String uriOrFilename)
| 477 | * @deprecated |
| 478 | */ |
| 479 | @Deprecated |
| 480 | public String getText(String uriOrFilename) throws IOException { |
| 481 | if (URI_PATTERN.matcher(uriOrFilename).matches()) { |
| 482 | try { |
| 483 | return ResourceGroovyMethods.getText(new URL(uriOrFilename)); |
| 484 | } catch (Exception e) { |
| 485 | throw new GroovyRuntimeException("Unable to get script from URL: ", e); |
| 486 | } |
| 487 | } |
| 488 | return ResourceGroovyMethods.getText(huntForTheScriptFile(uriOrFilename)); |
| 489 | } |
| 490 | |
| 491 | /** |
| 492 | * Get a new GroovyCodeSource for a script which may be given as a location |
nothing calls this directly
no test coverage detected