[9] RFR of 8074821: Resolve disabled warnings for libnio

Alan Bateman Alan.Bateman at oracle.com
Fri May 8 07:01:58 UTC 2015


On 07/05/2015 19:15, Brian Burkhalter wrote:
> :
>
> Would something like this make more sense?
>
> --- a/src/java.base/unix/native/libnio/ch/IOUtil.c
> +++ b/src/java.base/unix/native/libnio/ch/IOUtil.c
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights 
> reserved.
> + * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights 
> reserved.
> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> *
> * This code is free software; you can redistribute it and/or modify it
> @@ -129,7 +129,8 @@
>       JNU_ThrowIOExceptionWithLastError(env, "getrlimit failed");
>       return -1;
>   }
> -   if (rlp.rlim_max < 0 || rlp.rlim_max > java_lang_Integer_MAX_VALUE) {
> +   if (rlp.rlim_max == RLIM_INFINITY ||
> +       rlp.rlim_max > (rlim_t)java_lang_Integer_MAX_VALUE) {
>       return java_lang_Integer_MAX_VALUE;
>   } else {
>       return (jint)rlp.rlim_max;
>
This looks good as it doesn't make any assumption on the value of 
RLIM_INFINITY. If you have VM images with Solaris then it's easy to edit 
/etc/system, reboot, and then attempt to run the Selector tests.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150508/4f8dcaac/attachment.html>


More information about the nio-dev mailing list