mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Issue 1694 NPE when no hints
git-svn-id: https://zxing.googlecode.com/svn/trunk@2812 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2ecec34f74
commit
71d7987c28
|
@ -37,8 +37,8 @@ public final class AztecWriter implements Writer {
|
|||
|
||||
@Override
|
||||
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) {
|
||||
String charset = (String) hints.get(EncodeHintType.CHARACTER_SET);
|
||||
Number eccPercent = (Number) hints.get(EncodeHintType.ERROR_CORRECTION);
|
||||
String charset = hints == null ? null : (String) hints.get(EncodeHintType.CHARACTER_SET);
|
||||
Number eccPercent = hints == null ? null : (Number) hints.get(EncodeHintType.ERROR_CORRECTION);
|
||||
return encode(contents,
|
||||
format,
|
||||
charset == null ? DEFAULT_CHARSET : Charset.forName(charset),
|
||||
|
|
Loading…
Reference in a new issue