mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Correctly configure findbugs, add excludes, fix a few simple warnings
This commit is contained in:
parent
8364bf02ea
commit
cef513e790
|
@ -75,7 +75,7 @@ public final class Code39Writer extends OneDimensionalCodeWriter {
|
|||
pos += appendPattern(result, pos, narrowWhite, false);
|
||||
}
|
||||
toIntArray(Code39Reader.CHARACTER_ENCODINGS[39], widths);
|
||||
pos += appendPattern(result, pos, widths, true);
|
||||
appendPattern(result, pos, widths, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ public final class EAN13Writer extends UPCEANWriter {
|
|||
int digit = Integer.parseInt(contents.substring(i, i + 1));
|
||||
pos += appendPattern(result, pos, UPCEANReader.L_PATTERNS[digit], true);
|
||||
}
|
||||
pos += appendPattern(result, pos, UPCEANReader.START_END_PATTERN, true);
|
||||
appendPattern(result, pos, UPCEANReader.START_END_PATTERN, true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public final class EAN8Writer extends UPCEANWriter {
|
|||
int digit = Integer.parseInt(contents.substring(i, i + 1));
|
||||
pos += appendPattern(result, pos, UPCEANReader.L_PATTERNS[digit], true);
|
||||
}
|
||||
pos += appendPattern(result, pos, UPCEANReader.START_END_PATTERN, true);
|
||||
appendPattern(result, pos, UPCEANReader.START_END_PATTERN, true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -257,12 +257,6 @@
|
|||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<configuration>
|
||||
<threshold>Normal</threshold>
|
||||
<effort>Max</effort>
|
||||
<xmlOutput>true</xmlOutput>
|
||||
<xmlOutputDirectory>target/site</xmlOutputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -346,6 +340,13 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<threshold>Normal</threshold>
|
||||
<effort>Max</effort>
|
||||
<xmlOutput>true</xmlOutput>
|
||||
<xmlOutputDirectory>target/site</xmlOutputDirectory>
|
||||
<excludeFilterFile>src/findbugs/excludes.xml</excludeFilterFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
33
src/findbugs/excludes.xml
Normal file
33
src/findbugs/excludes.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2014 ZXing authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Or>
|
||||
<Bug pattern="EI_EXPOSE_REP"/>
|
||||
<Bug pattern="EI_EXPOSE_REP2"/>
|
||||
<Bug pattern="EI_EXPOSE_STATIC_REP2"/>
|
||||
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
|
||||
<Bug pattern="SE_NO_SERIALVERSIONID"/>
|
||||
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
|
||||
|
||||
<Bug pattern=""/>
|
||||
<Bug pattern=""/>
|
||||
<Bug pattern=""/>
|
||||
|
||||
</Or>
|
||||
</Match>
|
||||
</FindBugsFilter>
|
|
@ -22,7 +22,7 @@
|
|||
<skin>
|
||||
<groupId>org.apache.maven.skins</groupId>
|
||||
<artifactId>maven-fluido-skin</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<version>1.3.1</version>
|
||||
</skin>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue