diff --git a/src/main/java/org/icatproject/ids/IdsBean.java b/src/main/java/org/icatproject/ids/IdsBean.java index 59b49fa7..0c0be3ad 100644 --- a/src/main/java/org/icatproject/ids/IdsBean.java +++ b/src/main/java/org/icatproject/ids/IdsBean.java @@ -275,9 +275,6 @@ public void write(OutputStream output) throws IOException { private static String key; private final static Logger logger = LoggerFactory.getLogger(IdsBean.class); - private static String paddedPrefix; - private static final String prefix = ""; /** * matches standard UUID format of 8-4-4-4-12 hexadecimal digits @@ -285,14 +282,6 @@ public void write(OutputStream output) throws IOException { public static final Pattern uuidRegExp = Pattern .compile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"); - static { - paddedPrefix = ""; - if (result.startsWith(prefix)) { - result = result.substring(prefix.length(), result.length() - suffix.length()); - } - try (JsonReader jsonReader = Json.createReader(new StringReader(result))) { - JsonObject rootNode = jsonReader.readObject(); - if (rootNode.getJsonNumber("checksum").longValueExact() != crc.getValue()) { - throw new InternalException("Error uploading - the checksum was not as expected"); - } - return rootNode.getJsonNumber("id").longValueExact(); - } - } catch (IOException e) { - throw new InternalException(e.getClass() + " " + e.getMessage()); - } catch (NumberFormatException e) { - throw new InternalException("Web service call did not return a valid Long value"); - } - - } - public void restore(String sessionId, DataSelection data, Integer sc) throws NotImplementedException, BadRequestException, InsufficientPrivilegesException, InternalException, NotFoundException {