8129499: Structure of java/rmi/activation/rmidViaInheritedChannel tests masks exception
Check for rmid == null before dereferencing the variable. Reviewed-by: rriggs, chegar
This commit is contained in:
parent
c1108923f4
commit
c0b2c2b0e6
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -126,7 +126,9 @@ public class InheritedChannelNotServerSocket {
|
||||
if (obj != null) {
|
||||
UnicastRemoteObject.unexportObject(obj, true);
|
||||
}
|
||||
rmid.cleanup();
|
||||
if (rmid != null) {
|
||||
rmid.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
@ -125,7 +125,9 @@ public class RmidViaInheritedChannel implements Callback {
|
||||
if (obj != null) {
|
||||
UnicastRemoteObject.unexportObject(obj, true);
|
||||
}
|
||||
rmid.cleanup();
|
||||
if (rmid != null) {
|
||||
rmid.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user