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

wrong parameters order

    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

          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