[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum ...
Christian Bauer
christian at hibernate.org
Thu Jan 10 03:37:45 EST 2008
User: cbauer
Date: 08/01/10 03:37:45
Modified: examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum
ForumQuery.java ReplyHome.java
Log:
Better getInstance() calls
Revision Changes Path
1.7 +2 -2 jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ForumQuery.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- ForumQuery.java 4 Jan 2008 22:28:51 -0000 1.6
+++ ForumQuery.java 10 Jan 2008 08:37:45 -0000 1.7
@@ -71,7 +71,7 @@
Map<Long,Long> unreadTopicsWithParent =
forumDAO.findUnreadTopicAndParentIds(currentDirectory, currentUser.getPreviousLastLoginOn());
- ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance("forumTopicReadManager");
+ ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance(ForumTopicReadManager.class);
for (Map.Entry<Long, Long> unreadTopicAndParent: unreadTopicsWithParent.entrySet()) {
if (forumInfo.containsKey(unreadTopicAndParent.getValue()) &&
@@ -111,7 +111,7 @@
Map<Long,Long> unreadTopicsWithParent =
forumDAO.findUnreadTopicAndParentIdsInForum(currentDirectory, currentUser.getPreviousLastLoginOn());
- ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance("forumTopicReadManager");
+ ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance(ForumTopicReadManager.class);
for (Map.Entry<Long, TopicInfo> topicInfoEntry: topicInfo.entrySet()) {
topicInfoEntry.getValue().setUnread(
1.6 +1 -1 jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplyHome.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ReplyHome.java 4 Jan 2008 22:28:51 -0000 1.5
+++ ReplyHome.java 10 Jan 2008 08:37:45 -0000 1.6
@@ -115,7 +115,7 @@
if (!getCurrentUser().isAdmin() && !getCurrentUser().isGuest()) {
getLog().debug("adding to read topics, forum id: "
+ documentHome.getParentNode().getId() + " topic id: " + documentHome.getInstance().getId());
- ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance("forumTopicReadManager");
+ ForumTopicReadManager forumTopicReadManager = (ForumTopicReadManager)Component.getInstance(ForumTopicReadManager.class);
forumTopicReadManager.addTopicId(documentHome.getParentNode().getId(), documentHome.getInstance().getId());
}
}
More information about the jboss-cvs-commits
mailing list