]> source.dussan.org Git - poi.git/commitdiff
findbugs fixes - SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 21 Mar 2016 23:42:56 +0000 (23:42 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 21 Mar 2016 23:42:56 +0000 (23:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1736114 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/property/DirectoryProperty.java
src/ooxml/java/org/apache/poi/util/XmlSort.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java

index d86e73ada17d93a443e086b266caf8f970069f14..ef4ff3499c8fa3aa528fc4af36db7e9a5d912ad0 100644 (file)
@@ -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<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
          * instances of Property. One property is less than another if
index 68d2c0874ff7e480dcd310a9b89a6beee4ae9268..483b657d54ec718f057b56e6675b79fd1db3e807 100644 (file)
@@ -21,6 +21,7 @@ import static org.apache.poi.POIXMLTypeLoader.DEFAULT_XML_OPTIONS;
 \r
 import java.io.File;\r
 import java.io.IOException;\r
+import java.io.Serializable;\r
 import java.util.Comparator;\r
 \r
 import javax.xml.namespace.QName;\r
@@ -189,7 +190,7 @@ public final class XmlSort
      * The constructor accepts an argument indicating whether the comparison order is the same as\r
      * the lexicographic order of the strings or the reverse.\r
      */\r
-    public static final class QNameComparator implements Comparator<XmlCursor>\r
+    public static final class QNameComparator implements Comparator<XmlCursor>, Serializable\r
     {\r
         public static final int ASCENDING = 1;\r
         public static final int DESCENDING = 2;\r
index 664e935d4adf5d1ad41dc32fb5f27e13bc38df81..a1944c6aed49f0fdaf9e600ead1e8f30f968d727 100644 (file)
@@ -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();
index eddf6787d2471bc22c654a6f31ab3ee1de0dc412..1dea8e8a7b7a7efd6d5777fb8b50513313fd0ef4 100644 (file)
@@ -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);
       }
index 1da3e7f6cecb30b01b5b5ba85ba03216284aa3a1..2cfd3c480d939ff113ceca6ccc900deca1d12d4f 100644 (file)
@@ -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;
index baeee0c06157b16f974e801e5a503259396b69d4..6a42e2b9f35c744ee5d413f19818089827b06565 100644 (file)
@@ -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 )
         {
index 3c5eba60e3e613a347262754029daea2db75ba9a..7f73e591864d5d46d440a10083312c5ea859d07e 100644 (file)
@@ -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();