maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r630213 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
Date Fri, 22 Feb 2008 14:13:33 GMT
Author: ltheussl
Date: Fri Feb 22 06:13:25 2008
New Revision: 630213

URL: http://svn.apache.org/viewvc?rev=630213&view=rev
Log:
Avoid possible EmptyStackException

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java?rev=630213&r1=630212&r2=630213&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-itext/src/main/java/org/apache/maven/doxia/module/itext/SinkActionContext.java
Fri Feb 22 06:13:25 2008
@@ -80,7 +80,14 @@
     public int getCurrentAction()
     {
         //return currentAction;
-        return ((Integer)stack.peek()).intValue();
+        if ( stack.empty() )
+        {
+            return UNDEFINED;
+        }
+        else
+        {
+            return ( (Integer) stack.peek() ).intValue();
+        }
     }
 
     public void release()



Mime
View raw message