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>
|
||||
</testResource>
|
||||
</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>
|
||||
<profiles>
|
||||
<profile>
|
||||
|
||||
@ -29,7 +29,7 @@ import com.cloud.hypervisor.ovm3.objects.XmlTestResultTest;
|
||||
public class Ovm3ConfigurationTest {
|
||||
XmlTestResultTest results = new XmlTestResultTest();
|
||||
private Ovm3Configuration ovm3config;
|
||||
private static Map<String, Object> params;
|
||||
private static HashMap<String, Object> params;
|
||||
static {
|
||||
params = new HashMap<String, Object>();
|
||||
params.put("agentusername", "oracle");
|
||||
@ -55,7 +55,7 @@ public class Ovm3ConfigurationTest {
|
||||
params.put("max.template.iso.size", "50");
|
||||
params.put("host", "ovm-1");
|
||||
params.put("com.cloud.network.Networks.RouterPrivateIpStrategy",
|
||||
"DcGlobal");
|
||||
"DcGlobal");
|
||||
params.put("agentport", "8899");
|
||||
params.put("Host.OS.Kernel.Version", "2.6.39-300.22.2.el5uek");
|
||||
params.put("migratewait", "3600");
|
||||
@ -83,13 +83,13 @@ public class Ovm3ConfigurationTest {
|
||||
|
||||
@Test(expected = ConfigurationException.class)
|
||||
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);
|
||||
ovm3config = new Ovm3Configuration(par);
|
||||
}
|
||||
@Test
|
||||
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("ovm3vip", "this is not an IP!");
|
||||
ovm3config = new Ovm3Configuration(par);
|
||||
@ -99,7 +99,7 @@ public class Ovm3ConfigurationTest {
|
||||
}
|
||||
@Test
|
||||
public void testAgentPort() throws ConfigurationException {
|
||||
Map<String, Object> par = new HashMap(params);
|
||||
HashMap<String, Object> par = new HashMap<String,Object>(params);
|
||||
String altPort="6333";
|
||||
par.put("agentport", altPort);
|
||||
ovm3config = new Ovm3Configuration(par);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user