LuckysHorizon commented on code in PR #118:
URL: https://github.com/apache/maven-shared-io/pull/118#discussion_r3692183474
##########
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:
Thanks for the review! Agreed on both points — I'll move the null defaulting
into the constructor so tempFilePrefix/tempFileSuffix are guaranteed non-null
by the time initFile() runs, and inline the "url"/".tmp" literals directly
instead of the named constants. Will push an update shortly.
--
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]