You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Jacob Liu (JIRA)" <ji...@apache.org> on 2017/04/18 09:49:41 UTC
[jira] [Created] (STORM-2483) wrong parameters order
Jacob Liu created STORM-2483:
--------------------------------
Summary: wrong parameters order
Key: STORM-2483
URL: https://issues.apache.org/jira/browse/STORM-2483
Project: Apache Storm
Issue Type: Bug
Components: storm-core
Affects Versions: 1.0.3
Environment: storm-core:1.0.3
Reporter: Jacob Liu
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);
}
bug 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);
}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)