Skip to content

Commit

Permalink
Merge pull request #1794 from millmanorama/fix_compiler_warning
Browse files Browse the repository at this point in the history
suppress compiler warning
  • Loading branch information
rcordovano committed Jan 8, 2016
2 parents fb5f26c + 25aebba commit 800553c
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,15 @@ public <A extends Comparable<A>> List<A> findValuesForAttribute(DrawableAttribut
try (Statement stmt = con.createStatement();
ResultSet valsResults = stmt.executeQuery(query.toString())) {
while (valsResults.next()) {
vals.add((A) valsResults.getObject(groupBy.attrName.toString()));
/*
* I don't like that we have to do this cast here, but
* can't think of a better alternative at the momment
* unless something has gone seriously wrong, we know
* this should be of type A even if JAVA doesn't
*/
@SuppressWarnings("unchecked")
A value = (A) valsResults.getObject(groupBy.attrName.toString());
vals.add(value);
}
} catch (SQLException ex) {
LOGGER.log(Level.WARNING, "Unable to get values for attribute", ex);
Expand Down Expand Up @@ -1209,8 +1217,7 @@ private void initializeImageList() {
* @param f check if this file is a video. will return false for null file.
*
* @return returns true if this file is a video as determined by {@link ImageGalleryModule#isVideoFile(org.sleuthkit.datamodel.AbstractFile)
* } but caches the result.
* returns false if passed a null AbstractFile
* } but caches the result. returns false if passed a null AbstractFile
*/
public boolean isVideoFile(AbstractFile f) {
return isNull(f) ? false
Expand Down

0 comments on commit 800553c

Please sign in to comment.