You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2020/12/09 17:35:30 UTC

svn commit: r1884262 - in /poi/trunk/src/java/org/apache/poi: ddf/ hssf/record/ util/

Author: fanningpj
Date: Wed Dec  9 17:35:29 2020
New Revision: 1884262

URL: http://svn.apache.org/viewvc?rev=1884262&view=rev
Log:
remove more deprecated code

Modified:
    poi/trunk/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java
    poi/trunk/src/java/org/apache/poi/ddf/EscherArrayProperty.java
    poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
    poi/trunk/src/java/org/apache/poi/hssf/record/CalcCountRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/CalcModeRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/GridsetRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/LabelRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java
    poi/trunk/src/java/org/apache/poi/util/IOUtils.java

Modified: poi/trunk/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java Wed Dec  9 17:35:29 2020
@@ -24,7 +24,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.Removal;
 
 /**
  * Common abstract class for {@link EscherOptRecord} and
@@ -153,15 +152,6 @@ public abstract class AbstractEscherOptR
         sortProperties();
     }
 
-    /**
-     * @deprecated use {@link #removeEscherProperty(EscherPropertyTypes)} instead
-     */
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public void removeEscherProperty(int num){
-        properties.removeIf(prop -> prop.getPropertyNumber() == num);
-    }
-
     public void removeEscherProperty(EscherPropertyTypes type){
         properties.removeIf(prop -> prop.getPropertyNumber() == type.propNumber);
     }

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherArrayProperty.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherArrayProperty.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherArrayProperty.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherArrayProperty.java Wed Dec  9 17:35:29 2020
@@ -56,24 +56,6 @@ public final class EscherArrayProperty e
 
     /**
      * Create an instance of an escher array property.
-     * This constructor defaults to a 6 bytes header if the complexData is null or byte[0].
-     *
-     * @param id          The id consists of the property number, a flag indicating whether this is a blip id and a flag
-     *                    indicating that this is a complex property.
-     * @param complexData The value of this property.
-     *
-     * @deprecated use {@link #EscherArrayProperty(EscherPropertyTypes, boolean, int)} and {@link #setComplexData(byte[])}
-     */
-    @Deprecated
-    @Removal(version = "5.0.0")
-    @Internal
-    public EscherArrayProperty(short id, byte[] complexData) {
-        this(id, safeSize(complexData == null ? 0 : complexData.length));
-        setComplexData(complexData);
-    }
-
-    /**
-     * Create an instance of an escher array property.
      * This constructor can be used to create emptyComplexParts with a complexSize = 0.
      * Preferably use {@link #EscherArrayProperty(EscherPropertyTypes, boolean, int)} with {@link #setComplexData(byte[])}.
      *

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherComplexProperty.java Wed Dec  9 17:35:29 2020
@@ -24,7 +24,6 @@ import java.util.function.Supplier;
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.IOUtils;
 import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.Removal;
 
 /**
  * A complex property differs from a simple property in that the data can not fit inside a 32 bit
@@ -39,40 +38,6 @@ public class EscherComplexProperty exten
 
     /**
      * Create a complex property using the property id and a byte array containing the complex
-     * data value.
-     *
-     * @param id          The id consists of the property number, a flag indicating whether this is a blip id and a flag
-     *                    indicating that this is a complex property.
-     * @param complexData The value of this property.
-     *
-     * @deprecated use {@link #EscherComplexProperty(short, int)} and {@link #setComplexData(byte[])} instead
-     */
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public EscherComplexProperty(short id, byte[] complexData) {
-        this(id, complexData == null ? 0 : complexData.length);
-        setComplexData(complexData);
-    }
-
-    /**
-     * Create a complex property using the property number, a flag to indicate whether this is a
-     * blip reference and the complex property data.
-     *
-     * @param propertyNumber The property number
-     * @param isBlipId       Whether this is a blip id.  Should be false.
-     * @param complexData    The value of this complex property.
-     *
-     * @deprecated use {@link #EscherComplexProperty(EscherPropertyTypes, boolean, int)} and {@link #setComplexData(byte[])} instead
-     */
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public EscherComplexProperty(short propertyNumber, boolean isBlipId, byte[] complexData) {
-        this(propertyNumber, isBlipId, complexData == null ? 0 : complexData.length);
-        setComplexData(complexData);
-    }
-
-    /**
-     * Create a complex property using the property id and a byte array containing the complex
      * data value size.
      *
      * @param id          The id consists of the property number, a flag indicating whether this is a blip id and a flag

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/CalcCountRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/CalcCountRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/CalcCountRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/CalcCountRecord.java Wed Dec  9 17:35:29 2020
@@ -24,7 +24,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Specifies the maximum times the gui should perform a formula recalculation.
@@ -86,16 +85,6 @@ public final class CalcCountRecord exten
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public CalcCountRecord clone() {
-        return copy();
-    }
-
     @Override
     public CalcCountRecord copy() {
         return new CalcCountRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/CalcModeRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/CalcModeRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/CalcModeRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/CalcModeRecord.java Wed Dec  9 17:35:29 2020
@@ -24,7 +24,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Tells the gui whether to calculate formulas automatically, manually or automatically except for tables.
@@ -101,16 +100,6 @@ public final class CalcModeRecord extend
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public CalcModeRecord clone() {
-        return copy();
-    }
-
     @Override
     public CalcModeRecord copy() {
         return new CalcModeRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/GridsetRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/GridsetRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/GridsetRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/GridsetRecord.java Wed Dec  9 17:35:29 2020
@@ -22,7 +22,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Flag denoting whether the user specified that gridlines are used when printing.
@@ -80,16 +79,6 @@ public final class GridsetRecord extends
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public GridsetRecord clone() {
-        return copy();
-    }
-
     @Override
     public GridsetRecord copy() {
         return new GridsetRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java Wed Dec  9 17:35:29 2020
@@ -24,7 +24,6 @@ import org.apache.poi.util.GenericRecord
 import org.apache.poi.util.IOUtils;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * ftGmo (0x0006)<p>
@@ -75,16 +74,6 @@ public final class GroupMarkerSubRecord
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings("squid:S2975")
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public GroupMarkerSubRecord clone() {
-        return copy();
-    }
-
     @Override
     public GroupMarkerSubRecord copy() {
         return new GroupMarkerSubRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HorizontalPageBreakRecord.java Wed Dec  9 17:35:29 2020
@@ -17,8 +17,6 @@
 
 package org.apache.poi.hssf.record;
 
-import org.apache.poi.util.Removal;
-
 /**
  * HorizontalPageBreak (0x001B) record that stores page breaks at rows
  *
@@ -48,17 +46,6 @@ public final class HorizontalPageBreakRe
 		return sid;
 	}
 
-	/**
-	 * @deprecated use {@link #copy()} instead
-	 */
-	@Override
-	@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-	@Deprecated
-	@Removal(version = "5.0.0")
-	public PageBreakRecord clone() {
-		return copy();
-	}
-
 	@Override
 	public HorizontalPageBreakRecord copy() {
 		return new HorizontalPageBreakRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/LabelRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/LabelRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/LabelRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/LabelRecord.java Wed Dec  9 17:35:29 2020
@@ -25,7 +25,6 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 import org.apache.poi.util.RecordFormatException;
-import org.apache.poi.util.Removal;
 
 /**
  * Label Record (0x0204) - read only support for strings stored directly in the cell...
@@ -173,19 +172,7 @@ public final class LabelRecord extends R
      * no op!
      */
     @Override
-    public void setXFIndex(short xf)
-    {
-    }
-
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public LabelRecord clone() {
-        return copy();
-    }
+    public void setXFIndex(short xf) {}
 
     @Override
     public LabelRecord copy() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java Wed Dec  9 17:35:29 2020
@@ -29,7 +29,6 @@ import org.apache.poi.util.GenericRecord
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
 import org.apache.poi.util.RecordFormatException;
-import org.apache.poi.util.Removal;
 import org.apache.poi.util.StringUtil;
 
 /**
@@ -281,16 +280,6 @@ public class LbsDataSubRecord extends Su
         }
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings("squid:S2975")
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public LbsDataSubRecord clone() {
-        return copy();
-    }
-
     @Override
     public LbsDataSubRecord copy() {
         return new LbsDataSubRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java Wed Dec  9 17:35:29 2020
@@ -25,7 +25,6 @@ import org.apache.poi.util.IOUtils;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianOutput;
 import org.apache.poi.util.RecordFormatException;
-import org.apache.poi.util.Removal;
 
 /**
  * ftNts (0x000D)<p>
@@ -99,16 +98,6 @@ public final class NoteStructureSubRecor
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings("squid:S2975")
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public NoteStructureSubRecord clone() {
-        return copy();
-    }
-
     @Override
     public NoteStructureSubRecord copy() {
         return new NoteStructureSubRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java Wed Dec  9 17:35:29 2020
@@ -29,7 +29,6 @@ import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.LittleEndianByteArrayInputStream;
 import org.apache.poi.util.LittleEndianByteArrayOutputStream;
 import org.apache.poi.util.RecordFormatException;
-import org.apache.poi.util.Removal;
 
 /**
  * OBJRECORD (0x005D)<p>
@@ -215,16 +214,6 @@ public final class ObjRecord extends Rec
         return subrecords.add(o);
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public ObjRecord clone() {
-        return copy();
-    }
-
     @Override
     public ObjRecord copy() {
         return new ObjRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java Wed Dec  9 17:35:29 2020
@@ -25,7 +25,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Describes the frozen and unfrozen panes.
@@ -82,16 +81,6 @@ public final class PaneRecord extends St
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public PaneRecord clone() {
-        return copy();
-    }
-
     @Override
     public PaneRecord copy() {
         return new PaneRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java Wed Dec  9 17:35:29 2020
@@ -22,7 +22,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Whether or not to print the row/column headers when you enjoy your spreadsheet in the physical form.
@@ -79,16 +78,6 @@ public final class PrintHeadersRecord ex
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public PrintHeadersRecord clone() {
-        return copy();
-    }
-
     public PrintHeadersRecord copy() {
       return new PrintHeadersRecord(this);
     }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java Wed Dec  9 17:35:29 2020
@@ -28,7 +28,6 @@ import org.apache.poi.ss.usermodel.Print
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Stores print setup options -- bogus for HSSF (and marked as such)
@@ -316,16 +315,6 @@ public final class PrintSetupRecord exte
         return sid;
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public PrintSetupRecord clone() {
-        return copy();
-    }
-
     @Override
     public PrintSetupRecord copy() {
       return new PrintSetupRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java Wed Dec  9 17:35:29 2020
@@ -22,7 +22,6 @@ import java.util.function.Supplier;
 
 import org.apache.poi.util.GenericRecordUtil;
 import org.apache.poi.util.LittleEndianOutput;
-import org.apache.poi.util.Removal;
 
 /**
  * Record for the right margin.
@@ -63,16 +62,6 @@ public final class RightMarginRecord ext
     public void setMargin( double field_1_margin )
     {        this.field_1_margin = field_1_margin;    }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public RightMarginRecord clone() {
-        return copy();
-    }
-
     public RightMarginRecord copy() {
         return new RightMarginRecord(this);
     }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java Wed Dec  9 17:35:29 2020
@@ -23,7 +23,6 @@ import java.util.function.Supplier;
 import org.apache.poi.hssf.record.cont.ContinuableRecord;
 import org.apache.poi.hssf.record.cont.ContinuableRecordOutput;
 import org.apache.poi.util.GenericRecordUtil;
-import org.apache.poi.util.Removal;
 import org.apache.poi.util.StringUtil;
 
 /**
@@ -86,16 +85,6 @@ public final class StringRecord extends
         _is16bitUnicode = StringUtil.hasMultibyte(string);
     }
 
-    /**
-     * @deprecated use {@link #copy()} instead
-     */
-    @SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-    @Deprecated
-    @Removal(version = "5.0.0")
-    public StringRecord clone() {
-        return copy();
-    }
-
     public StringRecord copy() {
         return new StringRecord(this);
     }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectRecord.java Wed Dec  9 17:35:29 2020
@@ -30,7 +30,6 @@ import org.apache.poi.ss.formula.ptg.Ptg
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.RecordFormatException;
-import org.apache.poi.util.Removal;
 
 /**
  * The TXO record (0x01B6) is used to define the properties of a text box. It is
@@ -317,17 +316,6 @@ public final class TextObjectRecord exte
 		return _linkRefPtg;
 	}
 
-	/**
-	 * @deprecated use {@link #copy()} instead
-	 */
-	@Override
-	@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-	@Deprecated
-	@Removal(version = "5.0.0")
-	public TextObjectRecord clone() {
-		return copy();
-	}
-
 	@Override
 	public TextObjectRecord copy() {
 		return new TextObjectRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java Wed Dec  9 17:35:29 2020
@@ -17,8 +17,6 @@
 
 package org.apache.poi.hssf.record;
 
-import org.apache.poi.util.Removal;
-
 /**
  * VerticalPageBreak (0x001A) record that stores page breaks at columns
  *
@@ -48,17 +46,6 @@ public final class VerticalPageBreakReco
 		return sid;
 	}
 
-	/**
-	 * @deprecated use {@link #copy()} instead
-	 */
-	@Override
-	@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
-	@Deprecated
-	@Removal(version = "5.0.0")
-	public VerticalPageBreakRecord clone() {
-		return copy();
-	}
-
 	@Override
 	public VerticalPageBreakRecord copy() {
 		return new VerticalPageBreakRecord(this);

Modified: poi/trunk/src/java/org/apache/poi/util/IOUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/IOUtils.java?rev=1884262&r1=1884261&r2=1884262&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/IOUtils.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/IOUtils.java Wed Dec  9 17:35:29 2020
@@ -33,9 +33,6 @@ import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
 import org.apache.poi.EmptyFileException;
-import org.apache.poi.POIDocument;
-import org.apache.poi.ss.usermodel.Workbook;
-
 
 @Internal
 public final class IOUtils {
@@ -290,137 +287,6 @@ public final class IOUtils {
         }
     }
 
-    /**
-     * Write a POI Document ({@link org.apache.poi.ss.usermodel.Workbook}, {@link org.apache.poi.sl.usermodel.SlideShow}, etc) to an output stream and close the output stream.
-     * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
-     *
-     * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
-     * This function exists for Java 6 code.
-     *
-     * @param doc  a writeable document to write to the output stream
-     * @param out  the output stream that the document is written to
-     * @throws IOException thrown on errors writing to the stream
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void write(POIDocument doc, OutputStream out) throws IOException {
-        try {
-            doc.write(out);
-        } finally {
-            closeQuietly(out);
-        }
-    }
-
-    /**
-     * Write a ({@link org.apache.poi.ss.usermodel.Workbook}) to an output stream and close the output stream.
-     * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
-     *
-     * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
-     * This function exists for Java 6 code.
-     *
-     * @param doc  a writeable document to write to the output stream
-     * @param out  the output stream that the document is written to
-     * @throws IOException thrown on errors writing to the stream
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void write(Workbook doc, OutputStream out) throws IOException {
-        try {
-            doc.write(out);
-        } finally {
-            closeQuietly(out);
-        }
-    }
-
-    /**
-     * Write a POI Document ({@link org.apache.poi.ss.usermodel.Workbook}, {@link org.apache.poi.sl.usermodel.SlideShow}, etc) to an output stream and close the output stream.
-     * This will attempt to close the output stream at the end even if there was a problem writing the document to the stream.
-     * This will also attempt to close the document, even if an error occurred while writing the document or closing the output stream.
-     *
-     * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
-     * This function exists for Java 6 code.
-     *
-     * @param doc  a writeable and closeable document to write to the output stream, then close
-     * @param out  the output stream that the document is written to
-     * @throws IOException thrown on errors writing to the stream
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void writeAndClose(POIDocument doc, OutputStream out) throws IOException {
-        try {
-            write(doc, out);
-        } finally {
-            closeQuietly(doc);
-        }
-    }
-
-    /**
-     * Like {@link #writeAndClose(POIDocument, OutputStream)}, but for writing to a File instead of an OutputStream.
-     * This will attempt to close the document, even if an error occurred while writing the document.
-     *
-     * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
-     * This function exists for Java 6 code.
-     *
-     * @param doc  a writeable and closeable document to write to the output file, then close
-     * @param out  the output file that the document is written to
-     * @throws IOException thrown on errors writing to the stream
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void writeAndClose(POIDocument doc, File out) throws IOException {
-        try {
-            doc.write(out);
-        } finally {
-            closeQuietly(doc);
-        }
-    }
-
-    /**
-     * Like {@link #writeAndClose(POIDocument, File)}, but for writing a POI Document in place (to the same file that it was opened from).
-     * This will attempt to close the document, even if an error occurred while writing the document.
-     *
-     * If you are using Java 7 or higher, you may prefer to use a try-with-resources statement instead.
-     * This function exists for Java 6 code.
-     *
-     * @param doc  a writeable document to write in-place
-     * @throws IOException thrown on errors writing to the file
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void writeAndClose(POIDocument doc) throws IOException {
-        try {
-            doc.write();
-        } finally {
-            closeQuietly(doc);
-        }
-    }
-
-    // Since the Workbook interface doesn't derive from POIDocument
-    // We'll likely need one of these for each document container interface
-    /**
-     *
-     * @deprecated since 4.0, use try-with-resources, will be removed in 4.2
-     */
-    @Deprecated
-    @Removal(version="4.2")
-    public static void writeAndClose(Workbook doc, OutputStream out) throws IOException {
-        try {
-            doc.write(out);
-        } finally {
-            closeQuietly(doc);
-        }
-    }
-
     /**
      * Copies all the data from the given InputStream to the OutputStream. It
      * leaves both streams open, so you will still need to close them once done.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org