Need reviewer for 6894633: NetHooks hould not require provider to be present (sol)

View: New views
3 Messages — Rating Filter:   Alert me  

Need reviewer for 6894633: NetHooks hould not require provider to be present (sol)

by Alan Bateman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I need a reviewer for a small fix to sun.net.NetHooks. On Solaris, the
code incorrectly assumes that the sdp provider is always present. The
loadProvider method should return null if not present. The diffs are
attached.

Thanks,
Alan.


--- a/src/solaris/classes/sun/net/NetHooks.java
+++ b/src/solaris/classes/sun/net/NetHooks.java
@@ -81,7 +81,7 @@ public final class NetHooks {
                     try {
                         c = (Class<Provider>)Class.forName(cn, true, null);
                     } catch (ClassNotFoundException x) {
-                        throw new AssertionError(x);
+                        return null;
                     }
                     try {
                         return c.newInstance();


Re: Need reviewer for 6894633: NetHooks hould not require provider to be present (sol)

by Christopher Hegarty -Sun Microsystems Ireland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The changes look fine.

-Chris.

On 23/10/2009 14:57, Alan Bateman wrote:

>
> I need a reviewer for a small fix to sun.net.NetHooks. On Solaris, the
> code incorrectly assumes that the sdp provider is always present. The
> loadProvider method should return null if not present. The diffs are
> attached.
>
> Thanks,
> Alan.
>
>
> --- a/src/solaris/classes/sun/net/NetHooks.java
> +++ b/src/solaris/classes/sun/net/NetHooks.java
> @@ -81,7 +81,7 @@ public final class NetHooks {
>                     try {
>                         c = (Class<Provider>)Class.forName(cn, true, null);
>                     } catch (ClassNotFoundException x) {
> -                        throw new AssertionError(x);
> +                        return null;
>                     }
>                     try {
>                         return c.newInstance();
>

Re: Need reviewer for 6894633: NetHooks hould not require provider to be present (sol)

by Jean-Christophe Collet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christopher Hegarty - Sun Microsystems Ireland wrote:
> The changes look fine.
>

Same here. Looks fine.

> -Chris.
>
> On 23/10/2009 14:57, Alan Bateman wrote:
>>
>> I need a reviewer for a small fix to sun.net.NetHooks. On Solaris,
>> the code incorrectly assumes that the sdp provider is always present.
>> The loadProvider method should return null if not present. The diffs
>> are attached.
>>
>> Thanks,
>> Alan.
>>
>>
>> --- a/src/solaris/classes/sun/net/NetHooks.java
>> +++ b/src/solaris/classes/sun/net/NetHooks.java
>> @@ -81,7 +81,7 @@ public final class NetHooks {
>>                     try {
>>                         c = (Class<Provider>)Class.forName(cn, true,
>> null);
>>                     } catch (ClassNotFoundException x) {
>> -                        throw new AssertionError(x);
>> +                        return null;
>>                     }
>>                     try {
>>                         return c.newInstance();
>>