Skip to content

Commit fbeee49

Browse files
committed
fix build errors after forward-merge
1 parent d81ffd2 commit fbeee49

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

engine/components-api/src/main/java/com/cloud/configuration/ConfigurationManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.Set;
2222

2323
import com.cloud.dc.VlanVO;
24+
import org.apache.cloudstack.framework.config.ConfigKey;
2425
import org.apache.cloudstack.framework.config.impl.ConfigurationSubGroupVO;
2526

2627
import com.cloud.dc.ClusterVO;

engine/userdata/src/main/java/org/apache/cloudstack/userdata/UserDataManagerImpl.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@
2626
import org.apache.cloudstack.framework.config.ConfigKey;
2727
import org.apache.commons.codec.binary.Base64;
2828
import org.apache.commons.lang3.StringUtils;
29-
import org.apache.log4j.Logger;
3029

3130
import com.cloud.exception.InvalidParameterValueException;
3231
import com.cloud.utils.component.ManagerBase;
3332
import com.cloud.utils.exception.CloudRuntimeException;
3433

3534
public class UserDataManagerImpl extends ManagerBase implements UserDataManager {
36-
private static final Logger s_logger = Logger.getLogger(UserDataManagerImpl.class);
3735
private static final int MAX_USER_DATA_LENGTH_BYTES = 2048;
3836
private static final int MAX_HTTP_GET_LENGTH = 2 * MAX_USER_DATA_LENGTH_BYTES; // 4KB
3937
private static final int NUM_OF_2K_BLOCKS = 512;
@@ -89,9 +87,9 @@ public String concatenateUserData(String userdata1, String userdata2, String use
8987

9088
@Override
9189
public String validateUserData(String userData, BaseCmd.HTTPMethod httpmethod) {
92-
s_logger.trace(String.format("Validating base64 encoded user data: [%s].", userData));
90+
logger.trace(String.format("Validating base64 encoded user data: [%s].", userData));
9391
if (StringUtils.isBlank(userData)) {
94-
s_logger.debug("Null/empty base64 encoded user data set");
92+
logger.debug("Null/empty base64 encoded user data set");
9593
return null;
9694
}
9795

@@ -126,17 +124,17 @@ private byte[] validateAndDecodeByHTTPMethod(String userData, int maxHTTPLength,
126124
throw new InvalidParameterValueException("User data is too short.");
127125
}
128126

129-
s_logger.trace(String.format("Decoded user data: [%s].", decodedUserData));
127+
logger.trace(String.format("Decoded user data: [%s].", decodedUserData));
130128
int userDataLength = userData.length();
131129
int decodedUserDataLength = decodedUserData.length;
132-
s_logger.info(String.format("Configured base64 encoded user data size: %d bytes, actual user data size: %d bytes", userDataLength, decodedUserDataLength));
130+
logger.info(String.format("Configured base64 encoded user data size: %d bytes, actual user data size: %d bytes", userDataLength, decodedUserDataLength));
133131

134132
if (userDataLength > maxHTTPLength) {
135-
s_logger.warn(String.format("Base64 encoded user data (size: %d bytes) too long for http %s request (accepted size: %d bytes)", userDataLength, httpMethod.toString(), maxHTTPLength));
133+
logger.warn(String.format("Base64 encoded user data (size: %d bytes) too long for http %s request (accepted size: %d bytes)", userDataLength, httpMethod.toString(), maxHTTPLength));
136134
throw new InvalidParameterValueException(String.format("User data is too long for http %s request", httpMethod.toString()));
137135
}
138136
if (userDataLength > VM_USERDATA_MAX_LENGTH.value()) {
139-
s_logger.warn(String.format("Base64 encoded user data (size: %d bytes) has exceeded configurable max length of %d bytes", userDataLength, VM_USERDATA_MAX_LENGTH.value()));
137+
logger.warn(String.format("Base64 encoded user data (size: %d bytes) has exceeded configurable max length of %d bytes", userDataLength, VM_USERDATA_MAX_LENGTH.value()));
140138
throw new InvalidParameterValueException("User data has exceeded configurable max length: " + VM_USERDATA_MAX_LENGTH.value());
141139
}
142140

plugins/hypervisors/xenserver/src/main/java/org/apache/cloudstack/hypervisor/xenserver/ExtraConfigurationUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void setExtraConfigurationToVm(Connection conn, VM.Record vmr, VM
3939
// cfg is either param=value or map-param:key=value
4040
Pair<String, String> configParam = prepareKeyValuePair(cfg);
4141
if (configParam == null) {
42-
LOG.warn("Invalid extra config passed: " + cfg);
42+
LOGGER.warn("Invalid extra config passed: " + cfg);
4343
continue;
4444
}
4545

0 commit comments

Comments
 (0)