mirror of https://github.com/apache/poi.git
Bug 59739: For now fix the regression in FileInformationBlock which was introduced after 3.15-beta1 so that the documents can be loaded again pending a full fix as discussed in the bug.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1750864 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b4fe61ea8
commit
e616b8cf12
|
@ -161,7 +161,18 @@ public final class FileInformationBlock implements Cloneable
|
|||
assertCbRgFcLcb( "0x0112", 0x00B7, "0x00B7", _cbRgFcLcb );
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Invalid file format version number: " + getNFib());
|
||||
/*
|
||||
When running with the large CommonCrawl corpus we found the following ids in documents that are processed fine:
|
||||
java.lang.IllegalStateException: Invalid file format version number: 113
|
||||
java.lang.IllegalStateException: Invalid file format version number: 191
|
||||
java.lang.IllegalStateException: Invalid file format version number: 192
|
||||
java.lang.IllegalStateException: Invalid file format version number: 194
|
||||
java.lang.IllegalStateException: Invalid file format version number: 195
|
||||
java.lang.IllegalStateException: Invalid file format version number: 216
|
||||
java.lang.IllegalStateException: Invalid file format version number: 265
|
||||
java.lang.IllegalStateException: Invalid file format version number: 267
|
||||
*/
|
||||
logger.log(POILogger.WARN, "Invalid file format version number: " + getNFib());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +208,7 @@ public final class FileInformationBlock implements Cloneable
|
|||
assertCswNew( "0x0112", 0x0005, "0x0005", _cswNew );
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Invalid file format version number: " + getNFib());
|
||||
logger.log(POILogger.WARN, "Invalid file format version number: " + getNFib());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,7 +332,7 @@ public final class FileInformationBlock implements Cloneable
|
|||
}
|
||||
catch ( Exception exc )
|
||||
{
|
||||
stringBuilder.append( "(exc: " + exc.getMessage() + ")" );
|
||||
stringBuilder.append("(exc: ").append(exc.getMessage()).append(")");
|
||||
}
|
||||
stringBuilder.append( "[/FIB2]\n" );
|
||||
return stringBuilder.toString();
|
||||
|
|
|
@ -894,4 +894,9 @@ public class TestBugs extends TestCase
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void testRegressionIn315beta2() {
|
||||
HWPFDocument hwpfDocument = HWPFTestDataSamples.openSampleFile("cap.stanford.edu_profiles_viewbiosketch_facultyid=4009&name=m_maciver.doc");
|
||||
assertNotNull(hwpfDocument);
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue