woo-j / OkapiBarcode

Open-source barcode encoding program written in Java
http://www.okapibarcode.org.uk
Apache License 2.0
327 stars 97 forks source link

Update minimum 421 AI fixed size to 3 #81

Closed gilPts closed 3 years ago

gilPts commented 3 years ago

The referenced rule given in below link shows ^421(\d{3})([\x21-\x22\x25-\x2F\x30-\x39\x3A-\x3F\x41-\x5A\x5F\x61-\x7A]{0,9})$ This indicates a minimum of 3 decimal. https://www.gs1.org/standards/barcodes/application-identifiers/421?lang=en

codecov-io commented 3 years ago

Codecov Report

Merging #81 (7e36fe0) into master (6241651) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #81   +/-   ##
=========================================
  Coverage     78.36%   78.36%           
  Complexity     3710     3710           
=========================================
  Files            59       59           
  Lines         13374    13374           
  Branches       3374     3374           
=========================================
  Hits          10480    10480           
  Misses         2078     2078           
  Partials        816      816           
Impacted Files Coverage Δ Complexity Δ
src/main/java/uk/org/okapibarcode/util/Gs1.java 72.13% <0.00%> (ø) 106.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6241651...7e36fe0. Read the comment docs.

gredler commented 3 years ago

Thanks for the heads up and the PR! I'm surprised that N..? and X..? in the GS1 spec don't require at least one character, but that indeed seems to be case, based on the regex versions published on the GS1 website. Our (incorrect) reading of the spec affects more than just AI 421, so I'm going to merge this PR but also go through and fix the other instances of this same error for other AIs.

gilPts commented 3 years ago

Hello, Thanks for taking care ! Regards