bugfix for LsidToUri Converter, works with real URIs now
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 20 Apr 2011 12:04:30 +0000 (12:04 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 20 Apr 2011 12:04:30 +0000 (12:04 +0000)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/assembler/converter/PreferLsidToUriConverter.java

index 256c2e295db4d0277944caf3e3f7cc318e0190b2..d970f2c786f7ef952b6b78aa806942c3cd125d4a 100644 (file)
@@ -22,7 +22,11 @@ public class PreferLsidToUriConverter implements CustomConverter {
                if (destination == null) {
                        if(source != null) {
                                try {
-                                       return new URI((String)source);
+                                       if (source instanceof URI){
+                                               return source;
+                                       }else{
+                                               return new URI((String)source);
+                                       }
                                } catch (URISyntaxException e) {
                                        throw new MappingException("Converter TestCustomConverter used incorrectly. Arguments passed in were:"
                                                        + destination + " and " + source);