/** * Clear the result caches for a scan. */ protected synchronized void clearResults() { filesIncluded = new VectorSet<>(); filesNotIncluded = new VectorSet<>(); filesExcluded = new VectorSet<>(); filesDeselected = new VectorSet<>(); dirsIncluded = new VectorSet<>(); dirsNotIncluded = new VectorSet<>(); dirsExcluded = new VectorSet<>(); dirsDeselected = new VectorSet<>(); everythingIncluded = (basedir != null); scannedDirs.clear(); notFollowedSymlinks.clear(); }
public VectorSet(Collection<? extends E> c) { if (c != null) { this.addAll(c); } }
@Override public synchronized boolean addAll(Collection<? extends E> c) { boolean changed = false; for (E e : c) { changed |= add(e); } return changed; }
/** * This implementation may not add the element at the given index * if it is already contained in the collection. */ @Override public void add(int index, E o) { doAdd(index, o); }
@Override public boolean removeElement(Object o) { return doRemove(o); }
@Test public void testTransformToWilmaHttpRequestShouldGetHeadersToCopyIntoResultWhenOneHeader() { //GIVEN headers.add("Content-type"); headers.add("Any-other-header"); given(request.getHeaderNames()).willReturn(enumeration); //WHEN underTest.transformToWilmaHttpRequest(WILMA_LOGGER_ID, request, responseDescriptorDTO); //THEN verify(request, Mockito.times(2)).getHeader(Matchers.anyString()); }
@Override public void insertElementAt(E o, int index) { doAdd(index, o); }
@Override public boolean remove(Object o) { return doRemove(o); }
String endToken = getEndToken(); if (recurseDepth == 0) { passedTokens = new VectorSet<>();
final Vector<Target> ret = new VectorSet<>(); final Hashtable<String, String> state = new Hashtable<>(); final Stack<String> visiting = new Stack<>();
File savedDir = dir; String savedAntFile = antFile; Vector<String> locals = new VectorSet<>(targets); try { getNewProject();
/** * scans the remote directory, * storing internally the included files, directories, ... */ public void scan() { if (includes == null) { // No includes supplied, so set it to 'matches all' includes = new String[1]; includes[0] = "**"; } if (excludes == null) { excludes = new String[0]; } filesIncluded = new VectorSet(); filesNotIncluded = new Vector(); filesExcluded = new VectorSet(); dirsIncluded = new VectorSet(); dirsNotIncluded = new Vector(); dirsExcluded = new VectorSet(); try { String cwd = ftp.printWorkingDirectory(); // always start from the current ftp working dir forceRemoteSensitivityCheck(); checkIncludePatterns(); clearCaches(); ftp.changeWorkingDirectory(cwd); } catch (IOException e) { throw new BuildException("Unable to scan FTP server: ", e); } }