k31*_*159 5 java static-analysis intellij-idea
我正在查看来自https://github.com/apache/kafka 的ProducerPerformance.java 。
查看文件的这一部分:
byte[] payload = null;
Random random = new Random(0);
if (recordSize != null) {
payload = new byte[recordSize];
for (int i = 0; i < payload.length; ++i)
payload[i] = (byte) (random.nextInt(26) + 65);
}
Run Code Online (Sandbox Code Playgroud)
有一个检查说“条件i < payload.length总是错误的”。
我不明白它怎么可能总是假的。recordSize是Integer来自命令行参数。有什么我在这里看不到的吗?
| 归档时间: |
|
| 查看次数: |
117 次 |
| 最近记录: |