Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java @ 5584:d35a0bc153fa
Added missing validation check.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Apr 2013 23:19:01 +0200 |
parents | 523cd27b4c42 |
children |
comparison
equal
deleted
inserted
replaced
5583:523cd27b4c42 | 5584:d35a0bc153fa |
---|---|
100 String creationStr = node.getAttributeNS(uri, "creation"); | 100 String creationStr = node.getAttributeNS(uri, "creation"); |
101 String name = node.getAttributeNS(uri, "name"); | 101 String name = node.getAttributeNS(uri, "name"); |
102 String uuid = node.getAttributeNS(uri, "uuid"); | 102 String uuid = node.getAttributeNS(uri, "uuid"); |
103 String ttlStr = node.getAttributeNS(uri, "ttl"); | 103 String ttlStr = node.getAttributeNS(uri, "ttl"); |
104 | 104 |
105 if (!uuid.isEmpty() && !ttlStr.isEmpty()) { | 105 if (!uuid.isEmpty() && !ttlStr.isEmpty() && !creationStr.isEmpty()) { |
106 try { | 106 try { |
107 long time = Long.parseLong(creationStr); | 107 long time = Long.parseLong(creationStr); |
108 long ttl = Long.parseLong(ttlStr); | 108 long ttl = Long.parseLong(ttlStr); |
109 return new DefaultCollection(uuid, ttl, name, new Date(time)); | 109 return new DefaultCollection(uuid, ttl, name, new Date(time)); |
110 } | 110 } |