any23-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hansbre...@apache.org
Subject any23 git commit: ANY23-365 resolved additional warnings
Date Wed, 11 Jul 2018 20:57:27 GMT
Repository: any23
Updated Branches:
  refs/heads/master 5a2613b84 -> 3f87cf3a8


ANY23-365 resolved additional warnings


Project: http://git-wip-us.apache.org/repos/asf/any23/repo
Commit: http://git-wip-us.apache.org/repos/asf/any23/commit/3f87cf3a
Tree: http://git-wip-us.apache.org/repos/asf/any23/tree/3f87cf3a
Diff: http://git-wip-us.apache.org/repos/asf/any23/diff/3f87cf3a

Branch: refs/heads/master
Commit: 3f87cf3a8ca51650376d7f111613fe0c1eda74d5
Parents: 5a2613b
Author: Hans <firedrake93@gmail.com>
Authored: Wed Jul 11 15:53:05 2018 -0500
Committer: Hans <firedrake93@gmail.com>
Committed: Wed Jul 11 15:53:05 2018 -0500

----------------------------------------------------------------------
 api/src/main/java/org/apache/any23/plugin/Author.java            | 4 ++++
 cli/src/main/java/org/apache/any23/cli/PluginVerifier.java       | 4 ++--
 service/src/main/java/org/apache/any23/servlet/WebResponder.java | 4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/any23/blob/3f87cf3a/api/src/main/java/org/apache/any23/plugin/Author.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/any23/plugin/Author.java b/api/src/main/java/org/apache/any23/plugin/Author.java
index 86ae20a..a113a15 100644
--- a/api/src/main/java/org/apache/any23/plugin/Author.java
+++ b/api/src/main/java/org/apache/any23/plugin/Author.java
@@ -17,11 +17,15 @@
 
 package org.apache.any23.plugin;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * Describes the author of the plugin.
  *
  * @author Michele Mostarda (mostarda@fbk.eu)
  */
+@Retention(RetentionPolicy.RUNTIME)
 public @interface Author {
 
     /**

http://git-wip-us.apache.org/repos/asf/any23/blob/3f87cf3a/cli/src/main/java/org/apache/any23/cli/PluginVerifier.java
----------------------------------------------------------------------
diff --git a/cli/src/main/java/org/apache/any23/cli/PluginVerifier.java b/cli/src/main/java/org/apache/any23/cli/PluginVerifier.java
index f3f3234..a43065d 100644
--- a/cli/src/main/java/org/apache/any23/cli/PluginVerifier.java
+++ b/cli/src/main/java/org/apache/any23/cli/PluginVerifier.java
@@ -76,11 +76,11 @@ public class PluginVerifier implements Tool {
         return sb.toString();
     }
 
-    private void printPluginData(ExtractorFactory extractorFactory, PrintStream ps) {
+    private void printPluginData(ExtractorFactory<?> extractorFactory, PrintStream
ps) {
         final Author authorAnnotation = extractorFactory.getClass().getAnnotation(Author.class);
         ps.printf("Plugin author    : %s%n", authorAnnotation == null ? "<unknown>"
: authorAnnotation.name());
         ps.printf("Plugin factory   : %s%n", extractorFactory.getClass());
-        ps.printf("Plugin mime-types: %s%n", getMimeTypesStr( extractorFactory.getSupportedMIMETypes()
));
+        ps.printf("Plugin mime-types: %s%n", getMimeTypesStr(extractorFactory.getSupportedMIMETypes()));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/any23/blob/3f87cf3a/service/src/main/java/org/apache/any23/servlet/WebResponder.java
----------------------------------------------------------------------
diff --git a/service/src/main/java/org/apache/any23/servlet/WebResponder.java b/service/src/main/java/org/apache/any23/servlet/WebResponder.java
index b9641d2..024bf70 100644
--- a/service/src/main/java/org/apache/any23/servlet/WebResponder.java
+++ b/service/src/main/java/org/apache/any23/servlet/WebResponder.java
@@ -21,6 +21,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.nio.charset.Charset;
+import java.security.cert.CertificateException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -45,7 +46,6 @@ import org.apache.any23.writer.TripleHandler;
 import org.apache.any23.writer.TripleHandlerException;
 import org.apache.any23.writer.WriterFactory;
 import org.apache.any23.writer.WriterFactoryRegistry;
-import sun.security.validator.ValidatorException;
 
 /**
  * This class is responsible for building the {@link Servlet}
@@ -127,7 +127,7 @@ class WebResponder {
             }
         } catch (IOException ioe) {
             // IO Error.
-            if (ioe.getCause() != null && ValidatorException.class.equals(ioe.getCause().getClass()))
{
+            if (ioe.getCause() instanceof CertificateException) {
                 final String errMsg = "Could not fetch input, IO Error.";
                 any23servlet.log(errMsg, ioe.getCause());
                 sendError(502, errMsg, ioe, null, report);


Mime
View raw message