Skip to content

Commit c0cf28a

Browse files
committed
Fixed missing resource bundle seen in logs
Signed-off-by: David Matějček <[email protected]>
1 parent 6d4d702 commit c0cf28a

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

appserver/load-balancer/gf-load-balancer-connector/src/main/java/org/glassfish/loadbalancer/config/LbConfig.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Contributors to the Eclipse Foundation
2+
* Copyright (c) 2023, 2025 Contributors to the Eclipse Foundation
33
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
44
*
55
* This program and the accompanying materials are made available under the
@@ -36,7 +36,6 @@
3636
import java.util.Date;
3737
import java.util.List;
3838
import java.util.Properties;
39-
import java.util.logging.Level;
4039
import java.util.logging.Logger;
4140

4241
import org.glassfish.api.Param;
@@ -59,6 +58,7 @@
5958
import org.jvnet.hk2.config.types.Property;
6059
import org.jvnet.hk2.config.types.PropertyBag;
6160

61+
import static java.util.logging.Level.SEVERE;
6262
import static org.glassfish.config.support.Constants.NAME_REGEX;
6363

6464
/**
@@ -297,14 +297,8 @@ private boolean setInternalProperty(String propertyName) {
297297
transaction.commit();
298298
} catch (Exception ex) {
299299
transaction.rollback();
300-
Logger logger = LogDomains.getLogger(LbConfig.class, LogDomains.ADMIN_LOGGER);
301-
LocalStringManagerImpl localStrings = new LocalStringManagerImpl(LbConfig.class);
302-
String msg = localStrings.getLocalString(
303-
"UnableToSetPropertyInLbconfig",
304-
"Unable to set property {0} in lbconfig with name {1}",
305-
propertyName, getName());
306-
logger.log(Level.SEVERE, msg);
307-
logger.log(Level.FINE, "Exception when trying to set property " + propertyName + " in lbconfig " + getName(), ex);
300+
Logger logger = LogDomains.getLogger(LbConfig.class, LogDomains.ADMIN_LOGGER, false);
301+
logger.log(SEVERE, "Unable to set property " + propertyName + " in lbconfig with name " + getName(), ex);
308302
return false;
309303
}
310304
return true;

appserver/load-balancer/gf-load-balancer-connector/src/main/java/org/glassfish/loadbalancer/config/LocalStrings.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1515
#
1616

17-
UnableToSetPropertyInLbconfig=Unable to set property {0} in lbconfig with name {1}
1817
LbConfigIsInUse=LB configuration [{0}] is in use by another load balancer.
1918
DeleteLbConfigFailed=Unable to remove lb config {0}.
2019
RequiredTargetOrConfig=CLI251: Either option --target or operand config_name is required for this command.

0 commit comments

Comments
 (0)