Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2483

wrong parameters order

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      org.apache.storm.utils.Utils#getGlobalStreamId has wrong parameters order:

      public static GlobalStreamId getGlobalStreamId(String streamId, String componentId) {
      if (componentId == null)

      { return new GlobalStreamId(streamId, DEFAULT_STREAM_ID); }

      return new GlobalStreamId(streamId, componentId);
      }

      but GlobalStreamId constructor is: public GlobalStreamId(
      String componentId,
      String streamId)

      so i think the nice code is:
      public static GlobalStreamId getGlobalStreamId(String streamId, String componentId) {
      if (streamId == null)

      { return new GlobalStreamId(componentId, DEFAULT_STREAM_ID); }

      return new GlobalStreamId(componentId, streamId);
      }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nd368 Nathan Day
            Jacobxy Jacob Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m

                Slack

                  Issue deployment