| Chunk |
|---|
| Conflicting content |
|---|
import java.io.ByteArrayInputStream; import java.io.IOException; <<<<<<< HEAD import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; ======= import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.ObjectNode; >>>>>>> 1deb4eb362ff09efccf9f9a7f6d5ba463726f662 import org.ektorp.util.Base64; import org.ektorp.util.Exceptions; |
| Solution content |
|---|
import java.io.ByteArrayInputStream; import java.io.IOException; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import org.ektorp.util.Base64; import org.ektorp.util.Exceptions; |
| File |
|---|
| PageRequest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
.decode(link, Base64.URL_SAFE))); KeyIdPair key = parseNextKey(n); <<<<<<< HEAD Deque |
| Solution content |
|---|
.decode(link, Base64.URL_SAFE)));
KeyIdPair key = parseNextKey(n);
int pageSize = n.get(PAGE_SIZE_FIELD_NAME).getIntValue();
boolean back = n.get(BACK_FIELD_NAME).asInt() == 1;
int page = n.get(PAGE_FIELD_NAME).asInt();
return new Builder()
.nextKey(key)
.pageSize(pageSize)
.back(back)
.page(page)
.build();
} catch (Exception e) {
throw Exceptions.propagate(e);
} |
| File |
|---|
| PageRequest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} } <<<<<<< HEAD private static Deque |
| Solution content |
|---|
}
}
private static KeyIdPair parseNextKey(JsonNode n) {
return parseKey(NEXT_KEY_FIELD_NAME, n);
}
private static KeyIdPair parseKey(String fieldName, JsonNode n) { |
| File |
|---|
| PageRequest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| If statement |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
.build();
}
<<<<<<< HEAD
public PageRequest getNextPageRequest(Object nextStartKey,
String nextStartDocId) {
try {
JsonNode keyNode = MAPPER.readTree(MAPPER
.writeValueAsString(nextStartKey));
Deque |
| Solution content |
|---|
.build();
}
public boolean isBack() {
return back;
}
@Override
public String toString() { |
| File |
|---|
| PageRequest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method declaration |
| Method signature |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
import java.util.Collections; import java.util.List; <<<<<<< HEAD import com.fasterxml.jackson.databind.ObjectMapper; ======= import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.map.ObjectMapper; >>>>>>> 1deb4eb362ff09efccf9f9a7f6d5ba463726f662 import org.ektorp.Page; import org.ektorp.PageRequest; import org.ektorp.http.HttpResponse; |
| Solution content |
|---|
import java.util.Collections; import java.util.List; import org.codehaus.jackson.map.ObjectMapper; import org.ektorp.Page; import org.ektorp.PageRequest; import org.ektorp.http.HttpResponse; |
| File |
|---|
| PageResponseHandler.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
JsonNode error = jp.readValueAsTree();
if (ignoreNotFound
&& error.asText().equals("not_found")) {
<<<<<<< HEAD
lastFieldName = null;
state.inRow = false;
jp.nextToken();
jp.nextToken();
continue;
}
throw new ViewResultException(state.lastKey,
error.asText());
=======
lastFieldName = null;
state.inRow = false;
jp.nextToken();
} else {
throw new ViewResultException(state.lastKey,
error.asText());
}
>>>>>>> 1deb4eb362ff09efccf9f9a7f6d5ba463726f662
} else if (isInField(fieldName, lastFieldName)) {
if (jp.getCurrentToken() == JsonToken.VALUE_NULL) {
state.fieldIsNull = true; |
| Solution content |
|---|
JsonNode error = jp.readValueAsTree();
if (ignoreNotFound
&& error.asText().equals("not_found")) {
lastFieldName = null;
state.inRow = false;
jp.nextToken();
} else {
throw new ViewResultException(state.lastKey,
error.asText());
}
} else if (isInField(fieldName, lastFieldName)) {
if (jp.getCurrentToken() == JsonToken.VALUE_NULL) {
state.fieldIsNull = true; |
| File |
|---|
| QueryResultParser.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Continue statement |
| Method invocation |
| Throw statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public boolean isNew() {
return revision == null;
}
<<<<<<< HEAD
@JsonProperty("_attachments")
public Map |
| Solution content |
|---|
public boolean isNew() {
return revision == null;
}
@JsonProperty(ATTACHMENTS_NAME)
public Map |
| File |
|---|
| CouchDbDocument.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
assertTrue(page.isHasNext());
assertEquals("dcdaf08242a4be7da1a36e25f4f0b022", page.getNextPageRequest().getStartKeyDocId());
}
<<<<<<< HEAD
@Test
=======
@Test @Ignore
>>>>>>> 1deb4eb362ff09efccf9f9a7f6d5ba463726f662
public void given_previous_page_request_has_not_been_set_then_hasPrevious_should_be_false() throws Exception {
handler = new PageResponseHandler |
| Solution content |
|---|
assertTrue(page.isHasNext());
assertEquals("dcdaf08242a4be7da1a36e25f4f0b022", page.getNextPageRequest().getStartKeyDocId());
}
@Test @Ignore
public void given_previous_page_request_has_not_been_set_then_hasPrevious_should_be_false() throws Exception {
handler = new PageResponseHandler |
| File |
|---|
| PageResponseHandlerTest.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Annotation |