Merge pull request #373 from yueh/fix-326
Moved getGrid() (WeakReference) to a local var
This commit is contained in:
commit
c19ed27f0e
1 changed files with 4 additions and 3 deletions
|
@ -105,8 +105,9 @@ public class Grid implements IGrid
|
||||||
if ( gridNode.getGridStorage() != null )
|
if ( gridNode.getGridStorage() != null )
|
||||||
{
|
{
|
||||||
GridStorage gs = gridNode.getGridStorage();
|
GridStorage gs = gridNode.getGridStorage();
|
||||||
|
IGrid grid = gs.getGrid();
|
||||||
|
|
||||||
if ( gs.getGrid() == null )
|
if ( grid == null )
|
||||||
{
|
{
|
||||||
myStorage = gs;
|
myStorage = gs;
|
||||||
myStorage.setGrid( this );
|
myStorage.setGrid( this );
|
||||||
|
@ -114,7 +115,7 @@ public class Grid implements IGrid
|
||||||
for (IGridCache gc : caches.values())
|
for (IGridCache gc : caches.values())
|
||||||
gc.onJoin( myStorage );
|
gc.onJoin( myStorage );
|
||||||
}
|
}
|
||||||
else if ( gs.getGrid() != this )
|
else if ( grid != this )
|
||||||
{
|
{
|
||||||
if ( myStorage == null )
|
if ( myStorage == null )
|
||||||
{
|
{
|
||||||
|
@ -127,7 +128,7 @@ public class Grid implements IGrid
|
||||||
{
|
{
|
||||||
gs.addDivided( myStorage );
|
gs.addDivided( myStorage );
|
||||||
|
|
||||||
for (IGridCache gc : ((Grid) gs.getGrid()).caches.values())
|
for (IGridCache gc : ((Grid) grid).caches.values())
|
||||||
gc.onSplit( tmp );
|
gc.onSplit( tmp );
|
||||||
|
|
||||||
for (IGridCache gc : caches.values())
|
for (IGridCache gc : caches.values())
|
||||||
|
|
Loading…
Reference in a new issue