Fix some warnings

This commit is contained in:
Travis Burtrum 2018-05-10 23:57:15 -04:00
parent 2650b60f47
commit 564df7b022
3 changed files with 11 additions and 2 deletions

View File

@ -253,6 +253,9 @@
<exclude>**/module-info.java</exclude>
<exclude>**/PrestoPersonDAO.java</exclude>
</excludes>
<compilerArgs>
<compilerArg>-Xlint:unchecked</compilerArg>
</compilerArgs>
</configuration>
<executions>
@ -305,6 +308,9 @@
<excludes>
<exclude>**/module-info.java</exclude>
</excludes>
<compilerArgs>
<compilerArg>-Xlint:unchecked</compilerArg>
</compilerArgs>
</configuration>
<executions>

View File

@ -216,11 +216,13 @@ public class QueryMapperQmDao implements QmDao {
}
@Override
@SuppressWarnings("unchecked")
public List<Map<String, String>> getAllNames() throws SQLException {
return qm.toListMap(allNames, Map.class, String.class);
}
@Override
@SuppressWarnings("unchecked")
public Map<String, String>[] getAllNamesArray() throws SQLException {
return qm.toArrayMap(allNames, Map.class, String.class);
}

View File

@ -64,8 +64,9 @@ public class CleaningQueryMapperTest {
{
final Cleaner<FieldPerson> personCleaner = new Cleaner<FieldPerson>() {
@Override
public FieldPerson clean(final FieldPerson dto) {
return dto.cleanThyself();
@SuppressWarnings("unchecked")
public <E extends FieldPerson> E clean(final E dto) {
return (E) dto.cleanThyself();
}
};
return Arrays.asList(new Object[][] {