if (subAsset instanceof GLMAsset) isAmmo = isAmmo ((GLMAsset) subAsset); else isAmmo = false;
isAmmo = (subAsset instanceof GLMAsset) ? isAmmo ((GLMAsset) subAsset) : false;
  public TransportationRoute getRoute (Task parentTask) {    GeolocLocation origin      = glmPrepHelper.getFromLocation(parentTask);    GeolocLocation destination = glmPrepHelper.getToLocation  (parentTask);    Asset asset = parentTask.getDirectObject();    boolean isAmmo = false;    boolean fromIsPOE = isKnownGeolocCode (origin.getGeolocCode());    boolean toIsPOD   = isKnownGeolocCode (destination.getGeolocCode());    TransportationRoute route = null;    if (asset instanceof AssetGroup) {      Vector assetList = ((AssetGroup)asset).getAssets();      for (int i = 0; i < assetList.size(); i++) {	Asset subAsset = (Asset) assetList.elementAt(i);	if (subAsset instanceof AggregateAsset)	  subAsset = ((AggregateAsset) subAsset).getAsset ();		if ((subAsset instanceof GLMAsset) && isAmmo ((GLMAsset) subAsset))	  isAmmo = true;	break;      }    } else if (asset instanceof AggregateAsset) {      //      route = getGreatCircleRoute(origin, destination);       Asset subAsset = ((AggregateAsset) asset).getAsset ();      if (subAsset instanceof GLMAsset)	isAmmo = isAmmo ((GLMAsset) subAsset);      else	isAmmo = false; // don't know what it is -- it must not be ammo	      //      logger.warn ("PortLocatorImpl - got great circle route from " + origin + " to " + destination);    } else {      isAmmo = isAmmo ((GLMAsset) asset);    }    if (route == null) {      if (isAmmo) {	Object seaport = getAssetAtGeolocCode ("WMPT");	if (seaport != null)	  origin = (GeolocLocation) getLocationOfAsset (seaport);      }          // determine POE that has the shortest ship route to the POD      // this may differ a great deal from the simple great-circle distance      route = getRoute (origin, destination);//, fromIsPOE, toIsPOD);    }        if (logger.isDebugEnabled()) {      logger.debug ("PortLocatorImpl - getting route from " + origin + ((fromIsPOE) ? " POE " : "")+ 		   " to " + destination + ((toIsPOD) ? " POD " : ""));      logger.debug ("PortLocatorImpl - route obtained was from " + route.getSource ().getGeolocLocation () +		   " to " + route.getDestination ().getGeolocLocation ());    }    return route;  }