mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Resolve unsafe cast warnings reported by lint checker Add some debug config to compiler plugin
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
parent
53e42fb45e
commit
540b163cfc
@ -49,6 +49,21 @@
|
|||||||
<directory>${basedir}/src/test/resources</directory>
|
<directory>${basedir}/src/test/resources</directory>
|
||||||
</testResource>
|
</testResource>
|
||||||
</testResources>
|
</testResources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.3</version>
|
||||||
|
<configuration>
|
||||||
|
<useIncrementalCompilation>true</useIncrementalCompilation>
|
||||||
|
<forceJavacCompilerUse>true</forceJavacCompilerUse>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-verbose</arg>
|
||||||
|
<arg>-Xlint:all,-options,-path</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import com.cloud.hypervisor.ovm3.objects.XmlTestResultTest;
|
|||||||
public class Ovm3ConfigurationTest {
|
public class Ovm3ConfigurationTest {
|
||||||
XmlTestResultTest results = new XmlTestResultTest();
|
XmlTestResultTest results = new XmlTestResultTest();
|
||||||
private Ovm3Configuration ovm3config;
|
private Ovm3Configuration ovm3config;
|
||||||
private static Map<String, Object> params;
|
private static HashMap<String, Object> params;
|
||||||
static {
|
static {
|
||||||
params = new HashMap<String, Object>();
|
params = new HashMap<String, Object>();
|
||||||
params.put("agentusername", "oracle");
|
params.put("agentusername", "oracle");
|
||||||
@ -55,7 +55,7 @@ public class Ovm3ConfigurationTest {
|
|||||||
params.put("max.template.iso.size", "50");
|
params.put("max.template.iso.size", "50");
|
||||||
params.put("host", "ovm-1");
|
params.put("host", "ovm-1");
|
||||||
params.put("com.cloud.network.Networks.RouterPrivateIpStrategy",
|
params.put("com.cloud.network.Networks.RouterPrivateIpStrategy",
|
||||||
"DcGlobal");
|
"DcGlobal");
|
||||||
params.put("agentport", "8899");
|
params.put("agentport", "8899");
|
||||||
params.put("Host.OS.Kernel.Version", "2.6.39-300.22.2.el5uek");
|
params.put("Host.OS.Kernel.Version", "2.6.39-300.22.2.el5uek");
|
||||||
params.put("migratewait", "3600");
|
params.put("migratewait", "3600");
|
||||||
@ -83,13 +83,13 @@ public class Ovm3ConfigurationTest {
|
|||||||
|
|
||||||
@Test(expected = ConfigurationException.class)
|
@Test(expected = ConfigurationException.class)
|
||||||
public void testFailedParams() throws ConfigurationException {
|
public void testFailedParams() throws ConfigurationException {
|
||||||
Map<String, Object> par = new HashMap(params);
|
HashMap<String, Object> par = new HashMap<String,Object>(params);
|
||||||
par.put("pod", null);
|
par.put("pod", null);
|
||||||
ovm3config = new Ovm3Configuration(par);
|
ovm3config = new Ovm3Configuration(par);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testValidatePool() throws ConfigurationException {
|
public void testValidatePool() throws ConfigurationException {
|
||||||
Map<String, Object> par = new HashMap(params);
|
HashMap<String, Object> par = new HashMap<String,Object>(params);
|
||||||
par.put("cluster", "1");
|
par.put("cluster", "1");
|
||||||
par.put("ovm3vip", "this is not an IP!");
|
par.put("ovm3vip", "this is not an IP!");
|
||||||
ovm3config = new Ovm3Configuration(par);
|
ovm3config = new Ovm3Configuration(par);
|
||||||
@ -99,7 +99,7 @@ public class Ovm3ConfigurationTest {
|
|||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testAgentPort() throws ConfigurationException {
|
public void testAgentPort() throws ConfigurationException {
|
||||||
Map<String, Object> par = new HashMap(params);
|
HashMap<String, Object> par = new HashMap<String,Object>(params);
|
||||||
String altPort="6333";
|
String altPort="6333";
|
||||||
par.put("agentport", altPort);
|
par.put("agentport", altPort);
|
||||||
ovm3config = new Ovm3Configuration(par);
|
ovm3config = new Ovm3Configuration(par);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user