Commit graph

71 commits

Author SHA1 Message Date
Sean Owen b8c3d08e19
Closes #738 : fix UPC-E encoding with system 1 2017-01-06 14:17:48 +00:00
Sean Owen 0dfda08078
Fix typos; avoid use of java.util.Date; other small improvements from inspection; deprecate some accidentally-public methods 2016-11-29 12:16:07 +00:00
Sean Owen 24681e8488
Partial fix for #679: UPC/EAN min quiet zone is 9 modules for encoding 2016-09-30 20:04:34 -05:00
Sean Owen 2d02cb05ea
Partial fix for #679: add check digit if absent in UPC-A/E EAN-13/8 encoding, and reject those with invalid check digit 2016-09-30 17:41:40 -05:00
Sean Owen 75c51f93fe
Update lax count for qr code 2 2016-09-30 17:41:01 -05:00
Sean Owen 1a444601d9 Move gh-pages branch into docs/, fix/overhaul site gen and javadoc, and regenerate site for 3.2.2-SNAPSHOT 2016-09-11 20:52:01 +01:00
Sean Owen 30dc420bab More coverage for Code93/39 writers, and for multiple barcode detection 2016-09-11 13:44:13 +01:00
Sean Owen 0718d8a45f A little more coverage for PDF417 writer and multi QR code 2016-09-11 09:51:20 +01:00
Sean Owen 28c3288094 Add more tests to better cover DataMatrix, Maxicode decoding 2016-09-10 17:36:02 +01:00
Sean Owen 75d6000c1d Add 'getNumBits' to Result objects to return when not all bits of the raw byte representation are valid (#664) 2016-09-09 18:44:09 +01:00
Sean Owen b639d5748d Deprecate MonochromeRectangleDetector and more coverage-related improvements 2016-09-05 21:00:59 +01:00
Sean Owen 0895b3cefa Improve code coverage in some core classes, plus fix a small BitMatrix bug 2016-09-05 17:29:59 +01:00
Sean Owen ba6ce9fb25 Minor follow on to last QR code version hint commit 2016-08-08 11:30:18 +01:00
germinator d60c0f14bd Add ability to specify a QR code version hint. (#637)
* Add ability to specify a QR code version hint.

* Checkstyle.
2016-08-08 11:22:35 +01:00
fgrieu b708f95a87 Aztec decoder fix: return to Upper mode after U/S B/S sequence. (#643)
* Update Decoder.java

* Add files via upload

dlusbs.png and dlusbs.txt is a test case for the D/L [digit] U/S B/S sequence, which should end in Upper mode, not Digit mode

* Update number of test cases

* Comment logic of the fix

* Mention fixed issue #642
2016-08-08 09:09:53 +01:00
Sean Owen 2f11529aa3 A bunch of inspection changes, including some dead code removal and tightening visibility, removing unnecessary casts 2016-07-24 18:29:42 +01:00
Sean Owen d3dd1827ba Don't interpret very long strings.with.dots.like.this to be interpreted as URIs 2016-07-08 15:21:18 +01:00
Sean Owen 7e2d7c0b21 Crush some PNGs that could benefit from it 2016-07-02 14:13:11 +01:00
Sean Owen 08e5431d99 Implement more style checks around whitespace 2016-06-24 10:28:00 +01:00
Sebastian Buchwald ee150757ec Fix typo (#615) 2016-06-21 21:20:16 +01:00
Sean Owen 389f69f4b2 Add minimal javadoc to all classes (and enforce with checkstyle); minor refactoring to of array sum code 2016-06-04 15:36:32 +01:00
Nayuki 7cf49565c2 Simplified pieces of code (#601)
* Simplify code in bit-twiddling methods, using APIs introduced in Java 5.

* Align code by adjusting whitespace and adding `+0`.

* Convert qrcode DataMask to enum to reduce source code size, which shouldn't change behavior.

* Simplify lists of character constants using string initializer instead of array.

* Remove redundant `+ 0` operations from a recent change.

* Delete the function DataMask.forReference() and inline the logic into all its callers.
2016-05-25 06:46:44 -05:00
Sean Owen c2eb20d976 Compute locale-specific expected date strings in test for JDK 9 compatibility 2016-05-23 07:18:48 -05:00
Taneli Huuskonen f0dfcdfed5 Fix for bug #593
* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Fixed bug #593

Bug #593 was misleadingly reported as pertaining to another project, but
testing revealed it affected this project as well.  The Code128 encoding
algorithm failed when an odd number of digits were followed by FNC1 and
other digits.  The code selection algorithm was rewritten.  A test case
showing the bug was added, and an old test case was updated to expect
the result of the new algorithm  -  another valid encoding of the same
length as the old one.

* Cleaning up

Added a private enum and changed some names to improve readability.
Also some trivial cosmetic changes.

* Further cleanup of Code128 writer test

Removed a private one-liner method used exactly once, alphabetized
imports.
2016-05-08 15:01:41 +01:00
Sean Owen 30bb62bf4f Minor changes from inspection 2016-05-08 09:13:41 +01:00
Taneli Huuskonen ee48b3e5d3 Cleaned up previous commit
Following Sean Owen's suggestions, I cleaned up my code in the Aztec
decoder and its tests as follows:

1. Made convertBoolArrayToByteArray() package-private.
2. Replaced my own assertEqualByteArrays() with existing
   assertArrayEquals().
3. Replaced C-style array declarations with more Javaish ones.
2016-05-05 21:58:37 +03:00
Taneli Huuskonen e9896d03a6 Aztec decoder returns raw bytes
The Aztec decoder now packs the code bits into bytes and returns them as
"raw bytes", even though the error correction codes and stuffing have
been already removed.  Also added a couple of tests for the byte-packing
function.
2016-05-05 15:10:44 +03:00
Sean Owen 308d91de1c Update plugins, dependencies, and clean up small code inspection issues 2016-01-21 14:46:48 +01:00
sato yoshiyuki 585f77bf39 QRCode Encoder: Support NUMERIC/ALPHANUMERIC Mode in Shift_JIS 2015-12-03 00:12:43 +09:00
wood a2159ed0f4 change the comment
Change the comment
2015-10-02 00:23:07 +08:00
Guenther Grau 825a31e4b5 Ignore additional PDF417 barcode rows
Some barcode generators (e.g. Okapi) seem to generate additional barcode
rows at the end of the barcode, which can be decoded as valid barcode
rows, but actually contain garbage. The barcode metadata states that
these additional rows are not part of the barcode. So we ignore those
addional rows when parsing the barcode. This could potentially also
happen (though quite unlikely) if data after the barcode looks like a
barcode row.
2015-09-01 14:12:17 +02:00
Sean Owen 3b8ab085d8 Merge pull request #412 from strguntbr/multibyteFix
Fixed substring call
2015-07-02 17:15:42 +01:00
Marcus Winkler 18a72279dd Added unittest for PDF417 encoder using ISO-8859-1 with special chars 2015-07-02 17:55:00 +02:00
Sean Owen 02d3697a59 Remove spurious stack trace from singleton exception, and various minor edits 2015-06-06 10:46:18 +01:00
Sean Owen ea9a260f0a Fix javadoc 8 error; actually enable enforcer; update plugins 2015-05-25 23:54:50 +01:00
Marcus Winkler 060010253c Added unit test for multibyte problem 2015-05-20 13:00:38 +02:00
Sean Owen 8bae23a923 Revert another change that causes a whirr failure, fix rat warnings, and one more error on Android generated files 2015-05-15 16:23:18 +01:00
Sean Owen 867d580e66 Enable RAT check in build; enable checkstyle; fix some violations; update Jetty/Android plugin 2015-05-15 15:44:45 +01:00
Sean Owen ec9487c0b2 Fixes from coverity 2015-05-13 13:04:43 +01:00
Sean Owen 8475bf6fd2 Remove system-dependent line separator logic in BitMatrix 2015-02-23 16:08:44 +00:00
Sean Owen 625d9b77d7 Additional fix for issue #300 (HT micjahn) 2015-02-06 21:39:28 +00:00
Sean Owen 4b02337709 Issue #300 : simplify X12 encodation at end of input stream to fix unlatch issue. HT micjahn 2015-02-04 07:45:35 -06:00
Sean Owen 0fc1a267c0 Tiny fixes from coverity; fix SuppressWarnings for deprecation; just one Java 7 build now 2015-01-11 16:15:14 +00:00
Sean Owen d876b3e178 Follow up on commit for issue #242 2014-10-30 21:40:02 +00:00
Mark b04edfec68 squash changes 2014-10-27 18:35:26 +01:00
Sean Owen 79bd5f585e Add simple test for PDF417 high level encoder 2014-10-06 23:01:40 +01:00
Sean Owen 9dfeb03611 Add simple test to try codecov.io 2014-10-02 20:43:48 +01:00
Sean Owen 3b0145dbc8 Fix tiny java 8 javadoc warnings 2014-09-02 16:39:33 +01:00
Sean Owen e4ff7d9bb9 Issue #197 : handle escaped backslash preceding terminator 2014-07-30 12:18:04 +01:00
Sean Owen 8158984458 Support multiple "to", and CC and BCC, throughout the email result API. 2014-07-25 22:53:17 +01:00