elharo commented on code in PR #118:
URL: https://github.com/apache/maven-shared-io/pull/118#discussion_r3691245035


##########
src/main/java/org/apache/maven/shared/io/location/URLLocation.java:
##########
@@ -30,6 +30,10 @@
  */
 public class URLLocation extends FileLocation {
 
+    private static final String DEFAULT_TEMP_FILE_PREFIX = "url";

Review Comment:
   I'm tempted to just inline these



##########
src/main/java/org/apache/maven/shared/io/location/URLLocation.java:
##########
@@ -58,7 +62,10 @@ public URLLocation(
     /** {@inheritDoc} */
     protected void initFile() throws IOException {
         if (unsafeGetFile() == null) {
-            File tempFile = Files.createTempFile(tempFilePrefix, 
tempFileSuffix).toFile();
+            String prefix = tempFilePrefix != null ? tempFilePrefix : 
DEFAULT_TEMP_FILE_PREFIX;

Review Comment:
   cleaner to do this in the constructor



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to