Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r317 - in trunk/java/ch/idok: common/impl/repository/svn common/repository dmsd/impl/extractor/microsoft dmsd/impl/extractor/pdf service/client/search/rest service/common/admin service/server/admin service/server/search/lucene

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r317 - in trunk/java/ch/idok: common/impl/repository/svn common/repository dmsd/impl/extractor/microsoft dmsd/impl/extractor/pdf service/client/search/rest service/common/admin service/server/admin service/server/search/lucene


Chronological Thread 
  • From: "AFS account Stadler Hans Christian" <stadler_h AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r317 - in trunk/java/ch/idok: common/impl/repository/svn common/repository dmsd/impl/extractor/microsoft dmsd/impl/extractor/pdf service/client/search/rest service/common/admin service/server/admin service/server/search/lucene
  • Date: Wed, 21 Jan 2009 15:31:14 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: stadler_h
Date: Wed Jan 21 15:31:14 2009
New Revision: 317

Log:
Eliminated some eclipse warnings

Modified:
trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryDirEntry.java
trunk/java/ch/idok/common/impl/repository/svn/URITest.java
trunk/java/ch/idok/common/repository/Repository.java
trunk/java/ch/idok/common/repository/RepositoryManager.java

trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
trunk/java/ch/idok/dmsd/impl/extractor/pdf/PdfExtractorFactory.java
trunk/java/ch/idok/service/client/search/rest/RestSearchIterator.java
trunk/java/ch/idok/service/common/admin/AdminService.java
trunk/java/ch/idok/service/server/admin/Admin.java
trunk/java/ch/idok/service/server/admin/DmsLdap.java
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java

Modified: trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java
(original)
+++ trunk/java/ch/idok/common/impl/repository/svn/SvnRepository.java Wed
Jan 21 15:31:14 2009
@@ -360,7 +360,7 @@
// Store lock object in the SVNDirEntry and add it to the
// collection
logger_.finest("Handling SVNDirEntry " +
dirEntry.getURL());
- dirEntry.setLock((SVNLock)
locksMap.get(dirEntry.getURL()));
+ dirEntry.setLock(locksMap.get(dirEntry.getURL()));
entries.add(dirEntry);
}
};
@@ -856,7 +856,6 @@
* @throws SVNException
* @throws DmsException
*/
- @SuppressWarnings("unused")
private void processOps() throws SVNException, DmsException {
// Sort operations: breadth-first traversal of directory tree and
// operation type
@@ -908,7 +907,6 @@
*
* @throws DmsException
*/
- @SuppressWarnings("unused")
private void discardRedundantUpdates() throws DmsException {
for (Iterator<TransactionOp> it = operations_.iterator(); it
.hasNext();) {
@@ -1119,7 +1117,6 @@
public void lock(DocumentId docId, String comment, boolean force)
throws DmsException {
try {
- final DocumentId docId1 = docId;
Map<String, Long> pathsToRevisions = new HashMap<String, Long>();
pathsToRevisions.put(docId.toString(), Long
.valueOf(getRepositoryPath(docId).getDocumentVersion()
@@ -1137,10 +1134,8 @@
new ISVNLockHandler() {
public void handleLock(String path, SVNLock lock,
SVNErrorMessage error) throws SVNException {
- if (error != null) {
+ if (error != null)
throw new SVNException(error);
- } else {
- }
}

public void handleUnlock(String path, SVNLock lock,

Modified:
trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryDirEntry.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryDirEntry.java
(original)
+++ trunk/java/ch/idok/common/impl/repository/svn/SvnRepositoryDirEntry.java
Wed Jan 21 15:31:14 2009
@@ -202,8 +202,7 @@
public Date getLockDate() {
if (lock_ != null)
return lock_.getCreationDate();
- else
- return null;
+ return null;
}

/**
@@ -212,8 +211,7 @@
public String getLockOwner() {
if (lock_ != null)
return lock_.getOwner();
- else
- return null;
+ return null;
}

/**
@@ -229,8 +227,7 @@
public String getLockComment() {
if (lock_ != null)
return lock_.getComment();
- else
- return null;
+ return null;
}

}

Modified: trunk/java/ch/idok/common/impl/repository/svn/URITest.java
==============================================================================
--- trunk/java/ch/idok/common/impl/repository/svn/URITest.java (original)
+++ trunk/java/ch/idok/common/impl/repository/svn/URITest.java Wed Jan 21
15:31:14 2009
@@ -177,6 +177,7 @@
assertEquals("http://host/%C3%A4%20path";, uriNorm3.toString());
}

+ @SuppressWarnings("unused")
@Test
public void SVNEncodingUtilUriDecode() throws URISyntaxException {
// SVNEncodingUtil.uriDecode fails on partly decoded strings

Modified: trunk/java/ch/idok/common/repository/Repository.java
==============================================================================
--- trunk/java/ch/idok/common/repository/Repository.java (original)
+++ trunk/java/ch/idok/common/repository/Repository.java Wed Jan 21
15:31:14 2009
@@ -24,13 +24,7 @@
import java.net.URI;
import java.util.Map;

-import org.tmatesoft.svn.core.SVNErrorCode;
-import org.tmatesoft.svn.core.SVNErrorMessage;
-import org.tmatesoft.svn.core.internal.io.dav.http.IHTTPConnection;
-
import ch.idok.common.errorhandling.DmsException;
-import ch.idok.common.impl.repository.svn.SvnRepository;
-import
ch.idok.common.impl.repository.svn.kerberized.DmsHTTPConnectionFactory;

/**
* @brief An object of type Repository encapsulates one document repository.

Modified: trunk/java/ch/idok/common/repository/RepositoryManager.java
==============================================================================
--- trunk/java/ch/idok/common/repository/RepositoryManager.java (original)
+++ trunk/java/ch/idok/common/repository/RepositoryManager.java Wed Jan 21
15:31:14 2009
@@ -48,7 +48,7 @@
*/
enum LocationType {
HERE, PARENT, ROOT
- };
+ }

/**
* @brief Convert a repository identifier given as a URI to a
RepositoryId

Modified:
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
==============================================================================
---
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
(original)
+++
trunk/java/ch/idok/dmsd/impl/extractor/microsoft/MSOfficeExtractorFactory.java
Wed Jan 21 15:31:14 2009
@@ -81,6 +81,7 @@
process = proc;
}

+ @Override
public void run() {
process.destroy();
logger.fine("Killed process "+process+" due to lack of
progress");

Modified: trunk/java/ch/idok/dmsd/impl/extractor/pdf/PdfExtractorFactory.java
==============================================================================
--- trunk/java/ch/idok/dmsd/impl/extractor/pdf/PdfExtractorFactory.java
(original)
+++ trunk/java/ch/idok/dmsd/impl/extractor/pdf/PdfExtractorFactory.java Wed
Jan 21 15:31:14 2009
@@ -81,6 +81,8 @@
} catch (IOException ex) {
DmsException.throwIt(ErrorType.READ_DOC, this,
"Failed to read document", "", ex);
+ } catch (Throwable th) {
+ DmsException.throwIt(ErrorType.INTERNAL, this, "Bug
detected", "PdfBox failed while extracting document text", th);
}
return null;
}

Modified:
trunk/java/ch/idok/service/client/search/rest/RestSearchIterator.java
==============================================================================
--- trunk/java/ch/idok/service/client/search/rest/RestSearchIterator.java
(original)
+++ trunk/java/ch/idok/service/client/search/rest/RestSearchIterator.java
Wed Jan 21 15:31:14 2009
@@ -26,7 +26,6 @@
import javax.security.auth.Subject;
import javax.ws.rs.core.UriBuilder;

-import org.ietf.jgss.GSSException;
import org.restlet.Client;
import org.restlet.Context;
import org.restlet.data.ChallengeResponse;
@@ -42,9 +41,7 @@

import ch.idok.common.errorhandling.DmsException;
import ch.idok.common.errorhandling.ErrorType;
-import ch.idok.common.util.AuthUtil;
import ch.idok.common.util.DmsCredentials;
-import ch.idok.common.util.ServiceTokenAction;
import ch.idok.service.client.rest.RestClientProvider;
import ch.idok.service.common.Iterator;
import ch.idok.service.common.search.QueryMatch;
@@ -178,7 +175,7 @@
.getProperty("ch.idok.service.server.principal");
try {
// In Java 5 this ugly type cast is necessary
- final String token = (String) Subject.doAsPrivileged(cred
+ final String token = Subject.doAsPrivileged(cred
.getSubject(), new PrivilegedExceptionAction<String>() {
public String run() throws Exception {
return NegotiateFilter.buildToken64(serviceName);
@@ -249,8 +246,7 @@
public boolean hasNext() {
if (nextElement == null)
return false;
- else
- return true;
+ return true;
}

/**
@@ -274,7 +270,6 @@
QueryMatch result = nextElement;
if (result == null) {
destroy();
- return null;
} else {
index += 1;
if (hits.hasNext())
@@ -282,8 +277,8 @@
else {
fetch();
}
- return result;
}
+ return result;
}

/**

Modified: trunk/java/ch/idok/service/common/admin/AdminService.java
==============================================================================
--- trunk/java/ch/idok/service/common/admin/AdminService.java (original)
+++ trunk/java/ch/idok/service/common/admin/AdminService.java Wed Jan 21
15:31:14 2009
@@ -73,7 +73,7 @@
public String getAction() {
return action_;
}
- };
+ }

void createProject(DmsCredentials cred, String project, int quota)
throws DmsException;

Modified: trunk/java/ch/idok/service/server/admin/Admin.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/Admin.java (original)
+++ trunk/java/ch/idok/service/server/admin/Admin.java Wed Jan 21 15:31:14
2009
@@ -245,6 +245,7 @@
}

/** Return a list of all DMS projects */
+ @SuppressWarnings("unused")
public static Iterable<String> listProjects() throws DmsException {
File[] dirs = new File(projectRoot).listFiles(new FileFilter() {
public boolean accept(File file) {
@@ -264,6 +265,7 @@
}

/** Return a list of all repositories in a given DMS projects */
+ @SuppressWarnings("unused")
public static Iterable<String> listRepositories(String projectName)
throws DmsException {
File[] dirs = getProjectDir(projectName).listFiles(new FileFilter() {

Modified: trunk/java/ch/idok/service/server/admin/DmsLdap.java
==============================================================================
--- trunk/java/ch/idok/service/server/admin/DmsLdap.java (original)
+++ trunk/java/ch/idok/service/server/admin/DmsLdap.java Wed Jan 21
15:31:14 2009
@@ -155,8 +155,7 @@
try {
if (dnExists(ad_.ctx, groupDN))
return listMembers(ad_.ctx, groupDN);
- else
- return new String[] {};
+ return new String[] {};
} catch (NamingException e) {
throw new DmsException(ErrorType.BAD_CONNECTION, this,
"Could list members of distribution list",
@@ -279,7 +278,7 @@

String dn = null;
while (answer.hasMore()) {
- SearchResult sr = (SearchResult) answer.next();
+ SearchResult sr = answer.next();
dn = sr.getNameInNamespace();
}
return dn;

Modified:
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
==============================================================================
--- trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
(original)
+++ trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
Wed Jan 21 15:31:14 2009
@@ -191,18 +191,6 @@
/** @brief The HitIterator returning this matching document. */
private final HitIterator.RepoSearch repoSearch;

- @SuppressWarnings("deprecation")
- /**
- * @brief Constructor.
- * @param repo
- * The repository containing the document.
- * @param doc
- * The lucene document.
- * @param query
- * The lucene query.
- * @param resultType
- * The query result type.
- */
public MatchingDoc(HitIterator.RepoSearch rs, Document doc) {
repoSearch = rs;
document = doc;



  • [idok-commit] idok commit r317 - in trunk/java/ch/idok: common/impl/repository/svn common/repository dmsd/impl/extractor/microsoft dmsd/impl/extractor/pdf service/client/search/rest service/common/admin service/server/admin service/server/search/lucene, AFS account Stadler Hans Christian, 01/21/2009

Archive powered by MHonArc 2.6.19.

Top of Page