Update JAI ImageIO for JDK 9; other trivial inspection and plugin updates

This commit is contained in:
Sean Owen 2018-04-24 11:31:57 -05:00
parent 274159117a
commit 553b5e97a3
5 changed files with 11 additions and 9 deletions

View file

@ -226,9 +226,9 @@ final class CameraConfigurationManager {
Camera.Parameters parameters = camera.getParameters();
if (parameters != null) {
String flashMode = parameters.getFlashMode();
return flashMode != null &&
(Camera.Parameters.FLASH_MODE_ON.equals(flashMode) ||
Camera.Parameters.FLASH_MODE_TORCH.equals(flashMode));
return
Camera.Parameters.FLASH_MODE_ON.equals(flashMode) ||
Camera.Parameters.FLASH_MODE_TORCH.equals(flashMode);
}
}
return false;

View file

@ -69,6 +69,7 @@ public final class PDF417ResultMetadata {
}
/**
* @param optionalData old optional data format as int array
* @deprecated parse and use new fields
*/
@Deprecated

View file

@ -34,7 +34,7 @@
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.3.1</version>
<version>1.4.0</version>
<scope>runtime</scope>
</dependency>
<dependency>

View file

@ -82,7 +82,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<proguard.version>6.0.1</proguard.version>
<proguard.version>6.0.2</proguard.version>
<proguard.plugin.version>2.0.14</proguard.plugin.version>
<slf4j.version>1.7.25</slf4j.version>
<!-- This can't reference project.version as some subprojects version differently -->
@ -465,7 +465,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.8</version>
<version>8.9</version>
</dependency>
</dependencies>
</plugin>

View file

@ -331,9 +331,10 @@ public final class DecodeServlet extends HttpServlet {
BufferedImage image;
try {
image = ImageIO.read(is);
} catch (IOException | CMMException | IllegalArgumentException ioe) {
log.info(ioe.toString());
// Have seen these in some logs
} catch (IOException | CMMException | IllegalArgumentException | ArrayIndexOutOfBoundsException e) {
// Have seen these in some logs, like an AIOOBE from certain GIF images
// https://github.com/zxing/zxing/issues/862#issuecomment-376159343
log.info(e.toString());
errorResponse(request, response, "badimage");
return;
}