• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aspectran / aspectran / #4728

29 Oct 2025 12:56PM UTC coverage: 37.66% (-0.02%) from 37.683%
#4728

push

github

topframe
Refactor AspectRegistry for performance and thread-safety

This commit refactors core components of the aspect registry for improved performance, thread-safety, and clarity.

The RelevantAspectRuleHolder is now an immutable object to ensure it can be safely shared and cached in a concurrent environment. This change adheres to the project's convention of using null for empty collections to minimize object allocation and GC pressure.

Key improvements in AdviceRuleRegistry:
 - Fixed a major O(n^2) performance issue in find...Index methods by using a for-each loop for LinkedList iteration.
 - Corrected the use of ArrayList to LinkedList for addFirst operations to ensure O(1) complexity.
 - Improved code clarity with a switch statement and better variable naming.

25 of 55 new or added lines in 6 files covered. (45.45%)

1 existing line in 1 file now uncovered.

15602 of 41429 relevant lines covered (37.66%)

0.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/core/src/main/java/com/aspectran/core/component/aspect/AdviceRuleRegistry.java


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc