Xiaoven / codegex

A light-weight tools like spotbugs
GNU Lesser General Public License v2.1
1 stars 0 forks source link

FPs for DLS_OVERWRITTEN_INCREMENT #132

Closed Xiaoven closed 3 years ago

Xiaoven commented 3 years ago
// https://github.com/tcgone/carddb/pull/100/files#diff-6c19d66c31bb9986c633ad36b5edc2518ae400fb7d585b8a99c4cad7e3d6d5ddR394
card.order = order++;
Xiaoven commented 3 years ago
index = ++index % doc.getControllerCount();
Xiaoven commented 3 years ago
// https://github.com/Mu-L/vert.x/pull/128/files/8bd30cde4a8b7e5f63ea99a10995251ecbb70687#diff-ccbefb70e7ef9006abb6030f09cc7168b5cf896063a8493e6b1e13596ebfd491
@@ -2545,7 +2547,9 @@ public void onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers
        @Override
        public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload) {
          int s = status++;

建议只检查 return 语句的自增,这里的 status 也许在后面还有用

// https://github.com/apache/flink/pull/14754/files/0f8924698701b1d6768f8757414d69836b83fa3a#diff-d4ac6d1f1633f171c6469a77205a61227e773d949d9109a3ab5e26a80e61f6e6
@@ -1095,7 +1084,7 @@ public void initFailureCause(Throwable t) {
     */
    void vertexFinished() {
        assertRunningInJobMasterMainThread();
        final int numFinished = ++verticesFinished;
        final int numFinished = ++numFinishedVertices;
Xiaoven commented 3 years ago
    public static void main(String[] args) {
        int i = 3;
        i = i-- + 2;
        System.out.println(i);
//        i=2 + i++;
//        System.out.println(i);
//        i=i++ + i++;
//        System.out.println(i);
    }