LuckysHorizon commented on code in PR #118:
URL: https://github.com/apache/maven-shared-io/pull/118#discussion_r3692235163
##########
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:
Thanks for the review, @elharo — both points are addressed now.
**Changes to `URLLocation.java`:**
- Removed the two `static final` constants
- Constructor now applies null-safe defaults inline:
```java
this.tempFilePrefix = (tempFilePrefix != null) ? tempFilePrefix : "url";
this.tempFileSuffix = (tempFileSuffix != null) ? tempFileSuffix : ".tmp";
```
- `initFile()` reverted to the original one-liner (fields are now guaranteed
non-null)
- Existing regression test left unchanged — still passes
`mvn -q test` passed. Commit amended and force-pushed to
`fix-95-urllocation-tempfile-defaults`.
--
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]