Terms of Service | Privacy Policy | Cookie Policy

Commit 71e94344 authored by Uwe Plonus's avatar Uwe Plonus
Browse files

Merge branch 'master' into 'master'

Adjusted image to new infrastructure

See merge request !2
parents 4a7398ba 48d86a55
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ variables:

pages:
  stage: deploy
  image: $CI_REGISTRY/sw4j-net/jdk8-maven3/master:latest
  image: $CI_REGISTRY/sw4j-net/jdk8-maven3:latest
  only:
    refs:
      - master
@@ -20,7 +20,7 @@ pages:

jdk11:
  stage: deploy
  image: $CI_REGISTRY/sw4j-net/jdk11-maven3/master:latest
  image: $CI_REGISTRY/sw4j-net/jdk11-maven3:latest
  only:
    refs:
      - master
+11 −1
Original line number Diff line number Diff line
@@ -49,7 +49,8 @@
    <spotbugs-version>3.1.8</spotbugs-version>
    <spotbugs-plugin-version>3.1.7</spotbugs-plugin-version>
    <fluido.skin.version>1.7</fluido.skin.version>
    <jxr-plugin-version>3.0.0</jxr-plugin-version>
    <!-- No update to JXR plugin version 3.0.0 because this version has a bug that renders the classes incorrect -->
    <jxr-plugin-version>2.5</jxr-plugin-version>
    <site-plugin-version>3.7.1</site-plugin-version>

    <!-- Reporting Plugins -->
@@ -61,6 +62,10 @@
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
    </dependency>
  </dependencies>

  <dependencyManagement>
@@ -70,6 +75,11 @@
        <artifactId>jsr305</artifactId>
        <version>${jsr305-version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-annotations</artifactId>
        <version>${spotbugs-version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

+15 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
 */
package org.sw4j.examples.bitoperation;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
 * Example for "BIT: Check for sign of bitwise operation" {@code (BIT_SIGNED_CHECK)}.
 */
@@ -23,9 +25,22 @@ public class CheckSign {

    private static final int FLAG = 0x40000000;

    private static final int HIGHEST_FLAG = 0x80000000;

    public boolean bug(int value) {
        boolean flagSet = ((value & FLAG) > 0);
        return flagSet;
    }

    public boolean highBitBug(int value) {
        boolean flagSet = ((value & HIGHEST_FLAG) > 0);
        return flagSet;
    }

    @SuppressFBWarnings(value="BIT_SIGNED_CHECK")
    public boolean suppressedBug(int value) {
        boolean flagSet = ((value & FLAG) > 0);
        return flagSet;
    }

}
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 Uwe Plonus
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.sw4j.examples.clone;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
 * Example for "CN: Class implements Cloneable but does not define or use clone method" {@code (CN_IDIOM)}.
 */
@SuppressFBWarnings(value="CN_IDIOM")
public class SuppressNoClone implements Cloneable {

}
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 Uwe Plonus
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.sw4j.examples.clone;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
 * Example for "CN: Class defines clone() but doesn't implement Cloneable" {@code (CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE)}.
 */
@SuppressFBWarnings(value="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE")
public class SuppressNoCloneable {

    @Override
    public Object clone() {
        return new SuppressNoCloneable();
    }

}
Loading