Re: RFR: 8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)

2020-11-25 Thread Aleksey Shipilev
On Tue, 27 Oct 2020 19:46:27 GMT, Сергей Цыпанов 
 wrote:

>> Submitted [here](https://bugs.openjdk.java.net/browse/JDK-8255477), please 
>> try to update the PR title to "8255477: Remove unused method URL.set(String 
>> protocol, String host, int port, String file, String ref)". Also, merge from 
>> master to get the test fixes, which should make the "Testing" all green.
>
> @shipilev thanks for filing the issue! Done.

Please merge from master to get a fresh round of testing. @AlanBateman might 
want to look at it.

-

PR: https://git.openjdk.java.net/jdk/pull/779


Re: RFR: 8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)

2020-11-25 Thread Сергей Цыпанов
On Wed, 25 Nov 2020 08:02:07 GMT, Aleksey Shipilev  wrote:

>> @shipilev thanks for filing the issue! Done.
>
> Please merge from master to get a fresh round of testing. @AlanBateman might 
> want to look at it.

Done!

-

PR: https://git.openjdk.java.net/jdk/pull/779


Re: RFR: 8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref) [v2]

2020-11-25 Thread Сергей Цыпанов
> Hello, while working with `java.net.URL` I've found unused package-private 
> method `URL.set(String protocol, String host, int port, String file, String 
> ref)` which can be safely removed from JDK. Testing: tier1, tier2
> 
> Could someone crate an issue for tracking of this simple change?

Сергей Цыпанов has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains two additional 
commits since the last revision:

 - Merge branch 'master' into url
 - 8255477: Remove unused method URL.set(String protocol, String host, int 
port, String file, String ref)

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/779/files
  - new: https://git.openjdk.java.net/jdk/pull/779/files/e2487aae..24d14e26

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=779&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=779&range=00-01

  Stats: 143793 lines in 2196 files changed: 79159 ins; 49141 del; 15493 mod
  Patch: https://git.openjdk.java.net/jdk/pull/779.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/779/head:pull/779

PR: https://git.openjdk.java.net/jdk/pull/779


Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-25 Thread Kartik Ohri
Hi Chris and Patrick,
It is the first time I am running the tier2 tests so I am not sure if I am
doing it correctly. I'll share what I did and my observations.

I executed make run-test-tier2 on my Ubuntu 20.10 machine and the tests
failed to build due to some warnings in a hostpot jtreg test. The output
was as follows:

* For target
support_test_hotspot_jtreg_native_support_exesigtest_exesigtest.o:
/home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:
In function 'setSignalHandler':
/home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:245:9:
error: 'sigset' is deprecated: Use the signal and sigprocmask functions
instead [-Werror=deprecated-declarations]
  245 | sigset(signal_num, handler);
  | ^~
In file included from
/home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:25:
/usr/include/signal.h:353:23: note: declared here
  353 | extern __sighandler_t sigset (int __sig, __sighandler_t __disp)
__THROW
  |   ^~
cc1: all warnings being treated as errors


However, when I ran the same command on my Ubuntu 20.04 machine, I got the
following output.
==
Test summary
==
   TEST  TOTAL  PASS  FAIL
ERROR
   jtreg:test/jdk:tier2   3664  3664 0
0
   jtreg:test/langtools:tier2   1111 0
0
   jtreg:test/jaxp:tier2   448   448 0
0
==
TEST SUCCESS

So, I think the tests passed on Ubuntu 20.04 but failed to execute on
Ubuntu 20.10.
I tried to find a reason for this and found
https://sourceware.org/pipermail/libc-alpha/2020-May/113971.html. I think
sigset got deprecated after Ubuntu 20.04 but so that is probably a
different issue and not related to this patch.

I do not have access to any other machine so I could not run the tests on
Windows, macOS and so on.

Thanks.

Regards,
Kartik.

On Mon, Nov 23, 2020 at 11:37 PM Patrick Concannon <
patrick.concan...@oracle.com> wrote:

> Hi Kartik,
>
> Thanks for submitting the patch. Once you’ve run the tier2 tests, I’d be
> happy to sponsor it for you.
>
> -Patrick
>
> > On 23 Nov 2020, at 09:09, Chris Hegarty 
> wrote:
> >
> > Hi Kartik,
> >
> >> On 21 Nov 2020, at 12:01, Kartik Ohri  wrote:
> >>
> >> Hi!
> >> I would like to submit this patch
> https://github.com/openjdk/jdk/pull/1364 with the rationale to improve
> the readability of the code. Can someone please take a look at it and
> create a public issue if the patch is OK to be included ?
> >
> > This certainly seems like a reasonable thing to do.
> >
> > Can you please run tier2 testing, since it contains the tests for the
> HTTP Client.
> >
> > Thanks,
> > -Chris.
>
>


Re: RFR: 8255477: Remove unused method URL.set(String protocol, String host, int port, String file, String ref)

2020-11-25 Thread Daniel Fuchs
On Wed, 25 Nov 2020 08:50:18 GMT, Сергей Цыпанов 
 wrote:

>> Please merge from master to get a fresh round of testing. @AlanBateman might 
>> want to look at it.
>
> Done!

I'll have a look at this when I can spare some cycles. @stsypanov did you run 
tier2 tests?

-

PR: https://git.openjdk.java.net/jdk/pull/779


Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-25 Thread Patrick Concannon
Hi Kartik,

Thanks for running the tests. I’m not sure about your problem on Ubuntu 20.10, 
but I’ll take a look into it.

Just so you know, you can also run tests using jtreg. You can find more 
information on how to do that here: http://openjdk.java.net/jtreg/runtests.html

I’ll import your patch now, and run it against our test suites. All going well, 
I can sponsor the PR and then hopefully we can integrate it into the JDK for 
you!

Kind regards,
Patrick

> On 25 Nov 2020, at 11:28, Kartik Ohri  wrote:
> 
> Hi Chris and Patrick,
> It is the first time I am running the tier2 tests so I am not sure if I am 
> doing it correctly. I'll share what I did and my observations. 
> 
> I executed make run-test-tier2 on my Ubuntu 20.10 machine and the tests 
> failed to build due to some warnings in a hostpot jtreg test. The output was 
> as follows:
> 
> * For target 
> support_test_hotspot_jtreg_native_support_exesigtest_exesigtest.o:
> /home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:
>  In function 'setSignalHandler':
> /home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:245:9:
>  error: 'sigset' is deprecated: Use the signal and sigprocmask functions 
> instead [-Werror=deprecated-declarations]
>   245 | sigset(signal_num, handler);
>   | ^~
> In file included from 
> /home/lucifer/IdeaProjects/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:25:
> /usr/include/signal.h:353:23: note: declared here
>   353 | extern __sighandler_t sigset (int __sig, __sighandler_t __disp) 
> __THROW
>   |   ^~
> cc1: all warnings being treated as errors
> 
> 
> However, when I ran the same command on my Ubuntu 20.04 machine, I got the 
> following output.
> ==
> Test summary
> ==
>TEST  TOTAL  PASS  FAIL ERROR  
>  
>jtreg:test/jdk:tier2   3664  3664 0 0  
>  
>jtreg:test/langtools:tier2   1111 0 0  
>  
>jtreg:test/jaxp:tier2   448   448 0 0  
>  
> ==
> TEST SUCCESS
> 
> So, I think the tests passed on Ubuntu 20.04 but failed to execute on Ubuntu 
> 20.10.
> I tried to find a reason for this and found 
> https://sourceware.org/pipermail/libc-alpha/2020-May/113971.html. I think 
> sigset got deprecated after Ubuntu 20.04 but so that is probably a different 
> issue and not related to this patch.
> 
> I do not have access to any other machine so I could not run the tests on 
> Windows, macOS and so on.
> 
> Thanks.
> 
> Regards,
> Kartik.
> 
> On Mon, Nov 23, 2020 at 11:37 PM Patrick Concannon 
>  wrote:
> Hi Kartik,
> 
> Thanks for submitting the patch. Once you’ve run the tier2 tests, I’d be 
> happy to sponsor it for you. 
> 
> -Patrick
> 
> > On 23 Nov 2020, at 09:09, Chris Hegarty  wrote:
> > 
> > Hi Kartik,
> > 
> >> On 21 Nov 2020, at 12:01, Kartik Ohri  wrote:
> >> 
> >> Hi!
> >> I would like to submit this patch https://github.com/openjdk/jdk/pull/1364 
> >> with the rationale to improve the readability of the code. Can someone 
> >> please take a look at it and create a public issue if the patch is OK to 
> >> be included ?
> > 
> > This certainly seems like a reasonable thing to do.
> > 
> > Can you please run tier2 testing, since it contains the tests for the HTTP 
> > Client.
> > 
> > Thanks,
> > -Chris.
>