diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-04-29 12:13:11 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-04-29 12:13:11 +0000 |
commit | 6235c94885caefc238775946d5c775bba98c97b4 (patch) | |
tree | 44eb2b78e8c889ce011c2adf26d0da0a26a929d4 /src/main/java/at/knowcenter | |
parent | 620f4f25941188360f64447b9d773a310866f70b (diff) | |
download | pdf-as-3-REL-3.0.5-rev260@260.tar.gz pdf-as-3-REL-3.0.5-rev260@260.tar.bz2 pdf-as-3-REL-3.0.5-rev260@260.zip |
a) Two stage verification (analysis and verification) now throws PDFDocumentException(ErrorCode.DOCUMENT_NOT_SIGNED,...) if necessary. b) Do not try to remove svn-metadata while clearing temporary directory any more (preventing annoying error message).REL-3.0.5-rev260@260
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@259 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java | 4 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java index 6481401..1fa3ad6 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java @@ -678,6 +678,10 @@ public class SettingsReader implements Serializable File[] files = temp_dir.listFiles();
for (int i = 0; i < files.length; i++)
{
+ // added by tknall: do not try to remove svn-metadata
+ if (files[i].getName().endsWith(".svn")) {
+ continue;
+ }
logger_.debug(" Clearing temporary file: " + files[i]);
boolean delete_success = files[i].delete();
if (!delete_success)
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java index 001b8b3..c9ed314 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyServlet.java @@ -38,6 +38,7 @@ import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.framework.config.SettingsHelper;
import at.gv.egiz.pdfas.framework.input.DataSource;
import at.gv.egiz.pdfas.framework.input.ExtractionStage;
@@ -339,7 +340,7 @@ public class VerifyServlet extends HttpServlet if (filtered_signature_holders.size() == 0)
{
- throw new PDFDocumentException(206, "PDF document not signed."); //$NON-NLS-1$
+ throw new PDFDocumentException(ErrorCode.DOCUMENT_NOT_SIGNED, "PDF document not signed."); //$NON-NLS-1$
}
return filtered_signature_holders;
|