/*
(non-Javadoc)

@see mtas.parser.function.util.MtasFunctionParserFunction#close()
324919
@Override
  public void close() throws ParseException {
    if (!defined()) {
      super.close();
      if (!tmpParserLongs.isEmpty()) {
        parserLongs = new MtasFunctionParserFunction[tmpParserLongs.size()];
        parserLongs = tmpParserLongs.toArray(parserLongs);
      }
      if (!tmpParserDoubles.isEmpty()) {
        parserDoubles = new MtasFunctionParserFunction[tmpParserDoubles.size()];
        parserDoubles = tmpParserDoubles.toArray(parserDoubles);
      }
      if (!tmpConstantLongs.isEmpty()) {
        constantLongs = new long[tmpConstantLongs.size()];
        for (int i = 0; i < tmpConstantLongs.size(); i++) {
          constantLongs[i] = tmpConstantLongs.get(i);
        }
      }
      if (!tmpConstantDoubles.isEmpty()) {
        constantDoubles = new Double[tmpConstantDoubles.size()];
        for (int i = 0; i < tmpConstantDoubles.size(); i++) {
          constantDoubles[i] = tmpConstantDoubles.get(i);
        }
      }
      if (firstType == null) {
        throw new ParseException("incorrect definition: no firstType");
      }
      if (!tmpOperatorList.isEmpty()) {
        number = tmpOperatorList.size();
        if ((tmpTypeList.size() != number) || (tmpIdList.size() != number)) {
          throw new ParseException("incorrect definition additional items");
        } else {
          operatorList = new String[number];
          operatorList = tmpOperatorList.toArray(operatorList);
          typeList = new String[number];
          typeList = tmpTypeList.toArray(typeList);
          idList = new int[number];
          for (int i = 0; i < number; i++) {
            idList[i] = tmpIdList.get(i).intValue();
          }
        }
      } else {
        number = 0;
        operatorList = null;
        typeList = null;
        idList = null;
      }
    }
  }
1001183
@Override
  public final void close()
  {
    try {
      if (_disableClose)
        return;

      if (! _reuseBuffer) {
        if (_tempRead != null) {
          TempBuffer tempBuffer = _tempRead;
          _tempRead = null;

          TempBuffer.free(tempBuffer);
        }
        _readBuffer = null;
      }

      if (_readEncoding != null) {
        Reader reader = _readEncoding;
        _readEncoding = null;
        reader.close();
      }

      if (_source != null && ! _isDisableCloseSource) {
        StreamImpl s = _source;
        _source = null;
        s.close();
      }
    } catch (IOException e) {
      log().log(Level.FINE, e.toString(), e);
    }
  }
119080
public void close() throws IOException {
        if (!closed) {
            finish();
            if (usesDefaultDeflater)
                def.end();
            out.close();
            closed = true;
        }
    }
698756
@Override
	public void close() {
		try {
			sortAndReduce();
		} catch (Exception e) {
			throw new ExceptionInChainedStubException(this.taskName, e);
		}

		this.outputCollector.close();
	}
331310
@Override
    public final void close() {
        final CompletableFuture<Void> f;
        synchronized (this) {
            if (state == State.STOPPED) {
                return;
            }
            f = stop(null);
        }

        boolean interrupted = false;
        for (;;) {
            try {
                f.get();
                break;
            } catch (InterruptedException ignored) {
                interrupted = true;
            } catch (ExecutionException e) {
                closeFailed(Exceptions.peel(e));
                break;
            }
        }

        if (interrupted) {
            Thread.currentThread().interrupt();
        }
    }
33269
@Override
    public void close() throws IOException
    {
        if (out != null)
        {
            out.close();
            out = null;
        }
        if (in != null)
        {
            in.close();
            in = null;
        }
    }
806139
@Override
	public void close() throws IOException {
		if (curr != null) {
			curr.close();
		}
		Reader reader;
		while ((reader = getNextInputReader()) != null) {
			reader.close();
		}
		closed = true;
	}
629310
@Override
    public void close() {
        if (trainingArchive != null && trainingArchive != weightsArchive) {
            trainingArchive.close();
            trainingArchive = null;
        }
        if (weightsArchive != null) {
            weightsArchive.close();
            weightsArchive = null;
        }
    }
156260
public void close() throws KNXMLException
	{
		if (!layout.isEmpty())
			endAllElements();
		if (closeWriter)
			try {
				w.close();
			}
			catch (final IOException e) {
				throw new KNXMLException(e.getMessage());
			}
	}
357842
@Override
    public void close() {
        if (!closed.getAndSet(true)) {
            if (fc != null) {
                try {
                    fc.close();
                    fc = null;
                } catch (final IOException e) {
                    // Ignore
                }
            }
            if (raf != null) {
                try {
                    raf.close();
                    raf = null;
                } catch (final IOException e) {
                    // Ignore
                }
            }
            if (chunkIdxToByteBuffer != null) {
                chunkIdxToByteBuffer.clear();
                chunkIdxToByteBuffer = null;
            }
            if (mappedByteBuffersCached != null) {
                for (int i = 0; i < mappedByteBuffersCached.length; i++) {
                    if (mappedByteBuffersCached[i] != null) {
                        FileUtils.closeDirectByteBuffer(mappedByteBuffersCached[i], /* log = */ null);
                        mappedByteBuffersCached[i] = null;
                    }
                }
                mappedByteBuffersCached = null;
            }
            nestedJarHandler = null;
        }
    }
1084748
public final void close()
    {
        try
        {
            if (!isClosed)
            {
                isRunning = false;
                isClosed = true;
                agent.onClose();
            }
        }
        catch (final Throwable throwable)
        {
            errorHandler.onError(throwable);
        }
    }
81551
public static void close(final HttpResponse response) {
        if (response instanceof CloseableHttpResponse) {
            val closeableHttpResponse = (CloseableHttpResponse) response;
            try {
                closeableHttpResponse.close();
            } catch (final IOException e) {
                LOGGER.error(e.getMessage(), e);
            }
        }
    }
525129
@Override
    public void close() {
        if (this.closed.compareAndSet(false, true)) {
            this.extensions.values().forEach(SegmentContainerExtension::close);
            Futures.await(Services.stopAsync(this, this.executor));
            this.metadataCleaner.close();
            this.writer.close();
            this.durableLog.close();
            this.readIndex.close();
            this.storage.close();
            log.info("{}: Closed.", this.traceObjectId);
        }
    }
453522
public void close() {
        synchronized (this) {
            if (! closing) {
                closing = true;
                try {
                    // Android-changed: Lazily initialized.
                    if (textOut != null) {
                        textOut.close();
                    }
                    out.close();
                }
                catch (IOException x) {
                    trouble = true;
                }
                textOut = null;
                charOut = null;
                out = null;
            }
        }
    }
1095235
@Override
    public void close() throws IOException {
        if (!closed) {
            closed = true;
            nodeCursor = null;
            _currToken = null;
        }
    }
1094811
@Override
  public void close() throws IOException {
    if (!closed) {
      objectOutputStream.close();
      fileOutputStream.close();
      closed = true;
    }
  }
417086
public void close() {
        readyState = ReadyState.CLOSING;

        try {
            webSocketSession.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, null));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }