summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/asn1
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-04-05 11:19:47 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2022-04-05 11:19:47 +0200
commit922076d807974cefa6ade28f689a20f1a90fddeb (patch)
tree4aa039e426f36ac10470f08f21d07d0493695987 /src/main/java/org/uic/barcode/asn1
parent- use different module names in ASN.1 (diff)
downloadUIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar.gz
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar.bz2
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar.lz
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar.xz
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.tar.zst
UIC-barcode-922076d807974cefa6ade28f689a20f1a90fddeb.zip
Diffstat (limited to 'src/main/java/org/uic/barcode/asn1')
-rw-r--r--src/main/java/org/uic/barcode/asn1/datatypes/Asn1SequenceOf.java8
-rw-r--r--src/main/java/org/uic/barcode/asn1/uper/StringCoder.java8
2 files changed, 5 insertions, 11 deletions
diff --git a/src/main/java/org/uic/barcode/asn1/datatypes/Asn1SequenceOf.java b/src/main/java/org/uic/barcode/asn1/datatypes/Asn1SequenceOf.java
index 4924b50..8e24222 100644
--- a/src/main/java/org/uic/barcode/asn1/datatypes/Asn1SequenceOf.java
+++ b/src/main/java/org/uic/barcode/asn1/datatypes/Asn1SequenceOf.java
@@ -3,8 +3,7 @@ package org.uic.barcode.asn1.datatypes;
import java.lang.reflect.ParameterizedType;
import java.util.*;
-import org.uic.barcode.logger.Logger;
-import org.uic.barcode.logger.LoggerFactory;
+import org.uic.barcode.asn1.uper.UperEncoder;
/**
@@ -35,8 +34,7 @@ import org.uic.barcode.logger.LoggerFactory;
* @param <T> type of elements contained.
*/
public abstract class Asn1SequenceOf<T> extends AbstractList<T> {
- private final static Logger logger = LoggerFactory.getLogger("asnLogger");
-
+
private final List<T> bakingList;
@Override public T get(int index) { return bakingList.get(index); }
@@ -45,7 +43,7 @@ public abstract class Asn1SequenceOf<T> extends AbstractList<T> {
public Asn1SequenceOf() { this(new ArrayList<T>()); }
public Asn1SequenceOf(Collection<T> coll) {
- logger.debug(String.format("Instantiating Sequence Of %s with %s",
+ UperEncoder.logger.debug(String.format("Instantiating Sequence Of %s with %s",
((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0],
coll));
bakingList = new ArrayList<>(coll);
diff --git a/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java b/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
index a504096..94e0aad 100644
--- a/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
+++ b/src/main/java/org/uic/barcode/asn1/uper/StringCoder.java
@@ -17,14 +17,10 @@ import org.uic.barcode.asn1.datatypes.DefaultAlphabet;
import org.uic.barcode.asn1.datatypes.FixedSize;
import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.SizeRange;
-import org.uic.barcode.logger.Logger;
-import org.uic.barcode.logger.LoggerFactory;
class StringCoder implements Decoder, Encoder {
- private static final Logger LOGGER = LoggerFactory.getLogger("asnLogger");
-
@Override public <T> boolean canEncode(T obj, Annotation[] extraAnnotations) {
return obj instanceof String || obj instanceof Asn1String;
}
@@ -231,7 +227,7 @@ class StringCoder implements Decoder, Encoder {
try {
chars = UperEncoder.instantiate(restriction.alphabet()).chars().toCharArray();
} catch (IllegalArgumentException e) {
- LOGGER.info("Uninstantinatable alphabet ", e);
+ UperEncoder.logger.info("Uninstantinatable alphabet ", e);
throw new IllegalArgumentException("Uninstantinatable alphabet" + restriction.alphabet().getName());
}
if (BigInteger.valueOf(chars.length - 1).bitLength() < BigInteger.valueOf(126)
@@ -293,7 +289,7 @@ class StringCoder implements Decoder, Encoder {
try {
chars = UperEncoder.instantiate(restrictionAnnotation.alphabet()).chars().toCharArray();
} catch (IllegalArgumentException e) {
- LOGGER.info("Uninstantinatable alphabet ", e);
+ UperEncoder.logger.info("Uninstantinatable alphabet ", e);
throw new IllegalArgumentException("Uninstantinatable alphabet " + restrictionAnnotation.alphabet().getName());
}
if (BigInteger.valueOf(chars.length - 1).bitLength() < BigInteger.valueOf(126)