entry.setLockCreationDate(TimeUtil.formatDate(lock.getCreationDate()));
entry.setLockCreationDate(SVNTimeUtil.formatDate(lock.getCreationDate()));
    public void doLock(File[] paths, boolean stealLock, String lockMessage)            throws SVNException {        Map entriesMap = new HashMap();        for (int i = 0; i < paths.length; i++) {            SVNWCAccess wcAccess = createWCAccess(paths[i]);            try {                wcAccess.open(true, false);                SVNEntry entry = wcAccess.getAnchor().getEntries().getEntry(                        wcAccess.getTargetName(), true);                if (entry == null || entry.isHidden()) {                    SVNErrorManager.error("svn: '" + entry.getName()                            + "' is not under version control");                }                if (entry.getURL() == null) {                    SVNErrorManager.error("svn: '" + entry.getName()                            + "' has no URL");                }                SVNRevision revision = stealLock ? SVNRevision.UNDEFINED                        : SVNRevision.create(entry.getRevision());                entriesMap                        .put(entry.getURL(), new LockInfo(paths[i], revision));                wcAccess.getAnchor().getEntries().close();            } finally {                wcAccess.close(true);            }        }        for (Iterator urls = entriesMap.keySet().iterator(); urls.hasNext();) {            String url = (String) urls.next();            LockInfo info = (LockInfo) entriesMap.get(url);            SVNWCAccess wcAccess = createWCAccess(info.myFile);            SVNRepository repos = createRepository(url);            SVNLock lock;            try {                lock = repos.setLock("", lockMessage, stealLock,                        info.myRevision.getNumber());            } catch (SVNException error) {                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.LOCK_FAILED, null,                        error.getMessage()), ISVNEventHandler.UNKNOWN);                continue;            }            try {                wcAccess.open(true, false);                SVNEntry entry = wcAccess.getAnchor().getEntries().getEntry(                        wcAccess.getTargetName(), true);                entry.setLockToken(lock.getID());                entry.setLockComment(lock.getComment());                entry.setLockOwner(lock.getOwner());                entry.setLockCreationDate(TimeUtil.formatDate(lock.getCreationDate()));                if (wcAccess.getAnchor().getProperties(entry.getName(), false).getPropertyValue(SVNProperty.NEEDS_LOCK) != null) {                    SVNFileUtil.setReadonly(wcAccess.getAnchor().getFile(entry.getName()), false);                }                wcAccess.getAnchor().getEntries().save(true);                wcAccess.getAnchor().getEntries().close();                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.LOCKED, lock, null),                        ISVNEventHandler.UNKNOWN);            } catch (SVNException e) {                handleEvent(SVNEventFactory.createLockEvent(wcAccess, wcAccess                        .getTargetName(), SVNEventAction.LOCK_FAILED, lock, e                        .getMessage()), ISVNEventHandler.UNKNOWN);            } finally {                wcAccess.close(true);            }        }    }