diff --git a/src/java/org/apache/poi/poifs/property/DirectoryProperty.java b/src/java/org/apache/poi/poifs/property/DirectoryProperty.java index d86e73ada..ef4ff3499 100644 --- a/src/java/org/apache/poi/poifs/property/DirectoryProperty.java +++ b/src/java/org/apache/poi/poifs/property/DirectoryProperty.java @@ -18,6 +18,7 @@ package org.apache.poi.poifs.property; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; @@ -119,8 +120,8 @@ public class DirectoryProperty extends Property implements Parent, Iterable { - + public static class PropertyComparator implements Comparator, Serializable { + /** * compare method. Assumes both parameters are non-null * instances of Property. One property is less than another if diff --git a/src/ooxml/java/org/apache/poi/util/XmlSort.java b/src/ooxml/java/org/apache/poi/util/XmlSort.java index 68d2c0874..483b657d5 100644 --- a/src/ooxml/java/org/apache/poi/util/XmlSort.java +++ b/src/ooxml/java/org/apache/poi/util/XmlSort.java @@ -21,6 +21,7 @@ import static org.apache.poi.POIXMLTypeLoader.DEFAULT_XML_OPTIONS; import java.io.File; import java.io.IOException; +import java.io.Serializable; import java.util.Comparator; import javax.xml.namespace.QName; @@ -189,7 +190,7 @@ public final class XmlSort * The constructor accepts an argument indicating whether the comparison order is the same as * the lexicographic order of the strings or the reverse. */ - public static final class QNameComparator implements Comparator + public static final class QNameComparator implements Comparator, Serializable { public static final int ASCENDING = 1; public static final int DESCENDING = 2; diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java index 664e935d4..a1944c6ae 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java @@ -18,6 +18,7 @@ package org.apache.poi.hslf.usermodel; import java.awt.geom.Rectangle2D; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -169,7 +170,7 @@ implements HSLFShapeContainer, TableShape { updateRowHeightsProperty(); } - private static class TableCellComparator implements Comparator { + private static class TableCellComparator implements Comparator, Serializable { public int compare( HSLFShape o1, HSLFShape o2 ) { Rectangle2D anchor1 = o1.getAnchor(); Rectangle2D anchor2 = o2.getAnchor(); diff --git a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java index eddf6787d..1dea8e8a7 100644 --- a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java +++ b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java @@ -32,6 +32,7 @@ import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_RENDERING; import static org.apache.poi.hsmf.datatypes.MAPIProperty.ATTACH_SIZE; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -185,7 +186,7 @@ public class AttachmentChunks implements ChunkGroup { /** * Orders by the attachment number. */ - public static class AttachmentChunksSorter implements Comparator { + public static class AttachmentChunksSorter implements Comparator, Serializable { public int compare(AttachmentChunks a, AttachmentChunks b) { return a.poifsName.compareTo(b.poifsName); } diff --git a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java index 1da3e7f6c..2cfd3c480 100644 --- a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java +++ b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java @@ -17,6 +17,7 @@ package org.apache.poi.hsmf.datatypes; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -222,7 +223,7 @@ public final class RecipientChunks implements ChunkGroupWithProperties { /** * Orders by the recipient number. */ - public static class RecipientChunksSorter implements Comparator { + public static class RecipientChunksSorter implements Comparator, Serializable { public int compare(RecipientChunks a, RecipientChunks b) { if(a.recipientNumber < b.recipientNumber) return -1; diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java index baeee0c06..6a42e2b9f 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java @@ -17,6 +17,7 @@ package org.apache.poi.hwpf.model; import java.io.IOException; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -497,7 +498,7 @@ public class TextPieceTable implements CharIndexTranslator return textPlex.toByteArray(); } - private static class FCComparator implements Comparator + private static class FCComparator implements Comparator, Serializable { public int compare( TextPiece textPiece, TextPiece textPiece1 ) { diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java index 3c5eba60e..7f73e5918 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java @@ -16,6 +16,7 @@ ==================================================================== */ package org.apache.poi.hwpf.usermodel; +import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -262,9 +263,7 @@ public class FieldsImpl implements Fields } } - private static final class PlexOfFieldComparator implements - Comparator - { + private static final class PlexOfFieldComparator implements Comparator, Serializable { public int compare( PlexOfField o1, PlexOfField o2 ) { int thisVal = o1.getFcStart();