Browse Source

Fix API errors raised on ResolveMerger affecting API providers only

In change If45bc3d078b3d3de87b758e71d7379059d709603 a new parameter was
added to 3 protected methods of ResolveMerger. This breaks the code of
developers which have subclassed ResolveMerger. The API baseline check
in Eclipse reports this as API breakage.

Since this will break only providers but not consumers of the API this
should be allowed also in minor versions. According to OSGi semantic
versioning
http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf
breaking providers in a minor version update is ok.

Therefore silence these errors using API filter rules.

Bug: 440757
Change-Id: Icabbd0e1de7e877c66a5c4a2c8391473f992a1aa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-3.5
Christian Halstrick 10 years ago committed by Matthias Sohn
parent
commit
adbf0541dc
  1. 20
      org.eclipse.jgit/.settings/.api_filters
  2. 1
      org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
  3. 6
      org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java

20
org.eclipse.jgit/.settings/.api_filters

@ -8,4 +8,24 @@
</message_arguments> </message_arguments>
</filter> </filter>
</resource> </resource>
<resource path="src/org/eclipse/jgit/merge/ResolveMerger.java" type="org.eclipse.jgit.merge.ResolveMerger">
<filter comment="Doesn't break consumers. Breaking providers is allowed also in minor versions." id="338792546">
<message_arguments>
<message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
<message_argument value="mergeTreeWalk(TreeWalk)"/>
</message_arguments>
</filter>
<filter comment="Doesn't break consumers. Breaking providers is allowed also in minor versions." id="338792546">
<message_arguments>
<message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
<message_argument value="mergeTrees(AbstractTreeIterator, RevTree, RevTree)"/>
</message_arguments>
</filter>
<filter comment="Doesn't break consumers. Breaking providers is allowed also in minor versions." id="338792546">
<message_arguments>
<message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
<message_argument value="processEntry(CanonicalTreeParser, CanonicalTreeParser, CanonicalTreeParser, DirCacheBuildIterator, WorkingTreeIterator)"/>
</message_arguments>
</filter>
</resource>
</component> </component>

1
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java

@ -169,6 +169,7 @@ public class MergeResult<S extends Sequence> implements Iterable<MergeChunk> {
* markers!) as new conflict-free content * markers!) as new conflict-free content
* *
* @param containsConflicts * @param containsConflicts
* @since 3.5
*/ */
protected void setContainsConflicts(boolean containsConflicts) { protected void setContainsConflicts(boolean containsConflicts) {
this.containsConflicts = containsConflicts; this.containsConflicts = containsConflicts;

6
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java

@ -468,7 +468,7 @@ public class ResolveMerger extends ThreeWayMerger {
* @throws IncorrectObjectTypeException * @throws IncorrectObjectTypeException
* @throws CorruptObjectException * @throws CorruptObjectException
* @throws IOException * @throws IOException
* @since 3.4 * @since 3.5
*/ */
protected boolean processEntry(CanonicalTreeParser base, protected boolean processEntry(CanonicalTreeParser base,
CanonicalTreeParser ours, CanonicalTreeParser theirs, CanonicalTreeParser ours, CanonicalTreeParser theirs,
@ -1021,7 +1021,7 @@ public class ResolveMerger extends ThreeWayMerger {
* conflicts. * conflicts.
* @return whether the trees merged cleanly * @return whether the trees merged cleanly
* @throws IOException * @throws IOException
* @since 3.0 * @since 3.5
*/ */
protected boolean mergeTrees(AbstractTreeIterator baseTree, protected boolean mergeTrees(AbstractTreeIterator baseTree,
RevTree headTree, RevTree mergeTree, boolean ignoreConflicts) RevTree headTree, RevTree mergeTree, boolean ignoreConflicts)
@ -1082,7 +1082,7 @@ public class ResolveMerger extends ThreeWayMerger {
* {@link ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)} * {@link ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)}
* @return Whether the trees merged cleanly. * @return Whether the trees merged cleanly.
* @throws IOException * @throws IOException
* @since 3.4 * @since 3.5
*/ */
protected boolean mergeTreeWalk(TreeWalk treeWalk, boolean ignoreConflicts) protected boolean mergeTreeWalk(TreeWalk treeWalk, boolean ignoreConflicts)
throws IOException { throws IOException {

Loading…
Cancel
Save