poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-poi/src/scratchpad/src/org/apache/poi/hslf/usermodel SlideShow.java
Date Thu, 24 Nov 2005 10:46:45 GMT
nick        2005/11/24 02:46:45

  Modified:    src/scratchpad/src/org/apache/poi/hslf/usermodel
                        SlideShow.java
  Log:
  Fix NPE in case when we can't find the Document atom: throw an IllegalState instead
  
  Revision  Changes    Path
  1.6       +6 -0      jakarta-poi/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java
  
  Index: SlideShow.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SlideShow.java	7 Nov 2005 22:24:15 -0000	1.5
  +++ SlideShow.java	24 Nov 2005 10:46:45 -0000	1.6
  @@ -224,6 +224,12 @@
   		}
   	}
   
  +	// Ensure we really found a Document record
  +	// If we didn't, then the file is probably corrupt
  +	if(documentRecord == null) {
  +		throw new IllegalStateException("The PowerPoint file didn't contain a Document Record
in its PersistPtr blocks. It is probably corrupt.");
  +	}
  +
   
   	// Now look for SlideListWithTexts in the most up-to-date Document Record
   	//
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message