You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by GitBox <gi...@apache.org> on 2021/07/28 11:29:31 UTC
[GitHub] [incubator-inlong] dockerzhang opened a new issue #812: [INLONG-213] Optimize code & Minor changes
dockerzhang opened a new issue #812:
URL: https://github.com/apache/incubator-inlong/issues/812
<p>Optimize code</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
List<Message> messageList = <span class="code-keyword">new</span> ArrayList<>();
<span class="code-keyword">if</span> (transferedMessageList == <span class="code-keyword">null</span> || transferedMessageList.isEmpty()) {
<span class="code-keyword">return</span> messageList;
}
change to
<span class="code-keyword">if</span> (transferedMessageList == <span class="code-keyword">null</span> || transferedMessageList.isEmpty()) {
<span class="code-keyword">return</span> <span class="code-keyword">new</span> ArrayList<>();
}
List<Message> messageList = <span class="code-keyword">new</span> ArrayList<>(transferedMessageList.size());
</pre>
</div></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-keyword">for</span> (<span class="code-object">int</span> i; i < 0; i++) {}
change to
<span class="code-keyword">for</span> (<span class="code-object">Object</span> o; objects) {}
</pre>
</div></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<span class="code-object">String</span>.valueOf(consumerGroup).trim();
change to
consumerGroup.trim();
</pre>
</div></div>
<p>etc..</p>
<i>JIRA link - <a href="https://issues.apache.org/jira/browse/INLONG-213">[INLONG-213]</a> created by viviel</i>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] dockerzhang closed issue #812: [INLONG-213] Optimize code & Minor changes
Posted by GitBox <gi...@apache.org>.
dockerzhang closed issue #812:
URL: https://github.com/apache/incubator-inlong/issues/812
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org