davsclaus commented on code in PR #26678:
URL: https://github.com/apache/camel/pull/26678#discussion_r4064319990


##########
components/camel-groovy/src/main/java/org/apache/camel/language/groovy/DefaultGroovyScriptCompiler.java:
##########
@@ -303,9 +309,12 @@ private Set<String> doPreloadClasses(Map<String, byte[]> 
classes) {
             try {
                 Class<?> clazz = groovyPreCompiledClassLoader.findClass(name);
                 classLoader.addClass(clazz.getName(), clazz);
+                postCompile(clazz, entry.getValue());
                 answer.add(name);
             } catch (ClassNotFoundException e) {
                 LOG.debug("Error loading pre-compiled class: {}. This 
exception is ignored.", name, e);
+            } catch (Exception e) {
+                throw RuntimeCamelException.wrapRuntimeException(e);

Review Comment:
   Done: the loop in `doPreloadClasses` is now in a `try/finally` so 
`groovyPreCompiledClassLoader` is closed when a post-processor fails on a 
pre-compiled class too. (It was bounded already, as `doStop()` closes the same 
loader, but the close now sits on the error path itself.)
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to