findbugs fixes - SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1736114 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
762864d0f2
commit
197aef5420
@ -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,7 +120,7 @@ public class DirectoryProperty extends Property implements Parent, Iterable<Prop
|
||||
return result;
|
||||
}
|
||||
|
||||
public static class PropertyComparator implements Comparator<Property> {
|
||||
public static class PropertyComparator implements Comparator<Property>, Serializable {
|
||||
|
||||
/**
|
||||
* compare method. Assumes both parameters are non-null
|
||||
|
@ -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<XmlCursor>
|
||||
public static final class QNameComparator implements Comparator<XmlCursor>, Serializable
|
||||
{
|
||||
public static final int ASCENDING = 1;
|
||||
public static final int DESCENDING = 2;
|
||||
|
@ -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<HSLFShape,HSLFTextParagraph> {
|
||||
updateRowHeightsProperty();
|
||||
}
|
||||
|
||||
private static class TableCellComparator implements Comparator<HSLFShape> {
|
||||
private static class TableCellComparator implements Comparator<HSLFShape>, Serializable {
|
||||
public int compare( HSLFShape o1, HSLFShape o2 ) {
|
||||
Rectangle2D anchor1 = o1.getAnchor();
|
||||
Rectangle2D anchor2 = o2.getAnchor();
|
||||
|
@ -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<AttachmentChunks> {
|
||||
public static class AttachmentChunksSorter implements Comparator<AttachmentChunks>, Serializable {
|
||||
public int compare(AttachmentChunks a, AttachmentChunks b) {
|
||||
return a.poifsName.compareTo(b.poifsName);
|
||||
}
|
||||
|
@ -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<RecipientChunks> {
|
||||
public static class RecipientChunksSorter implements Comparator<RecipientChunks>, Serializable {
|
||||
public int compare(RecipientChunks a, RecipientChunks b) {
|
||||
if(a.recipientNumber < b.recipientNumber)
|
||||
return -1;
|
||||
|
@ -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<TextPiece>
|
||||
private static class FCComparator implements Comparator<TextPiece>, Serializable
|
||||
{
|
||||
public int compare( TextPiece textPiece, TextPiece textPiece1 )
|
||||
{
|
||||
|
@ -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<PlexOfField>
|
||||
{
|
||||
private static final class PlexOfFieldComparator implements Comparator<PlexOfField>, Serializable {
|
||||
public int compare( PlexOfField o1, PlexOfField o2 )
|
||||
{
|
||||
int thisVal = o1.getFcStart();
|
||||
|
Loading…
Reference in New Issue
Block a user