Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 738 Bytes

README-java-annotations.md

File metadata and controls

29 lines (21 loc) · 738 Bytes

Java annotations

This merger resolves conflicts in favor of retaining a Java annotation, when the only textual difference is in annotations.

We are not aware of any real-world examples where this merger makes a mistake.

Example

Suppose that a git merge yielded a conflict in one of your .java files:

<<<<<<< OURS
  private long foo(byte[] bytes, @NonNegative int length) {
||||||| BASE
  public long foo(byte[] bytes, int length) {
=======
  private long foo(byte[] bytes, int length) {
>>>>>>> THEIRS

The Java annotation merger would resolve the conflict as:

  private long foo(byte[] bytes, @NonNegative int length) {

Note that modifiers such as public and private are merged just as annotations are.