Skip to content

Commit

Permalink
small improvements to serialization (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Aug 7, 2024
1 parent b96ee85 commit d25dc7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public static SUFFIX_STRATEGY parse(String s) {
throw new IllegalArgumentException("can't parse " + s);
}
}
private final boolean extractEmbeddedDocumentBytes;
//for our current custom serialization, this can't be final. :(
private boolean extractEmbeddedDocumentBytes;

private int zeroPadName = 0;

Expand Down Expand Up @@ -76,6 +77,10 @@ public boolean isExtractEmbeddedDocumentBytes() {
return extractEmbeddedDocumentBytes;
}

public void setExtractEmbeddedDocumentBytes(boolean extractEmbeddedDocumentBytes) {
this.extractEmbeddedDocumentBytes = extractEmbeddedDocumentBytes;
}

public int getZeroPadName() {
return zeroPadName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public boolean isExtractInlineImageMetadataOnly() {
* @param extractInlineImageMetadataOnly
* @since 1.25
*/
void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) {
public void setExtractInlineImageMetadataOnly(boolean extractInlineImageMetadataOnly) {
this.extractInlineImageMetadataOnly = extractInlineImageMetadataOnly;
userConfigured.add("extractInlineImageMetadataOnly");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ private static Map<String, Method> getGetters(Method[] methods) {
Map<String, Method> ret = new HashMap<>();
for (Map.Entry<String, List<Method>> e : getters.entrySet()) {
String paramName = e.getKey();
//figure out how to skip Class level setters/getters
if ("class".equals(paramName)) {
continue;
}
List<Method> setterList = setters.get(paramName);
if (setterList == null || setterList.size() == 0) {
LOG.debug("Couldn't find setter for getter: " + paramName);
Expand Down

0 comments on commit d25dc7c

Please sign in to comment.