mirror of https://github.com/apache/poi.git
Add a disabled test for bug #44501, which still remains, plus fix a generics warning
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@904062 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
069207f64e
commit
47c7d08456
|
@ -116,7 +116,7 @@ public final class Chunk {
|
|||
|
||||
// Loop over the definitions, building the commands
|
||||
// and getting their values
|
||||
ArrayList commands = new ArrayList();
|
||||
ArrayList<Command> commands = new ArrayList<Command>();
|
||||
for(int i=0; i<commandDefinitions.length; i++) {
|
||||
int type = commandDefinitions[i].getType();
|
||||
int offset = commandDefinitions[i].getOffset();
|
||||
|
@ -232,7 +232,7 @@ public final class Chunk {
|
|||
}
|
||||
|
||||
// Save the commands we liked the look of
|
||||
this.commands = (Command[])commands.toArray(
|
||||
this.commands = commands.toArray(
|
||||
new Command[commands.size()] );
|
||||
|
||||
// Now build up the blocks, if we had a command that tells
|
||||
|
|
|
@ -77,4 +77,17 @@ public final class TestHDGFCore extends TestCase {
|
|||
hdgf = new HDGFDiagram(fs);
|
||||
assertNotNull(hdgf);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that we can open a problematic file that triggers
|
||||
* an ArrayIndexOutOfBoundsException when processing the
|
||||
* chunk commands.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void DISABLEDtestAIOOB() throws Exception {
|
||||
fs = new POIFSFileSystem(_dgTests.openResourceAsStream("44501.vsd"));
|
||||
|
||||
HDGFDiagram hdgf = new HDGFDiagram(fs);
|
||||
assertNotNull(hdgf);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue