[jboss-cvs] jboss-seam/examples/issues/src/org/jboss/seam/example/issues ...
Gavin King
gavin.king at jboss.com
Wed Nov 8 12:33:00 EST 2006
User: gavin
Date: 06/11/08 12:33:00
Modified: examples/issues/src/org/jboss/seam/example/issues
CommentEditorBean.java IssueEditorBean.java
ProjectEditorBean.java
Log:
fix npes
Revision Changes Path
1.6 +1 -1 jboss-seam/examples/issues/src/org/jboss/seam/example/issues/CommentEditorBean.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CommentEditorBean.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/issues/src/org/jboss/seam/example/issues/CommentEditorBean.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- CommentEditorBean.java 15 Apr 2006 23:22:33 -0000 1.5
+++ CommentEditorBean.java 8 Nov 2006 17:33:00 -0000 1.6
@@ -102,7 +102,7 @@
@TransactionAttribute(NOT_SUPPORTED)
public String getDescription() {
- return comment.getId()==null ?
+ return comment==null || comment.getId()==null ?
"Comment on " + issueEditor.getDescription() :
"Comment [" + comment.getId() + "] for " + issueEditor.getDescription();
}
1.10 +11 -4 jboss-seam/examples/issues/src/org/jboss/seam/example/issues/IssueEditorBean.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: IssueEditorBean.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/issues/src/org/jboss/seam/example/issues/IssueEditorBean.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- IssueEditorBean.java 16 Apr 2006 17:16:12 -0000 1.9
+++ IssueEditorBean.java 8 Nov 2006 17:33:00 -0000 1.10
@@ -86,11 +86,18 @@
@TransactionAttribute(NOT_SUPPORTED)
public String getDescription() {
+ if (issue==null || issue.getProject()==null)
+ {
+ return "New Issue";
+ }
+ else
+ {
String projectName = issue.getProject().getName();
return issue.getId()==null ?
"New Issue for Project [" + projectName + "]" :
"Issue [" + issue.getId() + "] for Project [" + projectName + "]";
}
+ }
@LoggedIn
@IfInvalid(outcome=Outcome.REDISPLAY, refreshEntities=true)
1.11 +1 -1 jboss-seam/examples/issues/src/org/jboss/seam/example/issues/ProjectEditorBean.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ProjectEditorBean.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/issues/src/org/jboss/seam/example/issues/ProjectEditorBean.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- ProjectEditorBean.java 31 Oct 2006 22:39:45 -0000 1.10
+++ ProjectEditorBean.java 8 Nov 2006 17:33:00 -0000 1.11
@@ -79,7 +79,7 @@
@TransactionAttribute(NOT_SUPPORTED)
public String getDescription() {
- return project.getName()==null ?
+ return project==null || project.getName()==null ?
"New Project" : "Project [" + project.getName() + "]";
}
More information about the jboss-cvs-commits
mailing list