You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/10/05 17:24:39 UTC

DO NOT REPLY [Bug 51963] New: Comma in sheet name may cause "IllegalArgumentException: References passed to the AreaReference must be contiguous..." exception

https://issues.apache.org/bugzilla/show_bug.cgi?id=51963

             Bug #: 51963
           Summary: Comma in sheet name may cause
                    "IllegalArgumentException: References passed to the
                    AreaReference must be contiguous..." exception
           Product: POI
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: POI Overall
        AssignedTo: dev@poi.apache.org
        ReportedBy: paulsp@apache.org
    Classification: Unclassified


The comma is a valid character in a Sheet Name, but
org.apache.poi.ss.util.AreaReference.isContiguous() sees it as a separator and
throws an IllegalArgumentException.

isContiguous() should excluded the sheet name when looking for commas.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 51963] Comma in sheet name may cause "IllegalArgumentException: References passed to the AreaReference must be contiguous..." exception

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51963

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Nick Burch <ni...@alfresco.com> 2011-10-05 21:19:24 UTC ---
Thanks for the test file, should be fixed in r1179444.

It's probably worth pointing out that AreaReference has a big TODO in it about
consolidating the area and reference parsing code from about 4 classes, in case
anyone fancies tackling that one....!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 51963] Comma in sheet name may cause "IllegalArgumentException: References passed to the AreaReference must be contiguous..." exception

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51963

--- Comment #3 from Paul Spencer <pa...@apache.org> 2011-10-05 17:47:17 UTC ---
This issue was detected in v3.5, but as of v3.4-Beta 4 the issues still exists

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 51963] Comma in sheet name may cause "IllegalArgumentException: References passed to the AreaReference must be contiguous..." exception

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51963

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
         OS/Version|                            |All

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-10-05 17:06:35 UTC ---
Any chance you could upload a simple file with a sheet containing a comma,
along with a (currently failing) unit test that tries to do an area reference
on the sheet?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 51963] Comma in sheet name may cause "IllegalArgumentException: References passed to the AreaReference must be contiguous..." exception

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51963

--- Comment #2 from Paul Spencer <pa...@apache.org> 2011-10-05 17:45:40 UTC ---
Created attachment 27698
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27698
The only sheet is named "Abc,1"

***
* Sample of code that generated the exception.
***
String RegionName = "Intekon.ProdCodes"
Name namedRegion = workbook.getName(regionName);
if (namedRegion != null && !namedRegion.isDeleted()) {
  if ((sheetName == null) || sheetName.equals(namedRegion.getSheetName())) {
    regions.add(namedRegion);
  }
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org