ICEpush
  1. ICEpush
  2. PUSH-381

Add checks for illegal arguments to the PushContext

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA, 4.1
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEpush, ICEpush-EE, EPS

      Description

      The PushContext should check for illegal arguments to avoid any other unforeseen thrown exceptions down the road and to avoid possible confusion of the developer when null arguments are silently ignored.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Sending core/src/main/java/org/icepush/PushContext.java
        Transmitting file data .
        Committed revision 47791.

        Show
        Jack Van Ooststroom added a comment - Sending core/src/main/java/org/icepush/PushContext.java Transmitting file data . Committed revision 47791.
        Hide
        Jack Van Ooststroom added a comment -

        The public PushContext API is now guarded against illegal arguments as follows:

        • public void addGroupMember(String groupName, String pushID)
          • Argument groupName cannot be null or empty.
          • Argument pushID cannot be null or empty.
        • public void addGroupMember(String groupName, String pushID, PushConfiguration pushConfiguration)
          • Argument groupName cannot be null or empty.
          • Argument pushID cannot be null or empty.
        • public void backOff(String browserID, long delay)
          • Argument browserID cannot be null or empty.
          • Argument delay cannot be less than 0.
        • public synchronized String createPushId(HttpServletRequest request, HttpServletResponse response)
          • Argument request cannot be null.
          • Argument response cannot be null.
        • public void push(String groupName)
          • Argument groupName cannot be null or empty.
        • public void push(String groupName, String payload)
          • Argument groupName cannot be null or empty.
        • public void push(String groupName, PushConfiguration pushConfiguration)
          • Argument groupName cannot be null or empty.
        • public void push(String groupName, String payload, PushConfiguration pushConfiguration)
          • Argument groupName cannot be null or empty.
        • public void removeGroupMember(String groupName, String pushID)
          • Argument groupName cannot be null or empty.
          • Argument pushID cannot be null or empty.
        • public static synchronized PushContext getInstance(ServletContext servletContext)
          • Argument servletContext cannot be null.

        Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - The public PushContext API is now guarded against illegal arguments as follows: public void addGroupMember(String groupName, String pushID) Argument groupName cannot be null or empty. Argument pushID cannot be null or empty. public void addGroupMember(String groupName, String pushID, PushConfiguration pushConfiguration) Argument groupName cannot be null or empty. Argument pushID cannot be null or empty. public void backOff(String browserID, long delay) Argument browserID cannot be null or empty. Argument delay cannot be less than 0 . public synchronized String createPushId(HttpServletRequest request, HttpServletResponse response) Argument request cannot be null . Argument response cannot be null . public void push(String groupName) Argument groupName cannot be null or empty. public void push(String groupName, String payload) Argument groupName cannot be null or empty. public void push(String groupName, PushConfiguration pushConfiguration) Argument groupName cannot be null or empty. public void push(String groupName, String payload, PushConfiguration pushConfiguration) Argument groupName cannot be null or empty. public void removeGroupMember(String groupName, String pushID) Argument groupName cannot be null or empty. Argument pushID cannot be null or empty. public static synchronized PushContext getInstance(ServletContext servletContext) Argument servletContext cannot be null . Marking this one as FIXED.
        Hide
        Ken Fyten added a comment -

        Re-open to correct fix version.

        Show
        Ken Fyten added a comment - Re-open to correct fix version.
        Hide
        Jack Van Ooststroom added a comment -

        Sending core/src/main/java/org/icepush/PushContext.java
        Transmitting file data .
        Committed revision 51369.

        Show
        Jack Van Ooststroom added a comment - Sending core/src/main/java/org/icepush/PushContext.java Transmitting file data . Committed revision 51369.
        Hide
        Jack Van Ooststroom added a comment -

        Re-applied the fixes as they were accidentally removed by revision 51346. Marking this one as FIXED again.

        Show
        Jack Van Ooststroom added a comment - Re-applied the fixes as they were accidentally removed by revision 51346. Marking this one as FIXED again.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: