Commit Graph

191 Commits

Author SHA1 Message Date
Andreas Beeker
75c630f976 fix eclipse warnings / close resources in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778958 13f79535-47bb-0310-9956-ffa450edef68
2017-01-16 01:18:46 +00:00
Andreas Beeker
a7706b3fdf fix eclipse warnings - close resources / type generics
cleanup sources - add parenthesis to statements

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1778955 13f79535-47bb-0310-9956-ffa450edef68
2017-01-15 23:08:47 +00:00
Andreas Beeker
6a8332a173 eclipse warnings - raw list access
close resources

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773906 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 00:31:23 +00:00
Andreas Beeker
128001186b eclipse warnings - raw list access
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773905 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 00:30:24 +00:00
Nick Burch
30d64fda8c Recursive delete unit test based on users@ query - working fine already
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772894 13f79535-47bb-0310-9956-ffa450edef68
2016-12-06 13:52:46 +00:00
Dominik Stadler
f2c9dbec3f Add some missing close() calls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765875 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 20:31:50 +00:00
Javen O'Neal
a1ec4334cf Eclipse automated refactor/cleanup: add final modifier to private fields to unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765739 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 02:21:14 +00:00
Javen O'Neal
96d35e0b8e Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765736 13f79535-47bb-0310-9956-ffa450edef68
2016-10-20 01:54:56 +00:00
Andreas Beeker
54122c2233 remove *_dump directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765734 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 23:43:42 +00:00
Javen O'Neal
4b01accdb3 Eclipse automated refactor/cleanup: convert for loops to for-each loops
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765728 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 22:28:07 +00:00
Javen O'Neal
c5dddf7fac Eclipse automated refactor/cleanup: add missing @Override and @Deprecated annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765726 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 21:52:31 +00:00
Tim Allison
5958cb4840 BUG-59302 --add minimal support for VBAMacro extraction to HSLF; credit to Andreas Beeker for this patch. Problems are mine.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765696 13f79535-47bb-0310-9956-ffa450edef68
2016-10-19 18:44:46 +00:00
Tim Allison
17d4d76f4f BUG 60273 -- Use codepageutil to get correct charset in VBAMacroReader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765490 13f79535-47bb-0310-9956-ffa450edef68
2016-10-18 18:24:39 +00:00
Tim Allison
ef7bbb8fe4 BUG 59858 -- avoid npe when there's a collision of record names...doh. Fix unit test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765482 13f79535-47bb-0310-9956-ffa450edef68
2016-10-18 16:54:12 +00:00
Tim Allison
92eb3bbade BUG 59858 -- avoid npe when there's a collision of record names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765479 13f79535-47bb-0310-9956-ffa450edef68
2016-10-18 16:43:20 +00:00
Tim Allison
c878e39b55 BUG 59830 -- incorrect reading of unicode stream name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765468 13f79535-47bb-0310-9956-ffa450edef68
2016-10-18 15:47:38 +00:00
Tim Allison
db79501e9f BUG 60158 -- AIOOBE in VBAMacroReader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765433 13f79535-47bb-0310-9956-ffa450edef68
2016-10-18 12:55:34 +00:00
Tim Allison
7f9f8e9afa add length sanity check for length of embedded OLE10Native (BUG 60256)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1764927 13f79535-47bb-0310-9956-ffa450edef68
2016-10-14 14:57:29 +00:00
Tim Allison
442815fcc5 add ignored test and triggering document for BUG 60256
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1764890 13f79535-47bb-0310-9956-ffa450edef68
2016-10-14 13:22:23 +00:00
Dominik Stadler
cdef5dc16c Use IOUtils.closeQuietly() in more places
Avoid two possible file-handle leaks when opening files fails with an exception
Make tests close resources properly to not spam the output when running with file-leak-detector

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1763485 13f79535-47bb-0310-9956-ffa450edef68
2016-10-05 20:00:07 +00:00
Andreas Beeker
0a7cd3b68b merge trunk to branch
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/hssf_cryptoapi@1762709 13f79535-47bb-0310-9956-ffa450edef68
2016-09-28 21:01:40 +00:00
Andreas Beeker
0bfefdfc04 HSSF CryptoAPI decryption support
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/hssf_cryptoapi@1755461 13f79535-47bb-0310-9956-ffa450edef68
2016-08-08 00:10:44 +00:00
Nick Burch
4dee08213a Sync the file-based "past-the-end" exception to match the stream one, so that extending works, then tests for HSSF writing to a new empty POIFS file #57919
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753489 13f79535-47bb-0310-9956-ffa450edef68
2016-07-20 12:01:36 +00:00
Dominik Stadler
da595c2343 Fix some IntelliJ and Findbugs warnings: StringBuilder, foreach, append(), ...
test-updates

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1753122 13f79535-47bb-0310-9956-ffa450edef68
2016-07-17 21:18:07 +00:00
Javen O'Neal
75f5d3afc5 bug 59858: describe why VBA macro reading failed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1752778 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 06:12:37 +00:00
Javen O'Neal
bb8f614a90 bug 59858: add disabled unit test for bug 59858; file from Brooke
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1752776 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 05:28:29 +00:00
Javen O'Neal
909c07f37f bug 59830: add context to why no more bytes could be read from input stream
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751982 13f79535-47bb-0310-9956-ffa450edef68
2016-07-09 05:39:56 +00:00
Javen O'Neal
fba65665fb reorganize imports (remove unused imports, sort alphabetically)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751244 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 10:38:25 +00:00
Javen O'Neal
57e9abb8d1 parameterize raw generics
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1749260 13f79535-47bb-0310-9956-ffa450edef68
2016-06-20 03:50:30 +00:00
Dominik Stadler
aad52afa12 The changes for using AccessController/SecurityManager also added a log which now spams a lot if log is enabled in integration-tests, reduce it a bit by not trying to call "cleaner()" on HeapByteBuffer which does not have it for sure
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746411 13f79535-47bb-0310-9956-ffa450edef68
2016-06-01 08:05:07 +00:00
Dominik Stadler
d158ef23bd Close file-handles in tests as well to avoid noise when running file-leak-detection
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1742424 13f79535-47bb-0310-9956-ffa450edef68
2016-05-05 12:22:37 +00:00
Javen O'Neal
5e51b9e89b bug 52949: add unit test for reading VBA Macros from a Visio OOXML (VSDM, 2013+) file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738651 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 21:35:22 +00:00
Javen O'Neal
bbf912dceb bug 52949: add VBAMacroReader unit tests for H/XSLF, H/XWPF, and HGDF; OLE directories as case-insensitive
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738513 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 05:54:17 +00:00
Javen O'Neal
f49897de27 bug 52949: parameterize fromNPOIFS also
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738439 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 14:46:42 +00:00
Javen O'Neal
9f36d6c876 bug 52949: prepare for adding DOC/DOCM and PPT/PPTM test cases
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738438 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 14:33:47 +00:00
Nick Burch
2185e91883 Unit test for VBA macro reading #52949
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738427 13f79535-47bb-0310-9956-ffa450edef68
2016-04-10 12:45:53 +00:00
Dominik Stadler
ec6bb2a066 Slightly improve error message
Fix some IntelliJ/compiler warnings
Use common interfaces where possible
Cleanup after testing POIFSDump

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738032 13f79535-47bb-0310-9956-ffa450edef68
2016-04-06 19:49:59 +00:00
Dominik Stadler
128a991f9c Findbugs fixes
OldExcelExtractor could leak file handles in case of exceptions
Free file handles in POIFSDump, add unit-test for POIFSDump
Add a Findbugs exclude and adjust findbugs-ant slightly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734689 13f79535-47bb-0310-9956-ffa450edef68
2016-03-12 11:37:12 +00:00
Nick Burch
9090741226 More helpful exception message if POIFS is given a raw XML file (eg an Office 2003 XML file), plus tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734215 13f79535-47bb-0310-9956-ffa450edef68
2016-03-09 10:57:52 +00:00
Andreas Beeker
4ccadf7315 fix unnecessary cast warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1715626 13f79535-47bb-0310-9956-ffa450edef68
2015-11-22 12:30:42 +00:00
Uwe Schindler
73a8488838 #58597: Fix tests to not do setAccessible(), add some doPrivileged, too.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713891 13f79535-47bb-0310-9956-ffa450edef68
2015-11-11 16:57:39 +00:00
Dominik Stadler
a00240f212 Bug 58480: Work around problem where on Windows systems a Mapped Buffer can still lock a file even if the Channel was closed properly. Use reflection as DirectBuffer is in package sun.com and thus likely to go away with Java 9.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708609 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 14:53:41 +00:00
Andreas Beeker
5f94d8b533 fix eclipse warning - mostly generics cosmetics
close resources in tests
junit4 conversions
convert spreadsheet based formular test to junit parameterized tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702659 13f79535-47bb-0310-9956-ffa450edef68
2015-09-12 18:45:07 +00:00
Andreas Beeker
fec6b40606 More forbidden apis fixes (added main-tests to the check)
and a few junit4 upgrades
... hopefully this doesn't crash the build again ... :|

to simulate the tests on jenkins on the local developer box, uncomment the UTC lines in the build.xml

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702356 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 00:56:16 +00:00
Andreas Beeker
33ffe01bff - reworked HexDump class - unified array dumps and usage of standard java calls for hex format
- fixed a few findbugs DM_DEFAULT_ENCODING issues
- removed a few System.out/.err calls - instead the poilogger is used
- closed a few left open resource instances

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1700040 13f79535-47bb-0310-9956-ffa450edef68
2015-08-29 14:41:12 +00:00
Dominik Stadler
39163eccff Eclipse warnings, code formatting, missing @Overrides, Javadoc, missing close(), ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696794 13f79535-47bb-0310-9956-ffa450edef68
2015-08-20 14:28:39 +00:00
Dominik Stadler
0345110611 Try to make Sonar builds run again: add missing dependency, add ooxml-schema-security, don't depend on dir test-data and build-directory directly, don't override a POILogger that is set via System Properties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696165 13f79535-47bb-0310-9956-ffa450edef68
2015-08-16 20:51:40 +00:00
Dominik Stadler
ed7d892de7 Bug 58156: Possible data corruption in hasPOIFSHeader and hasOOXMLHeader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691948 13f79535-47bb-0310-9956-ffa450edef68
2015-07-20 14:03:35 +00:00
Nick Burch
e942647b66 When writing the mini-stream, set the size of it on the root property #58061
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1689505 13f79535-47bb-0310-9956-ffa450edef68
2015-07-06 21:39:42 +00:00
Nick Burch
08b74eb15e Helper method to report the number of blocks used in a BAT
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1689504 13f79535-47bb-0310-9956-ffa450edef68
2015-07-06 21:15:57 +00:00