mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix small compilation issue encountered when building with maven
This commit is contained in:
parent
f826971fea
commit
490e87a617
@ -30,7 +30,7 @@ import java.util.Map;
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
import org.apache.axis.encoding.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.log4j.xml.DOMConfigurator;
|
import org.apache.log4j.xml.DOMConfigurator;
|
||||||
|
|
||||||
import com.cloud.consoleproxy.util.Logger;
|
import com.cloud.consoleproxy.util.Logger;
|
||||||
@ -77,7 +77,7 @@ public class ConsoleProxy {
|
|||||||
|
|
||||||
byte[] randomBytes = new byte[16];
|
byte[] randomBytes = new byte[16];
|
||||||
random.nextBytes(randomBytes);
|
random.nextBytes(randomBytes);
|
||||||
return Base64.encode(randomBytes);
|
return Base64.encodeBase64String(randomBytes);
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
s_logger.error("Unexpected exception ", e);
|
s_logger.error("Unexpected exception ", e);
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|||||||
@ -255,7 +255,7 @@ public class NiciraNvpApi {
|
|||||||
|
|
||||||
T result;
|
T result;
|
||||||
try {
|
try {
|
||||||
result = gson.fromJson(pm.getResponseBodyAsString(), TypeToken.get(newObject.getClass()).getType());
|
result = (T)gson.fromJson(pm.getResponseBodyAsString(), TypeToken.get(newObject.getClass()).getType());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new NiciraNvpApiException("Failed to decode json response body", e);
|
throw new NiciraNvpApiException("Failed to decode json response body", e);
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ public class NiciraNvpApi {
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
T returnValue;
|
T returnValue;
|
||||||
try {
|
try {
|
||||||
returnValue = gson.fromJson(gm.getResponseBodyAsString(), returnObjectType);
|
returnValue = (T)gson.fromJson(gm.getResponseBodyAsString(), returnObjectType);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
s_logger.error("IOException while retrieving response body",e);
|
s_logger.error("IOException while retrieving response body",e);
|
||||||
throw new NiciraNvpApiException(e);
|
throw new NiciraNvpApiException(e);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user