You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/12/24 18:16:33 UTC

[GitHub] [netbeans] lkishalmi opened a new pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

lkishalmi opened a new pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813
 
 
   Also removed some rawtype warnings from the Settings panel.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813#discussion_r361282522
 
 

 ##########
 File path: groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
 ##########
 @@ -188,8 +188,10 @@ public NbGradleVersion evaluateGradleWrapperDistribution(File rootDir) {
         List<NbGradleVersion> ret = new ArrayList<>();
         JSONParser parser = new JSONParser();
         try {
-            URL allVersions = new URL("http://services.gradle.org/versions/all"); //NOI18N
-            try (InputStreamReader is = new InputStreamReader(allVersions.openStream())) {
+            URL allVersions = new URL("https://services.gradle.org/versions/all"); //NOI18N
+            HttpsURLConnection conn = (HttpsURLConnection) allVersions.openConnection();
+            conn.setInstanceFollowRedirects(true);
 
 Review comment:
   This is not needed - from the javadoc:
   
   > Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this class. True by default. Applets cannot change this variable.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi merged pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813#discussion_r361321266
 
 

 ##########
 File path: groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
 ##########
 @@ -188,8 +188,10 @@ public NbGradleVersion evaluateGradleWrapperDistribution(File rootDir) {
         List<NbGradleVersion> ret = new ArrayList<>();
         JSONParser parser = new JSONParser();
         try {
-            URL allVersions = new URL("http://services.gradle.org/versions/all"); //NOI18N
-            try (InputStreamReader is = new InputStreamReader(allVersions.openStream())) {
+            URL allVersions = new URL("https://services.gradle.org/versions/all"); //NOI18N
+            HttpsURLConnection conn = (HttpsURLConnection) allVersions.openConnection();
+            conn.setInstanceFollowRedirects(true);
 
 Review comment:
   Removed. The one thing it cannot do is the HTTP -> HTTPS redirect, but that does not needed either.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813#discussion_r361321300
 
 

 ##########
 File path: groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
 ##########
 @@ -188,8 +188,10 @@ public NbGradleVersion evaluateGradleWrapperDistribution(File rootDir) {
         List<NbGradleVersion> ret = new ArrayList<>();
         JSONParser parser = new JSONParser();
         try {
-            URL allVersions = new URL("http://services.gradle.org/versions/all"); //NOI18N
-            try (InputStreamReader is = new InputStreamReader(allVersions.openStream())) {
+            URL allVersions = new URL("https://services.gradle.org/versions/all"); //NOI18N
+            HttpsURLConnection conn = (HttpsURLConnection) allVersions.openConnection();
+            conn.setInstanceFollowRedirects(true);
+            try (InputStreamReader is = new InputStreamReader(conn.getInputStream())) {
 
 Review comment:
   Added that. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #1813: [NETBEANS-3633] Use HTTPS to download Gradle Version information
URL: https://github.com/apache/netbeans/pull/1813#discussion_r361285298
 
 

 ##########
 File path: groovy/gradle/src/org/netbeans/modules/gradle/GradleDistributionManager.java
 ##########
 @@ -188,8 +188,10 @@ public NbGradleVersion evaluateGradleWrapperDistribution(File rootDir) {
         List<NbGradleVersion> ret = new ArrayList<>();
         JSONParser parser = new JSONParser();
         try {
-            URL allVersions = new URL("http://services.gradle.org/versions/all"); //NOI18N
-            try (InputStreamReader is = new InputStreamReader(allVersions.openStream())) {
+            URL allVersions = new URL("https://services.gradle.org/versions/all"); //NOI18N
+            HttpsURLConnection conn = (HttpsURLConnection) allVersions.openConnection();
+            conn.setInstanceFollowRedirects(true);
+            try (InputStreamReader is = new InputStreamReader(conn.getInputStream())) {
 
 Review comment:
   I would add the charset to the InputStreamReader. There are still JDKs out there, that don't use UTF-8 by default and in the future the default might change. `java.nio.charset.StandardCharsets.UTF-8` would be the value I'd use. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists