Permalink
Browse files

Fixed remaining compilation problems.

  • Loading branch information...
pgelinas committed Nov 5, 2012
1 parent 975586a commit f85d9516e302be7db58e145a201048d2712b269d
@@ -79,7 +79,7 @@ public static PageRequest fromLink(String link) {
.decode(link, Base64.URL_SAFE)));
KeyIdPair key = parseNextKey(n);
- int pageSize = n.get(PAGE_SIZE_FIELD_NAME).getIntValue();
+ int pageSize = n.get(PAGE_SIZE_FIELD_NAME).intValue();
boolean back = n.get(BACK_FIELD_NAME).asInt() == 1;
int page = n.get(PAGE_FIELD_NAME).asInt();
return new Builder()
@@ -101,7 +101,7 @@ private static KeyIdPair parseKey(String fieldName, JsonNode n) {
KeyIdPair key;
JsonNode nextKey = n.get(fieldName);
if (nextKey != null) {
- String docId = nextKey.getFieldNames().next();
+ String docId = nextKey.fieldNames().next();
key = new KeyIdPair(nextKey.get(docId), docId);
} else {
key = null;
@@ -132,7 +132,7 @@ private T parseFirstRow(JsonParser jp, ParseState state)
jp.nextToken();
if (isEndOfRow(jp)) {
state.docFieldName = VALUE_FIELD_NAME;
- T doc = mapper.readValue(value, type);
+ T doc = mapper.readValue(value.traverse(), type);
endRow(jp, state);
return doc;
}
@@ -190,7 +190,7 @@ private void skipToField(JsonParser jp, String fieldName, ParseState state)
break;
default:
if (isInField(ID_FIELD_NAME, lastFieldName)) {
- state.lastId = jp.readValueAsTree().getTextValue();
+ state.lastId = jp.<JsonNode>readValueAsTree().asText();
} else if (isInField(KEY_FIELD_NAME, lastFieldName)) {
state.lastKey = jp.readValueAsTree();
} else if (isInField(ERROR_FIELD_NAME, lastFieldName)) {
@@ -14,6 +14,7 @@
import org.ektorp.util.Predicate;
import org.ektorp.util.ReflectionUtils;
+import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
@@ -51,7 +52,14 @@ public boolean isIgnorableMethod(AnnotatedMethod m) {
return names.contains(m.getName());
}
- @Override
+ @Override
+ public String[] findPropertiesToIgnore(Annotated ac) {
+ if(ac instanceof AnnotatedClass){
+ return findPropertiesToIgnore((AnnotatedClass) ac);
+ }
+ return super.findPropertiesToIgnore(ac);
+ }
+
public String[] findPropertiesToIgnore(AnnotatedClass ac) {
List<String> ignoreFields = null;
for (AnnotatedField f : ac.fields()) {

0 comments on commit f85d951

Please sign in to comment.