PDFBOX-4671: removed info logs from checkInput
diff --git a/src/main/java/org/apache/pdfbox/jbig2/segments/GenericRegion.java b/src/main/java/org/apache/pdfbox/jbig2/segments/GenericRegion.java
index 9d949a2..9ba2504 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/GenericRegion.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/GenericRegion.java
@@ -27,8 +27,6 @@
import org.apache.pdfbox.jbig2.decoder.mmr.MMRDecompressor;
import org.apache.pdfbox.jbig2.err.InvalidHeaderValueException;
import org.apache.pdfbox.jbig2.io.SubInputStream;
-import org.apache.pdfbox.jbig2.util.log.Logger;
-import org.apache.pdfbox.jbig2.util.log.LoggerFactory;
/**
* This class represents a generic region segment.<br>
@@ -37,9 +35,6 @@
*/
public class GenericRegion implements Region
{
-
- private final Logger log = LoggerFactory.getLogger(GenericRegion.class);
-
private SubInputStream subInputStream;
private long dataHeaderOffset;
private long dataHeaderLength;
@@ -135,8 +130,6 @@
/* Segment data structure */
computeSegmentDataStructure();
-
- this.checkInput();
}
private void readGbAtPixels(final int amountOfGbAt) throws IOException
@@ -158,17 +151,6 @@
dataLength = subInputStream.length() - dataHeaderLength;
}
- private void checkInput() throws InvalidHeaderValueException
- {
- if (isMMREncoded)
- {
- if (gbTemplate != 0)
- {
- log.info("gbTemplate should contain the value 0");
- }
- }
- }
-
/**
* The procedure is described in 6.2.5.7, page 17.
*
diff --git a/src/main/java/org/apache/pdfbox/jbig2/segments/HalftoneRegion.java b/src/main/java/org/apache/pdfbox/jbig2/segments/HalftoneRegion.java
index 651f4b7..ddac8d9 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/HalftoneRegion.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/HalftoneRegion.java
@@ -28,8 +28,6 @@
import org.apache.pdfbox.jbig2.image.Bitmaps;
import org.apache.pdfbox.jbig2.io.SubInputStream;
import org.apache.pdfbox.jbig2.util.CombinationOperator;
-import org.apache.pdfbox.jbig2.util.log.Logger;
-import org.apache.pdfbox.jbig2.util.log.LoggerFactory;
/**
* This class represents the data of segment type "Halftone region". Parsing is described in 7.4.5, page 67. Decoding
@@ -38,8 +36,6 @@
public class HalftoneRegion implements Region
{
- private final Logger log = LoggerFactory.getLogger(HalftoneRegion.class);
-
private SubInputStream subInputStream;
private SegmentHeader segmentHeader;
private long dataHeaderOffset;
@@ -135,8 +131,6 @@
/* Segment data structure */
computeSegmentDataStructure();
-
- this.checkInput();
}
private void computeSegmentDataStructure() throws IOException
@@ -146,22 +140,6 @@
dataLength = subInputStream.length() - dataHeaderLength;
}
- private void checkInput() throws InvalidHeaderValueException
- {
- if (isMMREncoded)
- {
- if (hTemplate != 0)
- {
- log.info("hTemplate = " + hTemplate + " (should contain the value 0)");
- }
-
- if (hSkipEnabled)
- {
- log.info("hSkipEnabled 0 " + hSkipEnabled + " (should contain the value false)");
- }
- }
- }
-
/**
* The procedure is described in JBIG2 ISO standard, 6.6.5.
*
diff --git a/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java b/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
index dccb7cc..a4261e9 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
@@ -27,8 +27,6 @@
import org.apache.pdfbox.jbig2.err.InvalidHeaderValueException;
import org.apache.pdfbox.jbig2.image.Bitmaps;
import org.apache.pdfbox.jbig2.io.SubInputStream;
-import org.apache.pdfbox.jbig2.util.log.Logger;
-import org.apache.pdfbox.jbig2.util.log.LoggerFactory;
/**
* This class represents the segment type "Pattern dictionary", 7.4.4.
@@ -36,8 +34,6 @@
public class PatternDictionary implements Dictionary
{
- private final Logger log = LoggerFactory.getLogger(PatternDictionary.class);
-
private SubInputStream subInputStream;
/** Segment data structure (only necessary if MMR is used) */
@@ -129,14 +125,6 @@
{
throw new InvalidHeaderValueException("Width/Heigth must be greater than zero.");
}
-
- if (isMMREncoded)
- {
- if (hdTemplate != 0)
- {
- log.info("hdTemplate should contain the value 0");
- }
- }
}
/**
diff --git a/src/main/java/org/apache/pdfbox/jbig2/segments/SymbolDictionary.java b/src/main/java/org/apache/pdfbox/jbig2/segments/SymbolDictionary.java
index 9a50c2b..0931c53 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/SymbolDictionary.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/SymbolDictionary.java
@@ -292,37 +292,21 @@
private void checkInput() throws InvalidHeaderValueException
{
- if (sdHuffDecodeHeightSelection == 2)
- {
- log.info("sdHuffDecodeHeightSelection = " + sdHuffDecodeHeightSelection
- + " (value not permitted)");
- }
-
- if (sdHuffDecodeWidthSelection == 2)
- {
- log.info("sdHuffDecodeWidthSelection = " + sdHuffDecodeWidthSelection
- + " (value not permitted)");
- }
-
if (isHuffmanEncoded)
{
if (sdTemplate != 0)
{
- log.info("sdTemplate = " + sdTemplate + " (should be 0)");
sdTemplate = 0;
}
if (!useRefinementAggregation)
{
if (isCodingContextRetained)
{
- log.info("isCodingContextRetained = " + isCodingContextRetained
- + " (should be 0)");
isCodingContextRetained = false;
}
if (isCodingContextUsed)
{
- log.info("isCodingContextUsed = " + isCodingContextUsed + " (should be 0)");
isCodingContextUsed = false;
}
}
@@ -332,17 +316,14 @@
{
if (sdHuffBMSizeSelection != 0)
{
- log.info("sdHuffBMSizeSelection should be 0");
sdHuffBMSizeSelection = 0;
}
if (sdHuffDecodeWidthSelection != 0)
{
- log.info("sdHuffDecodeWidthSelection should be 0");
sdHuffDecodeWidthSelection = 0;
}
if (sdHuffDecodeHeightSelection != 0)
{
- log.info("sdHuffDecodeHeightSelection should be 0");
sdHuffDecodeHeightSelection = 0;
}
}
@@ -351,7 +332,6 @@
{
if (sdrTemplate != 0)
{
- log.info("sdrTemplate = " + sdrTemplate + " (should be 0)");
sdrTemplate = 0;
}
}
@@ -360,8 +340,6 @@
{
if (sdHuffAggInstanceSelection != 0)
{
- log.info("sdHuffAggInstanceSelection = " + sdHuffAggInstanceSelection
- + " (should be 0)");
sdHuffAggInstanceSelection = 0;
}
}
diff --git a/src/main/java/org/apache/pdfbox/jbig2/segments/TextRegion.java b/src/main/java/org/apache/pdfbox/jbig2/segments/TextRegion.java
index ee54d12..3d834e9 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/TextRegion.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/TextRegion.java
@@ -292,7 +292,6 @@
{
if (sbrTemplate != 0)
{
- log.info("sbrTemplate should be 0");
sbrTemplate = 0;
}
}
@@ -308,27 +307,22 @@
{
if (sbHuffRSize != 0)
{
- log.info("sbHuffRSize should be 0");
sbHuffRSize = 0;
}
if (sbHuffRDY != 0)
{
- log.info("sbHuffRDY should be 0");
sbHuffRDY = 0;
}
if (sbHuffRDX != 0)
{
- log.info("sbHuffRDX should be 0");
sbHuffRDX = 0;
}
if (sbHuffRDWidth != 0)
{
- log.info("sbHuffRDWidth should be 0");
sbHuffRDWidth = 0;
}
if (sbHuffRDHeight != 0)
{
- log.info("sbHuffRDHeight should be 0");
sbHuffRDHeight = 0;
}
}