Skip to content

Commit 56acecd

Browse files
Fix issue with incorrect determination of whether or not a string is encoded
by replacing URLDecoder with import org.springframework.web.util.UriUtils as the former does not handle '+' character. Ticket: #8356 Acked-by: Albert Rossi <arossi@fnal.gov> Target: trunk Request: 2.9 Request: 2.8 Request: 2.7 Request: 2.6 Require-book: no Require-notes: yes RELEASE NOTES Fix bug effecting ability to stage files from Enstore if file names contain '+' character. (cherry picked from commit d12513c) Conflicts: modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraEnstoreStorageInfoExtractor.java
1 parent 7af4189 commit 56acecd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/dcache-chimera/src/main/java/org/dcache/chimera/namespace/ChimeraEnstoreStorageInfoExtractor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package org.dcache.chimera.namespace;
22

33
import org.springframework.web.util.UriComponentsBuilder;
4-
import org.springframework.web.util.UriComponents;
4+
import org.springframework.web.util.UriUtils;
55

66
import java.io.IOException;
77
import java.io.UnsupportedEncodingException;
88
import java.net.URI;
9-
import java.net.URLDecoder;
109
import java.util.HashMap;
1110
import java.util.List;
1211
import java.util.Map;
@@ -127,6 +126,6 @@ public StorageInfo getDirStorageInfo(FsInode inode) throws CacheException {
127126
}
128127

129128
private static boolean isEncoded(String s) throws UnsupportedEncodingException {
130-
return !s.equals(URLDecoder.decode(s,"UTF-8"));
129+
return !s.equals(UriUtils.decode(s,"UTF-8"));
131130
}
132131
}

0 commit comments

Comments
 (0)