Skip to content

Commit

Permalink
Removing surplus elements
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Oct 24, 2023
1 parent d6a33da commit 1550cc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,4 @@ public class HealthCheckConfigKeys {
*/
public static final String PORTAL_HEALTHCHECK_HTTPCODEDOWN = PORTAL_HEALTHCHECK_BASE + "httpCodeDown";

/**
* Context parameter within configuration-subsystem with the name
* 'portal.healthcheck.customOutput'
* <p>
* Used to define the responded JSON format. If <code>true</code>, the output
* conforms to the ICW style, which is based on Dropwizard. If
* <code>false</code>, the JAVA MicroProfile style is used.
* </p>
*/
public static final String PORTAL_HEALTHCHECK_CUSTOMOUTPUT = PORTAL_HEALTHCHECK_BASE + "customOutput";
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ public class ResourceBundleWrapperImpl implements ResourceBundleWrapper {

private static final long serialVersionUID = 9136037316650210138L;

private static final CuiLogger log = new CuiLogger(ResourceBundleWrapper.class);
private static final CuiLogger LOGGER = new CuiLogger(ResourceBundleWrapper.class);

@Inject
private ResourceBundleRegistry resourceBundleRegistry;
ResourceBundleRegistry resourceBundleRegistry;

private transient List<ResourceBundle> resolvedBundles;

@Inject
private Provider<CuiProjectStage> projectStage;
Provider<CuiProjectStage> projectStage;

@Inject
@PortalLocale
private Provider<Locale> localeProvider;
Provider<Locale> localeProvider;

private final List<String> keyList = new CopyOnWriteArrayList<>();

Expand All @@ -97,7 +97,7 @@ public String getString(final String key) {
throw new MissingResourceException(errMsg, "ResourceBundleWrapperImpl", key);
}

log.warn(errMsg);
LOGGER.warn(errMsg);
return "??" + key + "??";

}
Expand All @@ -117,7 +117,12 @@ private List<ResourceBundle> getResolvedBundles() {
if (null == resolvedBundles) {
var builder = new CollectionBuilder<ResourceBundle>();
for (final String path : resourceBundleRegistry.getResolvedPaths()) {
builder.add(ResourceBundle.getBundle(path, localeProvider.get()));
try {
builder.add(ResourceBundle.getBundle(path, localeProvider.get()));
LOGGER.debug("Successfully loaded Resource-Bundle '%s'");
} catch (MissingResourceException e) {
LOGGER.warn("Unable to load Resource-Bundle '%s'".formatted(path), e);
}
}
resolvedBundles = builder.toImmutableList();
}
Expand Down

0 comments on commit 1550cc5

Please sign in to comment.