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

View File

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

View File

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