Skip to content

Commit

Permalink
Fix sonarlint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Teeuwen committed Oct 13, 2023
1 parent 8a30f7a commit c8338db
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ public final class MockExperienceFragmentAdapterFactory implements AdapterFactor
public @Nullable <AdapterType> AdapterType getAdapter(@NotNull Object object, @NotNull Class<AdapterType> type) {
if (object instanceof Page) {
Page page = (Page)object;
if (page.getContentResource().isResourceType(ExperienceFragmentsConstants.RT_EXPERIENCE_FRAGMENT_MASTER)) {
if (type == ExperienceFragment.class) {
if (page.getContentResource().isResourceType(ExperienceFragmentsConstants.RT_EXPERIENCE_FRAGMENT_MASTER) && (type == ExperienceFragment.class)) {
return (AdapterType)new MockExperienceFragment(page);
}

}
if (page.getContentResource().isResourceType(ExperienceFragmentsConstants.RT_EXPERIENCE_FRAGMENT_PAGE)) {
if (type == ExperienceFragmentVariation.class) {
if (page.getContentResource().isResourceType(ExperienceFragmentsConstants.RT_EXPERIENCE_FRAGMENT_PAGE) && (type == ExperienceFragmentVariation.class)) {
return (AdapterType)new MockExperienceFragmentVariation(page);
}

}
}
return null;
Expand Down

0 comments on commit c8338db

Please sign in to comment.