[jboss-jira] [JBoss JIRA] Created: (JBPM-1058) Remove useless null checks from JbpmContext methods

Johan Parent (JIRA) jira-events at lists.jboss.org
Tue Sep 25 10:09:41 EDT 2007


Remove useless null checks from JbpmContext methods
---------------------------------------------------

                 Key: JBPM-1058
                 URL: http://jira.jboss.com/jira/browse/JBPM-1058
             Project: JBoss jBPM
          Issue Type: Patch
            Reporter: Johan Parent
         Assigned To: Tom Baeyens


Remove useless null checks from often used methods to obtain:

  /**
   * more logging related database access.
   */
  public LoggingSession getLoggingSession() {
    PersistenceService persistenceService = getPersistenceService();

    return (persistenceService!=null ? persistenceService.getLoggingSession() : null);
  }
  /**
   * more messaging related database access.
   */
  public MessagingSession getMessagingSession() {
    PersistenceService persistenceService = getPersistenceService();

    return (persistenceService!=null ? persistenceService.getMessagingSession() : null);
  }
  /**
   * more scheduling related database access.
   */
  public SchedulerSession getSchedulerSession() {
    PersistenceService persistenceService = getPersistenceService();

    return (persistenceService!=null ? persistenceService.getSchedulerSession() : null);
  }
  /**
   * more graph (process) related database access.
   */
  public GraphSession getGraphSession() {
    PersistenceService persistenceService = getPersistenceService();

    return (persistenceService!=null ? persistenceService.getGraphSession() : null);
  }
  /**
   * more task related database access.
   */
  public TaskMgmtSession getTaskMgmtSession() {
    PersistenceService persistenceService = getPersistenceService();

    return (persistenceService!=null ? persistenceService.getTaskMgmtSession() : null);
  }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list