private boolean isProfileActive ( String profile ) { validateProfile ( profile ) ; Set < String > currentActiveProfiles = doGetActiveProfiles ( ) ; return ( currentActiveProfiles . contains ( profile ) || ( currentActiveProfiles . isEmpty ( ) && doGetDefaultProfiles ( ) . contains ( profile ) ) ) ; }
Returns whether the given profile is active or if active profiles are empty whether the profile should be active by default .