Skip to content

Commit

Permalink
SONARJAVA-4658 JavaSonarWayProfile has unsatisfied dependency "Profil…
Browse files Browse the repository at this point in the history
…eRegistrar" (#4489)
  • Loading branch information
alban-auzeill authored Oct 17, 2023
1 parent 390c976 commit 23de723
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public class JavaSonarWayProfile implements BuiltInQualityProfilesDefinition {

private final ProfileRegistrar[] profileRegistrars;

/**
* Constructor used by Pico container (SC) when no ProfileRegistrar are available
*/
public JavaSonarWayProfile() {
this(null);
}

public JavaSonarWayProfile(@Nullable ProfileRegistrar[] profileRegistrars) {
this.profileRegistrars = profileRegistrars;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void should_create_sonar_way_profile() {

@Test
void should_activate_hotspots_when_supported() {
JavaSonarWayProfile profileDef = new JavaSonarWayProfile(null);
JavaSonarWayProfile profileDef = new JavaSonarWayProfile();
BuiltInQualityProfilesDefinition.Context context = new BuiltInQualityProfilesDefinition.Context();
profileDef.define(context);
BuiltInQualityProfilesDefinition.BuiltInQualityProfile profile = context.profile("java", "Sonar way");
Expand Down

0 comments on commit 23de723

Please sign in to comment.