@@ -50,13 +50,13 @@ public class HttpURLConnectionDownloaderService implements DownloaderService {
50
50
LoggerFactory .getLogger (HttpURLConnectionDownloaderService .class );
51
51
52
52
// We don't support redirects because they allow to bypass some of our validations.
53
- // TODO : How exactly redirects can harm?
53
+ // FIXME : How exactly redirects can harm?
54
54
@ SuppressWarnings ({"PMD.RedundantFieldInitializer" , "PMD.ImmutableField" })
55
55
private boolean followRedirects = false ;
56
56
57
57
// Only types listed here will be downloaded. For other types, INVALID_FILE_TYPE error
58
58
// will be returned. An empty array (or null) means that all types are allowed.
59
- // TODO : at this moment we do a case sensitive comparison. Should we change it?
59
+ // FIXME : at this moment we do a case sensitive comparison. Should we change it?
60
60
private final String [] allowedContentTypes ;
61
61
62
62
// Max time to wait during opening a connection to a resource (in milliseconds).
@@ -67,7 +67,7 @@ public class HttpURLConnectionDownloaderService implements DownloaderService {
67
67
@ Override
68
68
@ PreAuthorize (HasAuthority .DOWNLOAD_IMAGE )
69
69
public DownloadResult download (String fileUrl ) {
70
- // TODO (security): fix possible log injection
70
+ // FIXME (security): fix possible log injection
71
71
LOG .debug ("Downloading '{}'" , fileUrl );
72
72
73
73
try {
@@ -93,7 +93,7 @@ public DownloadResult download(String fileUrl) {
93
93
return DownloadResult .failed (validationResult );
94
94
}
95
95
96
- // TODO (java9): use InputStream.readAllBytes()
96
+ // FIXME (java9): use InputStream.readAllBytes()
97
97
byte [] data = StreamUtils .copyToByteArray (stream );
98
98
String contentType = conn .getContentType ();
99
99
return DownloadResult .succeeded (data , contentType );
@@ -130,7 +130,7 @@ private static HttpURLConnection openConnection(URL url) throws IOException {
130
130
}
131
131
132
132
private static void configureUserAgent (URLConnection conn ) {
133
- // TODO : make it configurable
133
+ // FIXME : make it configurable
134
134
conn .setRequestProperty (
135
135
"User-Agent" ,
136
136
"Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0"
@@ -181,7 +181,7 @@ private Code validateConnection(HttpURLConnection conn) throws IOException {
181
181
contentType = StringUtils .substringBefore (contentType , ";" );
182
182
183
183
if (allowedContentTypes != null && !ArrayUtils .contains (allowedContentTypes , contentType )) {
184
- // TODO (security): fix possible log injection
184
+ // FIXME (security): fix possible log injection
185
185
LOG .debug ("Couldn't download file: unsupported file type '{}'" , contentType );
186
186
return Code .INVALID_FILE_TYPE ;
187
187
}
0 commit comments