remove some deprecated code slated for removal in 3.18
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e4fc7ff5a7
commit
8f53bd94a6
@ -17,7 +17,6 @@
|
||||
package org.apache.poi.poifs.crypt;
|
||||
|
||||
import org.apache.poi.EncryptedDocumentException;
|
||||
import org.apache.poi.util.Removal;
|
||||
|
||||
/**
|
||||
* Reads and processes OOXML Encryption Headers
|
||||
@ -94,14 +93,6 @@ public abstract class EncryptionHeader implements Cloneable {
|
||||
return hashAlgorithm;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated POI 3.16 beta 1. use {@link #getHashAlgorithm()}
|
||||
*/
|
||||
@Removal(version="3.18")
|
||||
public HashAlgorithm getHashAlgorithmEx() {
|
||||
return hashAlgorithm;
|
||||
}
|
||||
|
||||
protected void setHashAlgorithm(HashAlgorithm hashAlgorithm) {
|
||||
this.hashAlgorithm = hashAlgorithm;
|
||||
}
|
||||
|
@ -146,18 +146,6 @@ public class WorkdayCalculator {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aDate a given date.
|
||||
* @param holidays an array of holidays.
|
||||
* @return <code>1</code> is not a workday, <code>0</code> otherwise.
|
||||
*
|
||||
* @deprecated POI 3.16 - will be removed, not used in POI itself
|
||||
*/
|
||||
@Removal(version="3.18")
|
||||
protected int isNonWorkday(double aDate, double[] holidays) {
|
||||
return isWeekend(aDate) || isHoliday(aDate, holidays) ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param start start date.
|
||||
* @param end end date.
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
package org.apache.poi.xwpf.model;
|
||||
|
||||
import org.apache.poi.util.Removal;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
|
||||
|
||||
/**
|
||||
* Base class for XWPF paragraphs
|
||||
*
|
||||
* @deprecated 3.16 beta1. This class isn't used ...
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version="3.18")
|
||||
public class XMLParagraph {
|
||||
protected CTP paragraph;
|
||||
|
||||
public XMLParagraph(CTP paragraph) {
|
||||
this.paragraph = paragraph;
|
||||
}
|
||||
|
||||
public CTP getCTP() {
|
||||
return paragraph;
|
||||
}
|
||||
}
|
@ -56,7 +56,7 @@ public class TestXWPFBugs {
|
||||
EncryptionInfo info = new EncryptionInfo(filesystem);
|
||||
assertEquals(128, info.getHeader().getKeySize());
|
||||
assertEquals(CipherAlgorithm.aes128, info.getHeader().getCipherAlgorithm());
|
||||
assertEquals(HashAlgorithm.sha1, info.getHeader().getHashAlgorithmEx());
|
||||
assertEquals(HashAlgorithm.sha1, info.getHeader().getHashAlgorithm());
|
||||
|
||||
// Check it can be decoded
|
||||
Decryptor d = Decryptor.getInstance(info);
|
||||
@ -92,7 +92,7 @@ public class TestXWPFBugs {
|
||||
assertEquals(16, info.getHeader().getBlockSize());
|
||||
assertEquals(256, info.getHeader().getKeySize());
|
||||
assertEquals(CipherAlgorithm.aes256, info.getHeader().getCipherAlgorithm());
|
||||
assertEquals(HashAlgorithm.sha1, info.getHeader().getHashAlgorithmEx());
|
||||
assertEquals(HashAlgorithm.sha1, info.getHeader().getHashAlgorithm());
|
||||
|
||||
// Check it can be decoded
|
||||
Decryptor d = Decryptor.getInstance(info);
|
||||
|
@ -57,7 +57,6 @@ import org.apache.poi.util.LittleEndian;
|
||||
import org.apache.poi.util.LittleEndianConsts;
|
||||
import org.apache.poi.util.POILogFactory;
|
||||
import org.apache.poi.util.POILogger;
|
||||
import org.apache.poi.util.Removal;
|
||||
|
||||
/**
|
||||
* This class contains the main functionality for the Powerpoint file
|
||||
@ -84,18 +83,6 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
|
||||
// Embedded objects stored in storage records in the document stream, lazily populated.
|
||||
private HSLFObjectData[] _objects;
|
||||
|
||||
/**
|
||||
* Returns the directory in the underlying POIFSFileSystem for the
|
||||
* document that is open.
|
||||
*
|
||||
* @deprecated POI 3.16 beta 1. use {@link POIDocument#getDirectory()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version="3.18")
|
||||
protected DirectoryNode getPOIFSDirectory() {
|
||||
return getDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Powerpoint document from fileName. Parses the document
|
||||
* and places all the important stuff into data structures.
|
||||
|
@ -153,15 +153,4 @@ public class TestWorkdayCalculator {
|
||||
assertEquals("Expected 1 non-weekend-holiday for " + start + " to " + end + " and " + holiday1 + " and " + holiday2,
|
||||
1, count);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testIsNonWorkday() throws Exception {
|
||||
final double weekend = DateUtil.getExcelDate(d(2016, 12, 25));
|
||||
final double holiday = DateUtil.getExcelDate(d(2016, 12, 26));
|
||||
final double workday = DateUtil.getExcelDate(d(2016, 12, 27));
|
||||
assertEquals(1, WorkdayCalculator.instance.isNonWorkday(weekend, new double[]{holiday}));
|
||||
assertEquals(1, WorkdayCalculator.instance.isNonWorkday(holiday, new double[]{holiday}));
|
||||
assertEquals(0, WorkdayCalculator.instance.isNonWorkday(workday, new double[]{holiday}));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user