[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action ...
Christian Bauer
christian at hibernate.org
Sat Sep 29 19:15:09 EDT 2007
User: cbauer
Date: 07/09/29 19:15:09
Modified: examples/wiki/src/main/org/jboss/seam/wiki/core/action
NodeHistory.java
Log:
Potential NPE
Revision Changes Path
1.12 +7 -0 jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHistory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeHistory.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHistory.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- NodeHistory.java 6 Sep 2007 15:54:28 -0000 1.11
+++ NodeHistory.java 29 Sep 2007 23:15:09 -0000 1.12
@@ -104,6 +104,13 @@
if (historicalNodeId == null) return;
selectedHistoricalNode = (Document)nodeDAO.findHistoricalNode(historicalNodeId);
+ if (selectedHistoricalNode == null) {
+ facesMessages.addFromResourceBundleOrDefault(
+ FacesMessage.SEVERITY_ERROR,
+ "historicalNodeNotFound",
+ "Couldn't find historical node: " + historicalNodeId);
+ return;
+ }
String[] a = selectedHistoricalNode.getContent().split("\n");
String[] b = currentNode.getContent().split("\n");
More information about the jboss-cvs-commits
mailing list