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

aspectran / aspectran / #4668
44%

Build:
DEFAULT BRANCH: master
Ran 18 Oct 2025 02:27PM UTC
Jobs 1
Files 989
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Oct 2025 02:19PM UTC coverage: 36.323% (+0.02%) from 36.307%
#4668

push

github

topframe
Fix(bean): Unify and correct @Profile handling for all bean definitions

Previously, @Profile annotations on bean classes were not processed correctly, leading to beans being instantiated even when their profile was not active.

This was caused by two issues:
1. For @Component-scanned beans, the parser identified the profile mismatch but failed to remove the invalid bean rule from the registry.
2. For XML-defined beans, class-level @Profile annotations were ignored entirely.

This commit introduces a unified filtering mechanism in 'BeanRuleRegistry.postProcess()'. Before the annotation parsing stage, it now inspects all registered bean rules from all sources (XML, component scan) and removes any that do not match the active environment profiles.

This ensures that @Profile works consistently and reliably, regardless of how a bean is defined. The implementation has been optimized to avoid redundant checks and refactored for clarity.

25 of 43 new or added lines in 1 file covered. (58.14%)

4 existing lines in 2 files now uncovered.

15059 of 41459 relevant lines covered (36.32%)

0.36 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
18
68.94
-1.58% core/src/main/java/com/aspectran/core/component/bean/BeanRuleRegistry.java

Uncovered Existing Lines

Lines Coverage ∆ File
2
57.47
-1.15% daemon/src/main/java/com/aspectran/daemon/command/CommandExecutor.java
2
40.75
-0.63% utils/src/main/java/com/aspectran/utils/ConcurrentReferenceHashMap.java
Jobs
ID Job ID Ran Files Coverage
1 #4668.1 18 Oct 2025 02:27PM UTC 989
36.32
Source Files on build #4668
  • Tree
  • List 989
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9bc708ea on github
  • Prev Build on master
  • Next Build on master
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