Mercurial > hg4j
comparison 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 |
comparison
equal
deleted
inserted
replaced
681:4f93bbc73b64 | 682:f568330dd9c0 |
---|---|
17 package org.tmatesoft.hg.internal.diff; | 17 package org.tmatesoft.hg.internal.diff; |
18 | 18 |
19 import java.util.ArrayList; | 19 import java.util.ArrayList; |
20 | 20 |
21 import org.tmatesoft.hg.internal.DiffHelper; | 21 import org.tmatesoft.hg.internal.DiffHelper; |
22 import org.tmatesoft.hg.internal.DiffHelper.MatchInspector; | |
22 import org.tmatesoft.hg.internal.IntSliceSeq; | 23 import org.tmatesoft.hg.internal.IntSliceSeq; |
23 import org.tmatesoft.hg.internal.IntTuple; | 24 import org.tmatesoft.hg.internal.IntTuple; |
24 import org.tmatesoft.hg.internal.DiffHelper.ChunkSequence; | 25 import org.tmatesoft.hg.internal.DiffHelper.ChunkSequence; |
25 | 26 |
26 /** | 27 /** |
42 * pg.findMatchingBlocks(p1ToBase); // doesn't compile | 43 * pg.findMatchingBlocks(p1ToBase); // doesn't compile |
43 * DiffHelper<?> dh = pg; | 44 * DiffHelper<?> dh = pg; |
44 * dh.findMatchingBlocks(p1ToBase); // compiles ok! | 45 * dh.findMatchingBlocks(p1ToBase); // compiles ok! |
45 * </pre> | 46 * </pre> |
46 */ | 47 */ |
48 @SuppressWarnings("unchecked") | |
47 public DiffRangeMap fill(DiffHelper<?> dh) { | 49 public DiffRangeMap fill(DiffHelper<?> dh) { |
48 dh.findMatchingBlocks(this); | 50 @SuppressWarnings("rawtypes") |
51 final MatchInspector i = (MatchInspector) this; | |
52 dh.findMatchingBlocks(i); | |
49 return this; | 53 return this; |
50 } | 54 } |
51 | 55 |
52 @Override | 56 @Override |
53 protected void added(int s1InsertPoint, int s2From, int s2To) { | 57 protected void added(int s1InsertPoint, int s2From, int s2To) { |