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

        Jack Van Ooststroom created issue -
        Jack Van Ooststroom made changes -
        Field Original Value New Value
        Assignee Jack Van Ooststroom [ jack.van.ooststroom ]
        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.
        Jack Van Ooststroom made changes -
        Fix Version/s EE-4.1.0.GA [ 12172 ]
        Fix Version/s 4.2 [ 12871 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #47791 Tue Feb 16 07:49:20 MST 2016 jack.van.ooststroom Fixed JIRA PUSH-381 : Add checks for illegal arguments to the PushContext
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/PushContext.java
        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.
        Jack Van Ooststroom made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s EE-4.1.0.BETA [ 13073 ]
        Fix Version/s 4.2 [ 12871 ]
        Ken Fyten made changes -
        Fix Version/s 4.2.BETA [ 13092 ]
        Fix Version/s 4.2 [ 12871 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Ken Fyten added a comment -

        Re-open to correct fix version.

        Show
        Ken Fyten added a comment - Re-open to correct fix version.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-4.2.0.GA [ 13074 ]
        Fix Version/s 4.2 [ 12871 ]
        Fix Version/s 4.2.BETA [ 13092 ]
        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.
        Jack Van Ooststroom made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #51369 Tue Mar 21 16:44:48 MDT 2017 jack.van.ooststroom Re-apply fixes for PUSH-381 as they were accidentally removed by revision 51346
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-core-4.x-maintenance/icepush/core/src/main/java/org/icepush/PushContext.java

          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: