mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Removing the forced content limit check for Code128Writer.java (#1675)
* Update Code128Writer.java Removing the force content limit check as per https://github.com/zxing/zxing/issues/1672 * Update Code128Writer.java
This commit is contained in:
parent
012ee963ae
commit
fc2f1c9b0f
|
@ -82,13 +82,6 @@ public final class Code128Writer extends OneDimensionalCodeWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int check(String contents, Map<EncodeHintType,?> hints) {
|
private static int check(String contents, Map<EncodeHintType,?> hints) {
|
||||||
int length = contents.length();
|
|
||||||
// Check length
|
|
||||||
if (length < 1 || length > 80) {
|
|
||||||
throw new IllegalArgumentException(
|
|
||||||
"Contents length should be between 1 and 80 characters, but got " + length);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for forced code set hint.
|
// Check for forced code set hint.
|
||||||
int forcedCodeSet = -1;
|
int forcedCodeSet = -1;
|
||||||
if (hints != null && hints.containsKey(EncodeHintType.FORCE_CODE_SET)) {
|
if (hints != null && hints.containsKey(EncodeHintType.FORCE_CODE_SET)) {
|
||||||
|
@ -109,6 +102,7 @@ public final class Code128Writer extends OneDimensionalCodeWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check content
|
// Check content
|
||||||
|
int length = contents.length();
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
char c = contents.charAt(i);
|
char c = contents.charAt(i);
|
||||||
// check for non ascii characters that are not special GS1 characters
|
// check for non ascii characters that are not special GS1 characters
|
||||||
|
|
Loading…
Reference in a new issue