ericlang80 Posted September 5, 2010 Share Posted September 5, 2010 Hello everybody, i'm new in jasper, but trying to fix my appication, i found a possible bug in JRAbstractExporter abstract class, in setPageRange() method.Look at this condition: if (jasperPrint.getPages() != null) { lastPageIndex = jasperPrint.getPages().size() - 1; }where getPages() never must be null, but is possible that be an empty list , where size is 0 and lastPageIndex becomes -1.well, i hope that helps to jasper project. Thanks, Eric. . Link to comment Share on other sites More sharing options...
szaharia Posted September 6, 2010 Share Posted September 6, 2010 Hello,In fact, the operational fields are startPageIndex and endPageIndex. The lastPageIndex is used only for some strict comparisons in JRAbstractExporter, and -1 is one of its assumed values. There is no bug here.Regards,sanda Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now