Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/diff/DiffRangeMap.java @ 682:f568330dd9c0
Compile with Java5, ensure generics are fine for other compilers, too
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 22 Jul 2013 22:47:06 +0200 |
parents | 58a6900f845d |
children | 7839ff0bfd78 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/diff/DiffRangeMap.java Sun Jul 21 17:48:05 2013 +0200 +++ b/src/org/tmatesoft/hg/internal/diff/DiffRangeMap.java Mon Jul 22 22:47:06 2013 +0200 @@ -19,6 +19,7 @@ import java.util.ArrayList; import org.tmatesoft.hg.internal.DiffHelper; +import org.tmatesoft.hg.internal.DiffHelper.MatchInspector; import org.tmatesoft.hg.internal.IntSliceSeq; import org.tmatesoft.hg.internal.IntTuple; import org.tmatesoft.hg.internal.DiffHelper.ChunkSequence; @@ -44,8 +45,11 @@ * dh.findMatchingBlocks(p1ToBase); // compiles ok! * </pre> */ + @SuppressWarnings("unchecked") public DiffRangeMap fill(DiffHelper<?> dh) { - dh.findMatchingBlocks(this); + @SuppressWarnings("rawtypes") + final MatchInspector i = (MatchInspector) this; + dh.findMatchingBlocks(i); return this; }