comparison flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java @ 5583:523cd27b4c42

Element.getAttributeNS() does not return null values.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 05 Apr 2013 23:16:31 +0200
parents 0de61fc9d281
children d35a0bc153fa
comparison
equal deleted inserted replaced
5582:2d00c7685bd0 5583:523cd27b4c42
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 != null && ttlStr != null) { 105 if (!uuid.isEmpty() && !ttlStr.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 }

http://dive4elements.wald.intevation.org