From a2ee888fe9bf171a4017ab5ec2fef138cf674ecf Mon Sep 17 00:00:00 2001 From: Andreas Romeyke <andreas.romeyke@slub-dresden.de> Date: Fri, 15 Aug 2014 10:38:10 +0000 Subject: [PATCH] - fixed an ugly "\0" problem, only occured with Rosetta 4.0 or higher, see https://exlibrisgroup--c.na4.visual.force.com/apex/VF_Case_WithoutJira?id=5006000000cUhhsAAC for details --- PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml | 2 +- .../dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml b/PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml index 7800cc3..9ebc001 100644 --- a/PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml +++ b/PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml @@ -49,7 +49,7 @@ </fr:x_form> </pl:initParameters> <pl:description>SLUB Virus Check Plugin using installed ClamAV daemon via tcp-sockets</pl:description> - <pl:version>1.2</pl:version> + <pl:version>1.3</pl:version> <pl:materialType>DIGITAL</pl:materialType> <pl:module>Repository</pl:module> <pl:generalType>TASK</pl:generalType> diff --git a/java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java b/java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java index 6bf6db8..6e590ad 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java @@ -267,7 +267,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin { callSocketCommandStream(socket, command, in); in.close(); //log.debug( "Response: " + response); - System.out.println("Response: " + response); + System.out.println("Response: " + response.trim()); // parse return code String result = response.trim(); if (RESPONSEOK.equals(result)) { @@ -307,7 +307,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin { byte[] command = VERSION; response = ""; callSocketCommand(socket, command); - return response; + return response.trim(); } catch (IOException e) { //log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e); System.out.println("exception creation socket, clamd not available at host=" + host + "port=" + port + " " + e); -- GitLab