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
9bbf3ef4d0
commit
943d3d19e1
@ -116,7 +116,7 @@ public final class Chunk {
|
|||||||
|
|
||||||
// Loop over the definitions, building the commands
|
// Loop over the definitions, building the commands
|
||||||
// and getting their values
|
// and getting their values
|
||||||
ArrayList commands = new ArrayList();
|
ArrayList<Command> commands = new ArrayList<Command>();
|
||||||
for(int i=0; i<commandDefinitions.length; i++) {
|
for(int i=0; i<commandDefinitions.length; i++) {
|
||||||
int type = commandDefinitions[i].getType();
|
int type = commandDefinitions[i].getType();
|
||||||
int offset = commandDefinitions[i].getOffset();
|
int offset = commandDefinitions[i].getOffset();
|
||||||
@ -232,7 +232,7 @@ public final class Chunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save the commands we liked the look of
|
// Save the commands we liked the look of
|
||||||
this.commands = (Command[])commands.toArray(
|
this.commands = commands.toArray(
|
||||||
new Command[commands.size()] );
|
new Command[commands.size()] );
|
||||||
|
|
||||||
// Now build up the blocks, if we had a command that tells
|
// 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);
|
hdgf = new HDGFDiagram(fs);
|
||||||
assertNotNull(hdgf);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
test-data/diagram/44501.vsd
Normal file
BIN
test-data/diagram/44501.vsd
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user