Aggarwal-Raghav commented on code in PR #508:
URL: https://github.com/apache/tez/pull/508#discussion_r3400921680
##########
tez-api/src/main/java/org/apache/tez/dag/api/client/TimelineReaderFactory.java:
##########
@@ -284,7 +285,7 @@ public HttpURLConnection getHttpURLConnection(URL url)
throws IOException {
URLEncoder.encode(UserGroupInformation.getCurrentUser().getShortUserName(),
"UTF8");
HttpURLConnection httpURLConnection =
- (HttpURLConnection) (new URL(url + tokenString)).openConnection();
+ (HttpURLConnection) URI.create(url +
tokenString).toURL().openConnection();
Review Comment:
Can we use `new URI` instead of `URI.create()`? based on this there are
compile time enforcements ? WDYT?
<img width="665" height="572" alt="Image"
src="https://github.com/user-attachments/assets/556e163a-bda1-440c-a5d5-ae19636b64de"
/>
--
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]