mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 19:57:27 -08:00
Enable some additional checkstyle rules
This commit is contained in:
parent
389f69f4b2
commit
032e1547ae
|
@ -446,7 +446,7 @@ public abstract class ResultHandler {
|
|||
* Like {@link #launchIntent(Intent)} but will tell you if it is not handle-able
|
||||
* via {@link ActivityNotFoundException}.
|
||||
*
|
||||
* @throws ActivityNotFoundException
|
||||
* @throws ActivityNotFoundException if Intent can't be handled
|
||||
*/
|
||||
final void rawLaunchIntent(Intent intent) {
|
||||
if (intent != null) {
|
||||
|
|
|
@ -307,12 +307,12 @@ public final class BitArray implements Cloneable {
|
|||
// now correct the int's if the bit size isn't a multiple of 32
|
||||
if (size != oldBitsLen * 32) {
|
||||
int leftOffset = oldBitsLen * 32 - size;
|
||||
int currentInt = (newBits[0] >>> leftOffset);
|
||||
int currentInt = newBits[0] >>> leftOffset;
|
||||
for (int i = 1; i < oldBitsLen; i++) {
|
||||
int nextInt = newBits[i];
|
||||
currentInt |= nextInt << (32 - leftOffset);
|
||||
newBits[i - 1] = currentInt;
|
||||
currentInt = (nextInt >>> leftOffset);
|
||||
currentInt = nextInt >>> leftOffset;
|
||||
}
|
||||
newBits[oldBitsLen - 1] = currentInt;
|
||||
}
|
||||
|
|
|
@ -179,7 +179,6 @@ public final class ITFReader extends OneDReader {
|
|||
* @param row row of black/white values to search
|
||||
* @return Array, containing index of start of 'start block' and end of
|
||||
* 'start block'
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
int[] decodeStart(BitArray row) throws NotFoundException {
|
||||
int endStart = skipWhiteSpace(row);
|
||||
|
@ -208,7 +207,7 @@ public final class ITFReader extends OneDReader {
|
|||
*
|
||||
* @param row bit array representing the scanned barcode.
|
||||
* @param startPattern index into row of the start or end pattern.
|
||||
* @throws NotFoundException if the quiet zone cannot be found, a ReaderException is thrown.
|
||||
* @throws NotFoundException if the quiet zone cannot be found
|
||||
*/
|
||||
private void validateQuietZone(BitArray row, int startPattern) throws NotFoundException {
|
||||
|
||||
|
@ -252,7 +251,6 @@ public final class ITFReader extends OneDReader {
|
|||
* @param row row of black/white values to search
|
||||
* @return Array, containing index of start of 'end block' and end of 'end
|
||||
* block'
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
int[] decodeEnd(BitArray row) throws NotFoundException {
|
||||
|
||||
|
|
|
@ -83,6 +83,9 @@ public abstract class AbstractRSSReader extends OneDReader {
|
|||
throw NotFoundException.getNotFoundInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated call {@link MathUtils#sum(int[])}
|
||||
*/
|
||||
@Deprecated
|
||||
protected static int count(int[] array) {
|
||||
return MathUtils.sum(array);
|
||||
|
|
|
@ -42,6 +42,9 @@ public final class PDF417Common {
|
|||
private PDF417Common() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated call {@link MathUtils#sum(int[])}
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getBitCountSum(int[] moduleBitCount) {
|
||||
return MathUtils.sum(moduleBitCount);
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
<!-- <module name="LocalVariableName"/> -->
|
||||
<module name="MemberName"/>
|
||||
<module name="MethodName"/>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="PackageName"/>
|
||||
<!-- <module name="ParameterName"/> -->
|
||||
<module name="StaticVariableName"/>
|
||||
|
@ -97,6 +98,7 @@
|
|||
<!-- Checks for imports -->
|
||||
<!-- See http://checkstyle.sf.net/config_import.html -->
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="AvoidStaticImport"/>
|
||||
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports"/>
|
||||
|
@ -124,6 +126,7 @@
|
|||
<module name="TypecastParenPad"/>
|
||||
<!-- <module name="WhitespaceAfter"/> -->
|
||||
<!-- <module name="WhitespaceAround"/> -->
|
||||
<module name="UnnecessaryParentheses"/>
|
||||
|
||||
|
||||
<!-- Modifier Checks -->
|
||||
|
@ -147,14 +150,19 @@
|
|||
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||||
<!--<module name="AvoidInlineConditionals"/>-->
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="EqualsAvoidNull"/>
|
||||
<module name="EqualsHashCode"/>
|
||||
<!--<module name="HiddenField"/>-->
|
||||
<module name="IllegalInstantiation"/>
|
||||
<!-- <module name="InnerAssignment"/> -->
|
||||
<!-- <module name="MagicNumber"/> -->
|
||||
<!-- <module name="MissingSwitchDefault"/> -->
|
||||
<module name="MissingDeprecated"/>
|
||||
<module name="MissingOverride"/>
|
||||
<module name="DefaultComesLast"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
<module name="StringLiteralEquality"/>
|
||||
|
||||
<!-- Checks for class design -->
|
||||
<!-- See http://checkstyle.sf.net/config_design.html -->
|
||||
|
@ -162,12 +170,15 @@
|
|||
<module name="FinalClass"/>
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
<module name="InterfaceIsType"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="SuperFinalize"/>
|
||||
<!-- <module name="VisibilityModifier"/> -->
|
||||
|
||||
|
||||
<!-- Miscellaneous other checks. -->
|
||||
<!-- See http://checkstyle.sf.net/config_misc.html -->
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<!--<module name="FinalParameters"/>-->
|
||||
<!-- <module name="TodoComment"/> -->
|
||||
<module name="UpperEll"/>
|
||||
|
|
Loading…
Reference in a new issue