Bug28755: CellReference will throws IllegalArgumentException when an illegal cell reference is provided.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437522 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bde0ed706b
commit
602869877e
@ -34,13 +34,17 @@ public class CellReference {
|
||||
public CellReference(String cellRef) {
|
||||
String[] parts = separateRefParts(cellRef);
|
||||
sheetName = parts[0];
|
||||
String ref = parts[1];
|
||||
String ref = parts[1];
|
||||
if ((ref == null)||("".equals(ref)))
|
||||
throw new IllegalArgumentException("Invalid Formula cell reference: '"+cellRef+"'");
|
||||
if (ref.charAt(0) == '$') {
|
||||
colAbs=true;
|
||||
ref=ref.substring(1);
|
||||
}
|
||||
col = convertColStringToNum(ref);
|
||||
ref=parts[2];
|
||||
if ((ref == null)||("".equals(ref)))
|
||||
throw new IllegalArgumentException("Invalid Formula cell reference: '"+cellRef+"'");
|
||||
if (ref.charAt(0) == '$') {
|
||||
rowAbs=true;
|
||||
ref=ref.substring(1);
|
||||
|
Loading…
Reference in New Issue
Block a user