bkkothari2255 commented on code in PR #85:
URL:
https://github.com/apache/sling-org-apache-sling-models-impl/pull/85#discussion_r2995659845
##########
src/main/java/org/apache/sling/models/impl/ModelPackageBundleListener.java:
##########
@@ -200,6 +200,13 @@ private void analyzeClass(Bundle bundle, String className,
List<ServiceRegistrat
bundle.getSymbolicName(),
e.getLocalizedMessage(),
e);
+ } catch (LinkageError e) {
+ log.error(
Review Comment:
@subiron The updated code handles it well, warn for `NoClassDefFoundError`
is the right signal for a missing optional dep. If other LinkageError subtypes
ever need different handling, a separate catch block can be added later without
touching this.
Only thing still pending is the test - a second healthy model asserting it
still registers after the error would prove the fix end to end. Apologies, I
should have caught this earlier in the review
--
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]