private Dimension checkUnknownDims ( String wantDim , List < Dimension > unknownDims , Dimension oldDim , String location ) { for ( Dimension dim : unknownDims ) { if ( dim . getShortName ( ) . equals ( wantDim ) ) { int len = oldDim . getLength ( ) ; if ( len == 0 ) { dim . setUnlimited ( true ) ; // allow zero length dimension !! } dim . setLength ( len ) ; // use existing (anon) dimension Group parent = dim . getGroup ( ) ; parent . addDimensionIfNotExists ( dim ) ; // add to the parent unknownDims . remove ( dim ) ; // remove from list LOOK is this ok? log . warn ( "unknownDim {} length set to {}{}" , wantDim , oldDim . getLength ( ) , location ) ; return dim ; } } return null ; }
look if the wanted dimension is in the unknownDims list .