Author: kiwiwings
Date: Mon Mar 21 23:42:56 2016
New Revision: 1736114
URL: http://svn.apache.org/viewvc?rev=1736114&view=rev
Log:
findbugs fixes - SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
Modified:
poi/trunk/src/java/org/apache/poi/poifs/property/DirectoryProperty.java
poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
Modified:
poi/trunk/src/java/org/apache/poi/poifs/property/DirectoryProperty.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/property/DirectoryProperty.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/property/DirectoryProperty.java
(original)
+++ poi/trunk/src/java/org/apache/poi/poifs/property/DirectoryProperty.java Mon
Mar 21 23:42:56 2016
@@ -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 P
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
Modified: poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/util/XmlSort.java Mon Mar 21
23:42:56 2016
@@ -21,6 +21,7 @@ import static org.apache.poi.POIXMLTypeL
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;
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
Mon Mar 21 23:42:56 2016
@@ -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, TableShap
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();
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
---
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
(original)
+++
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
Mon Mar 21 23:42:56 2016
@@ -32,6 +32,7 @@ import static org.apache.poi.hsmf.dataty
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
/**
* 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);
}
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
---
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
(original)
+++
poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
Mon Mar 21 23:42:56 2016
@@ -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 imple
/**
* 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;
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
Mon Mar 21 23:42:56 2016
@@ -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 C
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 )
{
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java?rev=1736114&r1=1736113&r2=1736114&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
Mon Mar 21 23:42:56 2016
@@ -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 Field
}
}
- 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();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]