You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2015/10/27 18:04:01 UTC
[1/7] oodt git commit: supress warnings on query parser
Repository: oodt
Updated Branches:
refs/heads/master 54bfe3edf -> b8d99d611
supress warnings on query parser
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/76dfbadd
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/76dfbadd
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/76dfbadd
Branch: refs/heads/master
Commit: 76dfbadd68b7f1a3698ec28885d324bc8ed186c7
Parents: 96842a4
Author: Tom Barber <to...@analytical-labs.com>
Authored: Mon Oct 26 22:02:46 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Mon Oct 26 22:02:46 2015 +0000
----------------------------------------------------------------------
.../java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/76dfbadd/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java
index 289ce09..1c6311e 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java
@@ -8,7 +8,7 @@ import java.io.ByteArrayInputStream;
import java.util.HashSet;
import java.util.Properties;
import java.util.Vector;
-
+@SuppressWarnings("all")
public class QueryParser/*@bgen(jjtree)*/implements QueryParserTreeConstants, QueryParserConstants {/*@bgen(jjtree)*/
protected JJTQueryParserState jjtree = new JJTQueryParserState();
public static QueryExpression parseQueryExpression(String queryExpressionString) throws ParseException, TokenMgrError {
[4/7] oodt git commit: OODT-890 clean up a few exceptions to make
them relevant
Posted by ma...@apache.org.
OODT-890 clean up a few exceptions to make them relevant
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/4ed2a423
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/4ed2a423
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/4ed2a423
Branch: refs/heads/master
Commit: 4ed2a4236efa5aae46a2d12c4a3264223384f6a9
Parents: fae02f9
Author: Tom Barber <to...@analytical-labs.com>
Authored: Mon Oct 26 23:57:15 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Mon Oct 26 23:57:15 2015 +0000
----------------------------------------------------------------------
.../catalog/mapping/InMemoryIngestMapper.java | 3 +-
.../server/CatalogServiceCommandLineClient.java | 4 +-
.../server/CatalogServiceServerLauncher.java | 4 +-
.../AbstractCommunicationChannelServer.java | 234 ++++++++++---------
.../cli/action/DeleteProductByIdCliAction.java | 14 +-
.../cli/action/GetProductByIdCliAction.java | 8 +-
.../cli/action/GetProductByNameCliAction.java | 8 +-
.../cli/action/LuceneQueryCliAction.java | 23 +-
.../filemgr/cli/action/SqlQueryCliAction.java | 4 +-
.../resource/queuerepo/XmlQueueRepository.java | 2 +-
.../engine/processor/WorkflowProcessor.java | 2 +-
11 files changed, 164 insertions(+), 142 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/InMemoryIngestMapper.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/InMemoryIngestMapper.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/InMemoryIngestMapper.java
index dc04816..92daa04 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/InMemoryIngestMapper.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/InMemoryIngestMapper.java
@@ -21,6 +21,7 @@ import org.apache.oodt.commons.database.SqlScript;
//JDK imports
import java.io.File;
+import java.io.IOException;
/**
* @author bfoster
@@ -30,7 +31,7 @@ import java.io.File;
public class InMemoryIngestMapper extends DataSourceIngestMapper {
public InMemoryIngestMapper(String user, String pass, String driver,
- String jdbcUrl, String tablesFile) throws Exception {
+ String jdbcUrl, String tablesFile) throws IOException {
super(user, pass, driver, jdbcUrl);
SqlScript coreSchemaScript = new SqlScript(new File(tablesFile).getAbsolutePath(), this.dataSource);
coreSchemaScript.loadScript();
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceCommandLineClient.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceCommandLineClient.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceCommandLineClient.java
index 89135ed..df5b72b 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceCommandLineClient.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceCommandLineClient.java
@@ -18,6 +18,8 @@ package org.apache.oodt.cas.catalog.server;
//JDK imports
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
//OODT imports
import org.apache.oodt.cas.cli.CmdLineUtility;
@@ -29,7 +31,7 @@ import org.apache.oodt.cas.cli.CmdLineUtility;
*/
public class CatalogServiceCommandLineClient {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
// Load Catalog Service properties.
String propertiesFile = System
.getProperty("org.apache.oodt.cas.catalog.properties.file");
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceServerLauncher.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceServerLauncher.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceServerLauncher.java
index 163bdca..20700f5 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceServerLauncher.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/CatalogServiceServerLauncher.java
@@ -18,6 +18,8 @@ package org.apache.oodt.cas.catalog.server;
//JDK imports
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
//OODT imports
import org.apache.oodt.cas.cli.CmdLineUtility;
@@ -34,7 +36,7 @@ public class CatalogServiceServerLauncher {
private CatalogServiceServerLauncher() {}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
// Load Catalog Service properties.
String propertiesFile = System
.getProperty("org.apache.oodt.cas.catalog.properties.file");
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java
index 3549d86..252ca96 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/AbstractCommunicationChannelServer.java
@@ -17,14 +17,7 @@
package org.apache.oodt.cas.catalog.server.channel;
//JDK imports
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-//OODT imports
+import org.apache.oodt.cas.catalog.exception.CatalogServiceException;
import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
import org.apache.oodt.cas.catalog.page.CatalogReceipt;
import org.apache.oodt.cas.catalog.page.Page;
@@ -41,6 +34,15 @@ import org.apache.oodt.cas.catalog.util.PluginURL;
import org.apache.oodt.cas.catalog.util.Serializer;
import org.apache.oodt.cas.metadata.Metadata;
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+//OODT imports
+
/**
* @author bfoster
* @version $Revision$
@@ -73,23 +75,23 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
return this.port;
}
- public void shutdown() throws Exception {
+ public void shutdown() throws CatalogServiceException {
try {
this.catalogService.shutdown();
this.catalogService = null;
System.gc(); // used to speed up shutdown process (gives java a boost-start at cleaning up everything so server will die)
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed to shutdown server : " + e.getMessage(), e);
- throw new Exception("Failed to shutdown server : " + e.getMessage(), e);
+ throw e;
}
}
- public boolean isRestrictQueryPermissions() throws Exception {
+ public boolean isRestrictQueryPermissions() throws CatalogServiceException {
try {
return this.catalogService.isRestrictQueryPermissions();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while checking server query permissions : " + e.getMessage(), e);
- throw new Exception("Failed while checking server query permissions : " + e.getMessage(), e);
+ throw e;
}
}
//
@@ -97,12 +99,12 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// this.catalogService.setRestrictQueryPermissions(restrictQueryPermissions);
// }
//
- public boolean isRestrictIngestPermissions() throws Exception {
+ public boolean isRestrictIngestPermissions() throws CatalogServiceException {
try {
return this.catalogService.isRestrictIngestPermissions();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while checking server ingest permissions : " + e.getMessage(), e);
- throw new Exception("Failed while checking server ingest permissions : " + e.getMessage(), e);
+ throw e;
}
}
//
@@ -118,102 +120,102 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// this.catalogService.setTransactionIdClass(transactionIdClass);
// }
//
- public void addCatalog(Catalog catalog) throws Exception {
+ public void addCatalog(Catalog catalog) throws CatalogServiceException {
try {
this.catalogService.addCatalog(catalog);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalog + "' to server : " + e.getMessage(), e);
- throw new Exception("Failed while adding catalog '" + catalog + "' to server : " + e.getMessage(), e);
+ throw e;
}
}
- public void replaceCatalog(Catalog catalog) throws Exception {
+ public void replaceCatalog(Catalog catalog) throws CatalogServiceException {
try {
this.catalogService.replaceCatalog(catalog);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while replacing catalog '" + catalog + "' to server : " + e.getMessage(), e);
- throw new Exception("Failed while replacing catalog '" + catalog + "' to server : " + e.getMessage(), e);
+ throw e;
}
}
- public void addCatalog(String catalogId, Index index) throws Exception {
+ public void addCatalog(String catalogId, Index index) throws CatalogServiceException {
try {
this.catalogService.addCatalog(catalogId, index);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' to server : " + e.getMessage(), e);
- throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' to server : " + e.getMessage(), e);
+ throw e;
}
}
- public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws Exception {
+ public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries) throws CatalogServiceException {
try {
this.catalogService.addCatalog(catalogId, index, dictionaries);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' to server : " + e.getMessage(), e);
- throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' to server : " + e.getMessage(), e);
+ throw e;
}
}
- public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws Exception {
+ public void addCatalog(String catalogId, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermission, boolean restrictIngestPermission) throws CatalogServiceException {
try {
this.catalogService.addCatalog(catalogId, index, dictionaries, restrictQueryPermission, restrictIngestPermission);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' and restrictQueryPermission '" + restrictQueryPermission + "' and restrictIngestPermission '" + restrictIngestPermission + "' to server : " + e.getMessage(), e);
- throw new Exception("Failed while adding catalog '" + catalogId + "' with index '" + index + "' and dictionaries '" + dictionaries + "' and restrictQueryPermission '" + restrictQueryPermission + "' and restrictIngestPermission '" + restrictIngestPermission + "' to server : " + e.getMessage(), e);
+ throw e;
}
}
- public void addDictionary(String catalogId, Dictionary dictionary) throws Exception {
+ public void addDictionary(String catalogId, Dictionary dictionary) throws CatalogServiceException {
try {
this.catalogService.addDictionary(catalogId, dictionary);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding dictionary '" + dictionary + "' to catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while adding dictionary '" + dictionary + "' to catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public void replaceDictionaries(String catalogId, List<Dictionary> dictionaries) throws Exception {
+ public void replaceDictionaries(String catalogId, List<Dictionary> dictionaries) throws CatalogServiceException {
try {
this.catalogService.replaceDictionaries(catalogId, dictionaries);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while replacing dictionaries '" + dictionaries + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while replacing dictionaries '" + dictionaries + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public void replaceIndex(String catalogId, Index index) throws Exception {
+ public void replaceIndex(String catalogId, Index index) throws CatalogServiceException {
try {
this.catalogService.replaceIndex(catalogId, index);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while replacing index '" + index + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while replacing index '" + index + "' in catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public void modifyIngestPermission(String catalogId, boolean restrictIngestPermission) throws Exception {
+ public void modifyIngestPermission(String catalogId, boolean restrictIngestPermission) throws CatalogServiceException {
try {
this.catalogService.modifyIngestPermission(catalogId, restrictIngestPermission);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while changing ingest permissions for catalog '" + catalogId + "' to '" + restrictIngestPermission + "' : " + e.getMessage(), e);
- throw new Exception("Failed while changing ingest permissions for catalog '" + catalogId + "' to '" + restrictIngestPermission + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public void modifyQueryPermission(String catalogId, boolean restrictQueryPermission) throws Exception {
+ public void modifyQueryPermission(String catalogId, boolean restrictQueryPermission) throws CatalogServiceException {
try {
this.catalogService.modifyQueryPermission(catalogId, restrictQueryPermission);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while changing query permissions for catalog '" + catalogId + "' to '" + restrictQueryPermission + "' : " + e.getMessage(), e);
- throw new Exception("Failed while changing query permissions for catalog '" + catalogId + "' to '" + restrictQueryPermission + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public void removeCatalog(String catalogId) throws Exception {
+ public void removeCatalog(String catalogId) throws CatalogServiceException {
try {
this.catalogService.removeCatalog(catalogId);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while removing catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while removing catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
@@ -221,31 +223,31 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// this.catalogService.removeCatalog(catalogUrn, preserveMapping);
// }
- public List<PluginURL> getPluginUrls() throws Exception {
+ public List<PluginURL> getPluginUrls() throws CatalogServiceException {
try {
return this.catalogService.getPluginUrls();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting plugin URLs : " + e.getMessage(), e);
- throw new Exception("Failed while getting plugin URLs : " + e.getMessage(), e);
+ throw e;
}
}
- public void addPluginUrls(List<PluginURL> pluginURLs) throws Exception {
+ public void addPluginUrls(List<PluginURL> pluginURLs) throws CatalogServiceException {
try {
this.catalogService.addPluginUrls(pluginURLs);
this.serializer.refreshClassLoader();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while adding plugin URLs '" + pluginURLs + "' : " + e.getMessage(), e);
- throw new Exception("Failed while adding plugin URLs '" + pluginURLs + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public URL getPluginStorageDir() throws Exception {
+ public URL getPluginStorageDir() throws CatalogServiceException {
try {
return this.catalogService.getPluginStorageDir();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting plugin storage directory : " + e.getMessage(), e);
- throw new Exception("Failed while getting plugin storage directory : " + e.getMessage(), e);
+ throw e;
}
}
@@ -257,57 +259,57 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// return this.catalogService.getCatalog(catalogUrn);
// }
- public Set<String> getCurrentCatalogIds() throws Exception {
+ public Set<String> getCurrentCatalogIds() throws CatalogServiceException {
try {
return this.catalogService.getCurrentCatalogIds();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting current catalog ids : " + e.getMessage(), e);
- throw new Exception("Failed while getting current catalog ids : " + e.getMessage(), e);
+ throw e;
}
}
- public TransactionReceipt ingest(Metadata metadata) throws Exception {
+ public TransactionReceipt ingest(Metadata metadata) throws CatalogServiceException {
try {
return this.catalogService.ingest(metadata);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while performing ingest : " + e.getMessage(), e);
- throw new Exception("Failed while performing ingest : " + e.getMessage(), e);
+ throw e;
}
}
- public void delete(Metadata metadata) throws Exception {
+ public void delete(Metadata metadata) throws CatalogServiceException {
try {
this.catalogService.delete(metadata);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while performing deletion : " + e.getMessage(), e);
- throw new Exception("Failed while performing deletion : " + e.getMessage(), e);
+ throw e;
}
}
- public List<String> getProperty(String key) throws Exception {
+ public List<String> getProperty(String key) throws CatalogServiceException {
try {
return this.catalogService.getProperty(key);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting property '" + key + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting property '" + key + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public Properties getCalalogProperties() throws Exception {
+ public Properties getCalalogProperties() throws CatalogServiceException {
try {
return this.catalogService.getCalalogProperties();
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting catalog properties : " + e.getMessage(), e);
- throw new Exception("Failed while getting catalog properties : " + e.getMessage(), e);
+ throw e;
}
}
- public Properties getCalalogProperties(String catalogId) throws Exception {
+ public Properties getCalalogProperties(String catalogId) throws CatalogServiceException {
try {
return this.catalogService.getCalalogProperties(catalogId);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting catalog properties for catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting catalog properties for catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
@@ -319,30 +321,30 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// return this.catalogService.getFirstPage(queryExpression, catalogIds);
// }
- public Page getNextPage(Page page) throws Exception {
+ public Page getNextPage(Page page) throws CatalogServiceException {
try {
return this.catalogService.getNextPage(page);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting next page : " + e.getMessage(), e);
- throw new Exception("Failed while getting next page : " + e.getMessage(), e);
+ throw e;
}
}
- public Page getPage(PageInfo pageInfo, QueryExpression queryExpression) throws Exception {
+ public Page getPage(PageInfo pageInfo, QueryExpression queryExpression) throws CatalogServiceException {
try {
return this.catalogService.getPage(pageInfo, queryExpression);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "'] : " + e.getMessage(), e);
- throw new Exception("Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "'] : " + e.getMessage(), e);
+ throw e;
}
}
- public Page getPage(PageInfo pageInfo, QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+ public Page getPage(PageInfo pageInfo, QueryExpression queryExpression, Set<String> catalogIds) throws CatalogServiceException {
try {
return this.catalogService.getPage(pageInfo, queryExpression, catalogIds);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "',catalogIds='" + catalogIds + "'] : " + e.getMessage(), e);
- throw new Exception("Failed while getting next page [pageInfo='" + pageInfo + "',query='" + queryExpression + "',catalogIds='" + catalogIds + "'] : " + e.getMessage(), e);
+ throw e;
}
}
@@ -354,30 +356,30 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// return this.catalogService.getLastPage(queryExpression, catalogIds);
// }
- public List<TransactionalMetadata> getMetadata(Page page) throws Exception {
+ public List<TransactionalMetadata> getMetadata(Page page) throws CatalogServiceException {
try {
return this.catalogService.getMetadata(page);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting metadata for page : " + e.getMessage(), e);
- throw new Exception("Failed while getting metadata for page : " + e.getMessage(), e);
+ throw e;
}
}
- public QueryPager query(QueryExpression queryExpression) throws Exception {
+ public QueryPager query(QueryExpression queryExpression) throws CatalogServiceException {
try {
return this.catalogService.query(queryExpression);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while performing query '" + queryExpression + "' : " + e.getMessage(), e);
- throw new Exception("Failed while performing query '" + queryExpression + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public QueryPager query(QueryExpression queryExpression, Set<String> catalogIds) throws Exception {
+ public QueryPager query(QueryExpression queryExpression, Set<String> catalogIds) throws CatalogServiceException {
try {
return this.catalogService.query(queryExpression, catalogIds);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while performing query '" + queryExpression + "' to catalogs '" + catalogIds + "' : " + e.getMessage(), e);
- throw new Exception("Failed while performing query '" + queryExpression + "' to catalogs '" + catalogIds + "' : " + e.getMessage(), e);
+ throw e;
}
}
@@ -385,12 +387,12 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// return this.catalogService.query(queryExpression, sortResults);
// }
- public List<TransactionalMetadata> getNextPage(QueryPager queryPager) throws Exception {
+ public List<TransactionalMetadata> getNextPage(QueryPager queryPager) throws CatalogServiceException {
try {
return this.catalogService.getNextPage(queryPager);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while get next page from query pager : " + e.getMessage(), e);
- throw new Exception("Failed while get next page from query pager : " + e.getMessage(), e);
+ throw e;
}
}
@@ -398,57 +400,57 @@ public abstract class AbstractCommunicationChannelServer implements Communicatio
// return this.catalogService.getTransactionIdsForAllPages(queryPager);
// }
- public List<TransactionalMetadata> getAllPages(QueryPager queryPager) throws Exception {
+ public List<TransactionalMetadata> getAllPages(QueryPager queryPager) throws CatalogServiceException {
try {
return this.catalogService.getAllPages(queryPager);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while get all pages from query pager : " + e.getMessage(), e);
- throw new Exception("Failed while get all pages from query pager : " + e.getMessage(), e);
+ throw e;
}
}
- public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws Exception {
+ public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws CatalogServiceException {
try {
return this.catalogService.getMetadataFromTransactionIdStrings(catalogServiceTransactionIdStrings);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIdStrings + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIdStrings + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws Exception {
+ public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws CatalogServiceException {
try {
return this.catalogService.getMetadataFromTransactionIds(catalogServiceTransactionIds);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIds + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting metadata for catalog service transaction ids '" + catalogServiceTransactionIds + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogId) throws Exception {
+ public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogId) throws CatalogServiceException {
try {
return this.catalogService.getCatalogServiceTransactionIds(catalogTransactionIds, catalogId);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting catalog service transaction ids for catalog transaction ids '" + catalogTransactionIds + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting catalog service transaction ids for catalog transaction ids '" + catalogTransactionIds + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogId) throws Exception {
+ public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogId) throws CatalogServiceException {
try {
return this.catalogService.getCatalogServiceTransactionId(catalogTransactionId, catalogId);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting catalog service transaction id for catalog transaction id '" + catalogTransactionId + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting catalog service transaction id for catalog transaction id '" + catalogTransactionId + "' from catalog '" + catalogId + "' : " + e.getMessage(), e);
+ throw e;
}
}
- public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt, boolean generateNew) throws Exception {
+ public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt, boolean generateNew) throws CatalogServiceException {
try {
return this.catalogService.getCatalogServiceTransactionId(catalogReceipt, generateNew);
- }catch (Exception e) {
+ }catch (CatalogServiceException e) {
LOG.log(Level.SEVERE, "Failed while getting metadata for catalog service transaction id for catalog receipt '" + catalogReceipt + "' with generate new equal '" + generateNew + "' : " + e.getMessage(), e);
- throw new Exception("Failed while getting metadata for catalog service transaction id for catalog receipt '" + catalogReceipt + "' with generate new equal '" + generateNew + "' : " + e.getMessage(), e);
+ throw e;
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
index 49ab643..f28cf92 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
@@ -17,12 +17,18 @@
package org.apache.oodt.cas.filemgr.cli.action;
//Apache imports
-import org.apache.commons.lang.Validate;
-//OODT imports
+import org.apache.commons.lang.Validate;
import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+//OODT imports
+
/**
* A {@link CmdLineAction} which deletes a {@link Product} by ID.
*
@@ -33,13 +39,13 @@ public class DeleteProductByIdCliAction extends AbstractDeleteProductCliAction {
private String productId;
@Override
- public Product getProductToDelete() throws Exception {
+ public Product getProductToDelete() throws CatalogException, ConnectionException, MalformedURLException {
Validate.notNull(productId, "Must specify productId");
XmlRpcFileManagerClient client = getClient();
Product p = client.getProductById(productId);
if (p == null) {
- throw new Exception("FileManager returned null for product '"
+ throw new CatalogException("FileManager returned null for product '"
+ productId + "'");
}
return p;
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByIdCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByIdCliAction.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByIdCliAction.java
index 567b9c4..20d0ba8 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByIdCliAction.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByIdCliAction.java
@@ -21,6 +21,10 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
+
+import java.net.MalformedURLException;
/**
* A {@link CmdLineAction} which gets information about a {@link Product}
@@ -33,12 +37,12 @@ public class GetProductByIdCliAction extends AbstractGetProductCliAction {
private String productId;
@Override
- public Product getProduct() throws Exception {
+ public Product getProduct() throws MalformedURLException, ConnectionException, CatalogException {
Validate.notNull(productId, "Must specify productId");
Product p = getClient().getProductById(productId);
if (p == null) {
- throw new Exception("FileManager returned null product for id '"
+ throw new CatalogException("FileManager returned null product for id '"
+ productId + "'");
}
return p;
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByNameCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByNameCliAction.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByNameCliAction.java
index 23e5715..300643b 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByNameCliAction.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductByNameCliAction.java
@@ -21,6 +21,10 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
+
+import java.net.MalformedURLException;
/**
* A {@link CmdLineAction} which gets information about a {@link Product}
@@ -33,12 +37,12 @@ public class GetProductByNameCliAction extends AbstractGetProductCliAction {
private String productName;
@Override
- public Product getProduct() throws Exception {
+ public Product getProduct() throws MalformedURLException, ConnectionException, CatalogException {
Validate.notNull(productName, "Must specify productName");
Product p = getClient().getProductByName(productName);
if (p == null) {
- throw new Exception("FileManager returned null product for name '"
+ throw new CatalogException("FileManager returned null product for name '"
+ productName + "'");
}
return p;
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/LuceneQueryCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/LuceneQueryCliAction.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/LuceneQueryCliAction.java
index 6e87d28..f688478 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/LuceneQueryCliAction.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/LuceneQueryCliAction.java
@@ -16,10 +16,9 @@
*/
package org.apache.oodt.cas.filemgr.cli.action;
-//JDK imports
-import java.util.List;
-//Apache imports
+import com.google.common.collect.Lists;
+
import org.apache.commons.lang.Validate;
import org.apache.lucene.index.Term;
import org.apache.lucene.queryParser.ParseException;
@@ -30,17 +29,17 @@ import org.apache.lucene.search.PhraseQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.RangeQuery;
import org.apache.lucene.search.TermQuery;
-
-//OODT imports
import org.apache.oodt.cas.filemgr.structs.BooleanQueryCriteria;
import org.apache.oodt.cas.filemgr.structs.QueryCriteria;
import org.apache.oodt.cas.filemgr.structs.RangeQueryCriteria;
import org.apache.oodt.cas.filemgr.structs.TermQueryCriteria;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.QueryFormulationException;
import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
import org.apache.oodt.cas.filemgr.tools.CASAnalyzer;
-//Google imports
-import com.google.common.collect.Lists;
+import java.util.List;
+
/**
* A {@link CmdLineAction} which converts a Lucene-like query into a File
@@ -61,7 +60,7 @@ public class LuceneQueryCliAction extends AbstractQueryCliAction {
}
@Override
- public ComplexQuery getQuery() throws Exception {
+ public ComplexQuery getQuery() throws ParseException, CatalogException, QueryFormulationException {
Validate.notNull(query, "Must specify query");
ComplexQuery complexQuery = new ComplexQuery();
@@ -90,18 +89,18 @@ public class LuceneQueryCliAction extends AbstractQueryCliAction {
}
private QueryCriteria generateCASQuery(Query luceneQuery)
- throws Exception {
+ throws CatalogException, QueryFormulationException {
if (luceneQuery instanceof TermQuery) {
Term t = ((TermQuery) luceneQuery).getTerm();
if (t.field().equals(FREE_TEXT_BLOCK)) {
- throw new Exception("Free text blocks not supported!");
+ throw new CatalogException("Free text blocks not supported!");
} else {
return new TermQueryCriteria(t.field(), t.text());
}
} else if (luceneQuery instanceof PhraseQuery) {
Term[] t = ((PhraseQuery) luceneQuery).getTerms();
if (t[0].field().equals(FREE_TEXT_BLOCK)) {
- throw new Exception("Free text blocks not supported!");
+ throw new CatalogException("Free text blocks not supported!");
} else {
BooleanQueryCriteria bqc = new BooleanQueryCriteria();
bqc.setOperator(BooleanQueryCriteria.AND);
@@ -128,7 +127,7 @@ public class LuceneQueryCliAction extends AbstractQueryCliAction {
}
return bqc;
} else {
- throw new Exception(
+ throw new CatalogException(
"Error parsing query! Cannot determine clause type: ["
+ luceneQuery.getClass().getName() + "] !");
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/SqlQueryCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/SqlQueryCliAction.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/SqlQueryCliAction.java
index 280603f..a612b9a 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/SqlQueryCliAction.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/SqlQueryCliAction.java
@@ -20,6 +20,8 @@ package org.apache.oodt.cas.filemgr.cli.action;
import org.apache.commons.lang.Validate;
//OODT imports
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.structs.exceptions.QueryFormulationException;
import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
import org.apache.oodt.cas.filemgr.util.SqlParser;
@@ -38,7 +40,7 @@ public class SqlQueryCliAction extends AbstractQueryCliAction {
}
@Override
- public ComplexQuery getQuery() throws Exception {
+ public ComplexQuery getQuery() throws QueryFormulationException {
Validate.notNull(query, "Must specify query");
return SqlParser.parseSqlQuery(query);
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java b/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
index b8671cc..0c9917b 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
@@ -103,7 +103,7 @@ public class XmlQueueRepository implements QueueRepository {
String nodeId = ((Element) nodeList.item(k))
.getAttribute("id");
Vector assignments = (Vector) XmlStructFactory
- .getQueueAssignment(onodeList
+ .getQueueAssignment(nodeList
.item(k));
for (Object assignment : assignments) {
try {
http://git-wip-us.apache.org/repos/asf/oodt/blob/4ed2a423/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
index 64031d2..3c4b086 100755
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
@@ -235,7 +235,7 @@ public abstract class WorkflowProcessor implements WorkflowProcessorListener,
}
}
- } else if (this.iusDone().getName().equals("ResultsFailure")) {
+ } else if (this.isDone().getName().equals("ResultsFailure")) {
// do nothing -- this workflow failed!!!
} else if (this.isDone().getName().equals("ResultsBail")) {
for (WorkflowProcessor subProcessor : this.getRunnableSubProcessors())
[7/7] oodt git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/oodt
Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/oodt
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/b8d99d61
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/b8d99d61
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/b8d99d61
Branch: refs/heads/master
Commit: b8d99d6110ccb4f307a87dc8e56278f40b7b8e97
Parents: daf0904 54bfe3e
Author: Tom Barber <to...@analytical-labs.com>
Authored: Tue Oct 27 17:02:59 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Tue Oct 27 17:02:59 2015 +0000
----------------------------------------------------------------------
.gitignore | 3 +++
CHANGES.txt | 2 ++
.../cas/workflow/engine/IterativeWorkflowProcessorThread.java | 5 +++++
.../java/org/apache/oodt/cas/workflow/metadata/CoreMetKeys.java | 4 ++++
4 files changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/b8d99d61/CHANGES.txt
----------------------------------------------------------------------
[3/7] oodt git commit: OODT-890 make class static
Posted by ma...@apache.org.
OODT-890 make class static
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/fae02f97
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/fae02f97
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/fae02f97
Branch: refs/heads/master
Commit: fae02f97dc4ef06768b60535da675ca135ab5dd6
Parents: 733436e
Author: Tom Barber <to...@analytical-labs.com>
Authored: Mon Oct 26 23:04:47 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Mon Oct 26 23:04:47 2015 +0000
----------------------------------------------------------------------
.../oodt/cas/filemgr/browser/model/CasDB.java | 2 +-
.../catalog/mapping/DataSourceIngestMapper.java | 52 ++++++++++----------
.../repository/SerializedCatalogRepository.java | 8 +--
.../XmlRpcCommunicationChannelServer.java | 2 +-
.../struct/impl/index/DataSourceIndex.java | 52 ++++++++++----------
.../index/WorkflowManagerDataSourceIndex.java | 30 +++++------
.../system/impl/CatalogServiceLocal.java | 6 +--
.../cas/catalog/util/PluginClassLoader.java | 4 +-
.../org/apache/oodt/commons/MultiServer.java | 2 +-
.../commons/activity/SQLDatabaseRetrieval.java | 2 +-
.../apache/oodt/commons/exec/EnvUtilities.java | 6 +--
.../apache/oodt/commons/exec/ExecHelper.java | 6 +--
.../commons/object/jndi/ObjectNameParser.java | 2 +-
.../commons/activity/CompositeActivityTest.java | 36 +++++++-------
.../DatagramLoggingActivityFactoryTest.java | 2 +-
.../oodt/commons/activity/HistoryTest.java | 2 +-
.../commons/io/FixedBufferOutputStreamTest.java | 16 +++---
.../commons/object/jndi/ObjectContextTest.java | 10 ++--
.../commons/object/jndi/TestContextTest.java | 6 +--
.../cas/filemgr/catalog/solr/SolrClient.java | 2 +-
.../datatransfer/RemoteDataTransferer.java | 2 +-
.../filemgr/datatransfer/S3DataTransferer.java | 4 +-
.../oodt/cas/filemgr/ingest/RmiCache.java | 8 +--
.../java/org/apache/oodt/profile/Profile.java | 2 +-
.../apache/oodt/profile/ProfileAttributes.java | 2 +-
.../org/apache/oodt/profile/ProfileElement.java | 2 +-
.../apache/oodt/profile/ResourceAttributes.java | 2 +-
.../profile/EnumeratedProfileElementTest.java | 2 +-
.../oodt/profile/ResourceAttributesTest.java | 2 +-
.../action/CrossProtocolTransferCliAction.java | 2 +-
.../protocol/verify/BasicProtocolVerifier.java | 2 +-
.../protocol/auth/TestBasicAuthentication.java | 6 +--
.../oodt/cas/protocol/http/TestHttpFile.java | 4 +-
.../oodt/cas/protocol/imaps/ImapsProtocol.java | 8 +--
.../cas/protocol/imaps/TestImapsProtocol.java | 2 +-
.../cas/protocol/sftp/TestJschSftpProtocol.java | 4 +-
.../sftp/UnsupportedShellProcessProvider.java | 6 +--
.../apache/oodt/cas/pushpull/daemon/Daemon.java | 4 +-
.../cas/pushpull/daemon/DaemonLauncher.java | 2 +-
.../renamingconventions/RenamingConvention.java | 6 +--
.../cas/pushpull/protocol/ProtocolHandler.java | 4 +-
.../retrievalsystem/FileRetrievalSystem.java | 12 ++---
.../retrievalsystem/RetrievalSetup.java | 2 +-
.../cas/resource/batchmgr/XmlRpcBatchMgr.java | 2 +-
.../resource/jobrepo/XStreamJobRepository.java | 6 +--
.../cas/resource/mux/TestQueueMuxBatchmgr.java | 2 +-
.../cas/resource/mux/TestQueueMuxMonitor.java | 4 +-
.../engine/processor/TaskProcessor.java | 2 +-
.../processor/WorkflowProcessorHelper.java | 2 +-
.../oodt/cas/workflow/structs/TaskJob.java | 2 +-
.../workflow/system/XmlRpcWorkflowManager.java | 2 +-
.../xmlps/structs/CDEResultInputStream.java | 2 +-
.../oodt/xmlquery/CompressedObjectCodec.java | 4 +-
.../oodt/xmlquery/CompressedStringCodec.java | 4 +-
.../org/apache/oodt/xmlquery/ObjectCodec.java | 4 +-
.../org/apache/oodt/xmlquery/QueryElement.java | 2 +-
.../org/apache/oodt/xmlquery/QueryHeader.java | 2 +-
.../java/org/apache/oodt/xmlquery/XMLQuery.java | 2 +-
.../apache/oodt/xmlquery/CodecFactoryTest.java | 2 +-
.../org/apache/oodt/xmlquery/HeaderTest.java | 2 +-
.../org/apache/oodt/xmlquery/ResultTest.java | 2 +-
61 files changed, 193 insertions(+), 193 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
----------------------------------------------------------------------
diff --git a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
index ca24c4f..5359941 100644
--- a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
+++ b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
@@ -104,7 +104,7 @@ public class CasDB {
try {
e = client.getElementByName(elementName);
elementID = e.getElementId();
- } catch (ValidationLayerException e1) {
+ } catch (ValidationLayerException ignored) {
}
return elementID;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/DataSourceIngestMapper.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/DataSourceIngestMapper.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/DataSourceIngestMapper.java
index 081b6d6..25ea22b 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/DataSourceIngestMapper.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/mapping/DataSourceIngestMapper.java
@@ -69,10 +69,10 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -91,10 +91,10 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -113,10 +113,10 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -140,13 +140,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -170,13 +170,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -201,13 +201,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -237,13 +237,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -263,13 +263,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -299,10 +299,10 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -329,13 +329,13 @@ public class DataSourceIngestMapper implements IngestMapper {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
index 7cbb8ff..65465bb 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
@@ -89,7 +89,7 @@ public class SerializedCatalogRepository implements CatalogRepository {
}finally {
try {
catalogIn.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
@@ -136,7 +136,7 @@ public class SerializedCatalogRepository implements CatalogRepository {
}finally {
try {
catalogOut.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
@@ -156,7 +156,7 @@ public class SerializedCatalogRepository implements CatalogRepository {
}finally {
try {
urlsOut.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
@@ -172,7 +172,7 @@ public class SerializedCatalogRepository implements CatalogRepository {
}finally {
try {
urlsIn.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
index 0b62850..7d5248d 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
@@ -147,7 +147,7 @@ public class XmlRpcCommunicationChannelServer extends
} finally {
try {
fOut.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
return true;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/DataSourceIndex.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/DataSourceIndex.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/DataSourceIndex.java
index e9a945a..52e8e78 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/DataSourceIndex.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/DataSourceIndex.java
@@ -86,13 +86,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -169,13 +169,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -198,10 +198,10 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -236,10 +236,10 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -268,10 +268,10 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -302,10 +302,10 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -339,13 +339,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -386,13 +386,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -419,13 +419,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -453,13 +453,13 @@ public class DataSourceIndex implements Index, IngestService, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/WorkflowManagerDataSourceIndex.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/WorkflowManagerDataSourceIndex.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/WorkflowManagerDataSourceIndex.java
index aaebda5..c331c1a 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/WorkflowManagerDataSourceIndex.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/struct/impl/index/WorkflowManagerDataSourceIndex.java
@@ -98,13 +98,13 @@ public class WorkflowManagerDataSourceIndex implements Index, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -130,13 +130,13 @@ public class WorkflowManagerDataSourceIndex implements Index, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -169,13 +169,13 @@ public class WorkflowManagerDataSourceIndex implements Index, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -201,13 +201,13 @@ public class WorkflowManagerDataSourceIndex implements Index, QueryService {
}finally {
try {
conn.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
stmt.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
try {
rs.close();
- }catch(Exception e) {}
+ }catch(Exception ignored) {}
}
}
@@ -235,15 +235,15 @@ public class WorkflowManagerDataSourceIndex implements Index, QueryService {
} finally {
try {
conn.close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
try {
stmt.close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
try {
rs.close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
index 8cbf1f5..9346255 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
@@ -191,7 +191,7 @@ public class CatalogServiceLocal implements CatalogService {
if (!this.containsCatalog(catalogId)) {
try {
this.replaceCatalog(new Catalog(catalogId, index, null, false, false));
- }catch (Exception e) {
+ }catch (Exception ignored) {
}
} else {
@@ -203,7 +203,7 @@ public class CatalogServiceLocal implements CatalogService {
if (!this.containsCatalog(catalogId)) {
try {
this.replaceCatalog(new Catalog(catalogId, index, dictionaries, false, false));
- }catch (Exception e) {
+ }catch (Exception ignored) {
}
} else {
@@ -215,7 +215,7 @@ public class CatalogServiceLocal implements CatalogService {
if (!this.containsCatalog(catalogId)) {
try {
this.replaceCatalog(new Catalog(catalogId, index, dictionaries, restrictQueryPermission, restrictIngestPermission));
- }catch (Exception e) {
+ }catch (Exception ignored) {
}
} else {
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/catalog/src/main/java/org/apache/oodt/cas/catalog/util/PluginClassLoader.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/util/PluginClassLoader.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/util/PluginClassLoader.java
index d1c7d7d..c72f6fb 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/util/PluginClassLoader.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/util/PluginClassLoader.java
@@ -78,7 +78,7 @@ public class PluginClassLoader extends URLClassLoader {
}
}
}
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
return urls.toArray(new URL[urls.size()]);
}
@@ -88,7 +88,7 @@ public class PluginClassLoader extends URLClassLoader {
if (clazz == null)
clazz = this.findClass(name);
return clazz;
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
return super.loadClass(name, resolve);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/main/java/org/apache/oodt/commons/MultiServer.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/MultiServer.java b/commons/src/main/java/org/apache/oodt/commons/MultiServer.java
index b26ed09..f320bd4 100644
--- a/commons/src/main/java/org/apache/oodt/commons/MultiServer.java
+++ b/commons/src/main/java/org/apache/oodt/commons/MultiServer.java
@@ -571,7 +571,7 @@ public class MultiServer {
public void run() {
try {
context.rebind(name, servant);
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/main/java/org/apache/oodt/commons/activity/SQLDatabaseRetrieval.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/activity/SQLDatabaseRetrieval.java b/commons/src/main/java/org/apache/oodt/commons/activity/SQLDatabaseRetrieval.java
index 276f7d3..3d1197f 100644
--- a/commons/src/main/java/org/apache/oodt/commons/activity/SQLDatabaseRetrieval.java
+++ b/commons/src/main/java/org/apache/oodt/commons/activity/SQLDatabaseRetrieval.java
@@ -161,7 +161,7 @@ public class SQLDatabaseRetrieval implements Retrieval {
if (stmt != null) stmt.close();
if (conn != null) conn.close();
}
- catch (SQLException e) {}
+ catch (SQLException ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java b/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
index 3e7fd2c..9e0eafd 100644
--- a/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
+++ b/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
@@ -105,17 +105,17 @@ public final class EnvUtilities {
try {
if (p.getErrorStream() != null)
p.getErrorStream().close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
try {
if (p.getInputStream() != null)
p.getInputStream().close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
try {
if (p.getOutputStream() != null)
p.getOutputStream().close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/main/java/org/apache/oodt/commons/exec/ExecHelper.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/exec/ExecHelper.java b/commons/src/main/java/org/apache/oodt/commons/exec/ExecHelper.java
index b6730a5..6429cfe 100644
--- a/commons/src/main/java/org/apache/oodt/commons/exec/ExecHelper.java
+++ b/commons/src/main/java/org/apache/oodt/commons/exec/ExecHelper.java
@@ -402,13 +402,13 @@ public final class ExecHelper {
}finally {
try {
process.getErrorStream().close();
- } catch (Exception e) {}
+ } catch (Exception ignored) {}
try {
process.getInputStream().close();
- } catch (Exception e) {}
+ } catch (Exception ignored) {}
try {
process.getOutputStream().close();
- } catch (Exception e) {}
+ } catch (Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/main/java/org/apache/oodt/commons/object/jndi/ObjectNameParser.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/object/jndi/ObjectNameParser.java b/commons/src/main/java/org/apache/oodt/commons/object/jndi/ObjectNameParser.java
index 3b9f06e..9673c33 100644
--- a/commons/src/main/java/org/apache/oodt/commons/object/jndi/ObjectNameParser.java
+++ b/commons/src/main/java/org/apache/oodt/commons/object/jndi/ObjectNameParser.java
@@ -26,7 +26,7 @@ import javax.naming.NamingException;
* @author Kelly
*/
class ObjectNameParser implements NameParser {
- private static Properties syntax = new Properties(); {
+ private static Properties syntax = new Properties(); static {
syntax.put("jndi.syntax.direction", "flat");
syntax.put("jndi.syntax.ignorecase", "false");
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/activity/CompositeActivityTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/activity/CompositeActivityTest.java b/commons/src/test/java/org/apache/oodt/commons/activity/CompositeActivityTest.java
index 7444fd6..a87c769 100755
--- a/commons/src/test/java/org/apache/oodt/commons/activity/CompositeActivityTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/activity/CompositeActivityTest.java
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.oodt.commons.activity;
@@ -40,11 +40,11 @@ public class CompositeActivityTest extends TestCase {
try {
new CompositeActivity(null);
fail("Can contruct CompositeActivity with null collection");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
try {
new CompositeActivity(Collections.singleton("hello"));
fail("Can construct CompositeActivity with non-Activity in collection");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
CompositeActivity ca = new CompositeActivity(Collections.singleton(new TestActivity()));
Incident i = new Incident();
ca.log(i);
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/activity/DatagramLoggingActivityFactoryTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/activity/DatagramLoggingActivityFactoryTest.java b/commons/src/test/java/org/apache/oodt/commons/activity/DatagramLoggingActivityFactoryTest.java
index e172843..3d29760 100755
--- a/commons/src/test/java/org/apache/oodt/commons/activity/DatagramLoggingActivityFactoryTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/activity/DatagramLoggingActivityFactoryTest.java
@@ -70,7 +70,7 @@ public class DatagramLoggingActivityFactoryTest extends TestCase {
try {
new DatagramLoggingActivityFactory();
fail("Can make a DatagramLoggingActivityFactory without host property set");
- } catch (IllegalStateException ex) {}
+ } catch (IllegalStateException ignored) {}
System.setProperty("org.apache.oodt.commons.activity.DatagramLoggingActivityFactory.host", "localhost");
System.setProperty("activity.host", "non-existent-host");
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/activity/HistoryTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/activity/HistoryTest.java b/commons/src/test/java/org/apache/oodt/commons/activity/HistoryTest.java
index b2bc65c..dbe8b4f 100755
--- a/commons/src/test/java/org/apache/oodt/commons/activity/HistoryTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/activity/HistoryTest.java
@@ -71,7 +71,7 @@ public class HistoryTest extends TestCase implements Storage {
try {
history.addIncident(three);
fail("Able to add Incidents with non-matching activity IDs");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
}
/**
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/io/FixedBufferOutputStreamTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/io/FixedBufferOutputStreamTest.java b/commons/src/test/java/org/apache/oodt/commons/io/FixedBufferOutputStreamTest.java
index b08ee73..5de8ebe 100644
--- a/commons/src/test/java/org/apache/oodt/commons/io/FixedBufferOutputStreamTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/io/FixedBufferOutputStreamTest.java
@@ -38,32 +38,32 @@ public class FixedBufferOutputStreamTest extends TestCase {
try {
new FixedBufferOutputStream(-1);
fail("Illegal size failed to throw exception");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
FixedBufferOutputStream out = new FixedBufferOutputStream(100);
try {
out.write(null);
fail("Writing a null byte array failed to throw exception");
- } catch (NullPointerException good) {}
+ } catch (NullPointerException ignored) {}
try {
out.write(null, 0, 10);
fail("Writing a null byte array failed to throw exception");
- } catch (NullPointerException good) {}
+ } catch (NullPointerException ignored) {}
try {
out.write(TEST_DATA, -1, 10);
fail("Writing with negative offset failed to throw exception");
- } catch (IndexOutOfBoundsException good) {}
+ } catch (IndexOutOfBoundsException ignored) {}
try {
out.write(TEST_DATA, TEST_DATA.length + 1, 10);
fail("Writing with offset past end of array failed to throw exception");
- } catch (IndexOutOfBoundsException good) {}
+ } catch (IndexOutOfBoundsException ignored) {}
try {
out.write(TEST_DATA, 0, -1);
fail("Writing with negative length array failed to throw exception");
- } catch (IndexOutOfBoundsException good) {}
+ } catch (IndexOutOfBoundsException ignored) {}
try {
out.write(TEST_DATA, 2, 5);
fail("Writing with offset and length exceeding end of array failed to throw exception");
- } catch (IndexOutOfBoundsException good) {}
+ } catch (IndexOutOfBoundsException ignored) {}
}
/** Test a stream with space for no bytes at all.
@@ -172,7 +172,7 @@ public class FixedBufferOutputStreamTest extends TestCase {
try { // ...and try...
out.write(1); // ...to write to it
fail("Writing to a closed stream failed to throw an exception"); // Shouldn't get here
- } catch (IOException good) {} // Should get here
+ } catch (IOException ignored) {} // Should get here
}
/** Some test data in an array. */
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/object/jndi/ObjectContextTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/object/jndi/ObjectContextTest.java b/commons/src/test/java/org/apache/oodt/commons/object/jndi/ObjectContextTest.java
index 899c1e7..327afa7 100644
--- a/commons/src/test/java/org/apache/oodt/commons/object/jndi/ObjectContextTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/object/jndi/ObjectContextTest.java
@@ -87,13 +87,13 @@ public class ObjectContextTest extends TestCase {
try {
context.lookup("urn:a:x");
fail("Found nonexistent object");
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
// Test binding names that don't match any delegate's namespace prefix.
try {
context.bind("urn:c:x", this);
fail("Bound nonconforming name");
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
// Test binding and retrieval
context.bind("urn:a:x", this); // Bind something
@@ -113,7 +113,7 @@ public class ObjectContextTest extends TestCase {
try {
context.bind("urn:a:x", "");
fail("Able to bind an already-bound name");
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
// Test rebinding a bound name
context.rebind("urn:a:x", context); // Bind to a different object
@@ -127,7 +127,7 @@ public class ObjectContextTest extends TestCase {
try {
context.lookup("urn:a:x"); // Look it up
fail("Found object under old name");
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
assertSame(context, context.lookup("urn:a:y")); // Just the name has changed
assertTrue(a1.bindings.keySet().contains("urn:a:y")); // The new name is in a1
assertTrue(!a1.bindings.keySet().contains("urn:a:x")); // But not the old
@@ -178,7 +178,7 @@ public class ObjectContextTest extends TestCase {
try {
context.lookup("urn:a:y"); // Look it up
fail("Found unbound object");
- } catch (NamingException ex) {}
+ } catch (NamingException ignored) {}
assertTrue(a1.bindings.isEmpty()); // It's not in a1...
assertTrue(a2.bindings.isEmpty()); // ...nor in a2
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java
----------------------------------------------------------------------
diff --git a/commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java b/commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java
index f433a1f..523f8bc 100644
--- a/commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java
+++ b/commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java
@@ -50,12 +50,12 @@ public class TestContextTest extends TestCase {
try {
ctx.lookup("urn:x:y"); // Lookup a nonexistent binding
fail("Got a binding that doesn't exist"); // Got something? Yikes.
- } catch (NameNotFoundException ex) {}
+ } catch (NameNotFoundException ignored) {}
try {
ctx.bind("urn:y:z", this); // Bind an invalid prefix
fail("Bound an invalid prefix"); // Worked? Dang.
- } catch (InvalidNameException ex) {}
+ } catch (InvalidNameException ignored) {}
ctx.bind("urn:x:a", this); // Bind something.
assertSame(this, ctx.lookup("urn:x:a")); // Look it up
@@ -63,7 +63,7 @@ public class TestContextTest extends TestCase {
try {
ctx.bind("urn:x:a", getClass()); // Bind it again
fail("Able to re-bind"); // Worked? Crap.
- } catch (NameAlreadyBoundException ex) {}
+ } catch (NameAlreadyBoundException ignored) {}
ctx.rebind("urn:x:a", getClass()); // Rebind it again
assertSame(getClass(), ctx.lookup("urn:x:a")); // Look it up
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrClient.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrClient.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrClient.java
index 7b2c016..dbae244 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrClient.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrClient.java
@@ -305,7 +305,7 @@ public class SolrClient {
} finally {
// must release the connection even if an exception occurred
method.releaseConnection();
- if (br!=null) try { br.close(); } catch (Exception e) {}
+ if (br!=null) try { br.close(); } catch (Exception ignored) {}
}
return response.toString();
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
index 5f9f287..66c8172 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
@@ -187,7 +187,7 @@ public class RemoteDataTransferer implements DataTransfer {
} finally {
try {
fOut.close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
index 1c813f1..e7f9385 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
@@ -116,8 +116,8 @@ public class S3DataTransferer implements DataTransfer {
stripProtocol(ref.getDataStoreReference(), false)).getName()));
IOUtils.copy(inStream, outStream);
} finally {
- try { inStream.close(); } catch (Exception e) {}
- try { outStream.close(); } catch (Exception e) {}
+ try { inStream.close(); } catch (Exception ignored) {}
+ try { outStream.close(); } catch (Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
index df3e2a9..702b537 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
@@ -59,7 +59,7 @@ public class RmiCache implements Cache {
public void clear() {
try {
rmiCacheServer.clear();
- } catch (RemoteException e) {
+ } catch (RemoteException ignored) {
}
}
@@ -85,7 +85,7 @@ public class RmiCache implements Cache {
public void setFileManager(URL fmUrl) {
try {
rmiCacheServer.setFileManager(fmUrl);
- } catch (RemoteException e) {
+ } catch (RemoteException ignored) {
}
@@ -144,7 +144,7 @@ public class RmiCache implements Cache {
try {
rmiCacheServer
.setUniqueElementProductTypeNames(uniqueElementProductTypeNames);
- } catch (RemoteException e) {
+ } catch (RemoteException ignored) {
}
}
@@ -170,7 +170,7 @@ public class RmiCache implements Cache {
public void setUniqueElementName(String uniqueElementName) {
try {
rmiCacheServer.setUniqueElementName(uniqueElementName);
- } catch (RemoteException e) {
+ } catch (RemoteException ignored) {
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/main/java/org/apache/oodt/profile/Profile.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/oodt/profile/Profile.java b/profile/src/main/java/org/apache/oodt/profile/Profile.java
index 69820b5..255c649 100644
--- a/profile/src/main/java/org/apache/oodt/profile/Profile.java
+++ b/profile/src/main/java/org/apache/oodt/profile/Profile.java
@@ -200,7 +200,7 @@ public class Profile implements Serializable, Cloneable, Comparable<Object>, Doc
Object clone = null;
try {
clone = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return clone;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/main/java/org/apache/oodt/profile/ProfileAttributes.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/oodt/profile/ProfileAttributes.java b/profile/src/main/java/org/apache/oodt/profile/ProfileAttributes.java
index 3b17624..fca45dd 100644
--- a/profile/src/main/java/org/apache/oodt/profile/ProfileAttributes.java
+++ b/profile/src/main/java/org/apache/oodt/profile/ProfileAttributes.java
@@ -126,7 +126,7 @@ public class ProfileAttributes implements Serializable, Cloneable, Comparable, D
Object clone = null;
try {
clone = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return clone;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/main/java/org/apache/oodt/profile/ProfileElement.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/oodt/profile/ProfileElement.java b/profile/src/main/java/org/apache/oodt/profile/ProfileElement.java
index 58664dc..e1420ee 100644
--- a/profile/src/main/java/org/apache/oodt/profile/ProfileElement.java
+++ b/profile/src/main/java/org/apache/oodt/profile/ProfileElement.java
@@ -172,7 +172,7 @@ public abstract class ProfileElement implements Serializable, Cloneable, Compara
Object obj = null;
try {
obj = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return obj;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/main/java/org/apache/oodt/profile/ResourceAttributes.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/oodt/profile/ResourceAttributes.java b/profile/src/main/java/org/apache/oodt/profile/ResourceAttributes.java
index d414ce9..c27ed77 100644
--- a/profile/src/main/java/org/apache/oodt/profile/ResourceAttributes.java
+++ b/profile/src/main/java/org/apache/oodt/profile/ResourceAttributes.java
@@ -194,7 +194,7 @@ public class ResourceAttributes implements Serializable, Cloneable, Comparable<O
Object clone = null;
try {
clone = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return clone;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/test/java/org/apache/oodt/profile/EnumeratedProfileElementTest.java
----------------------------------------------------------------------
diff --git a/profile/src/test/java/org/apache/oodt/profile/EnumeratedProfileElementTest.java b/profile/src/test/java/org/apache/oodt/profile/EnumeratedProfileElementTest.java
index c89a79d..d8defac 100644
--- a/profile/src/test/java/org/apache/oodt/profile/EnumeratedProfileElementTest.java
+++ b/profile/src/test/java/org/apache/oodt/profile/EnumeratedProfileElementTest.java
@@ -65,7 +65,7 @@ public class EnumeratedProfileElementTest extends ProfileElementTestCase {
"test", "test", "test", "test", "test", Collections.EMPTY_LIST, /*obligation*/true, /*maxOccur*/1,
"comment", Collections.singletonList(null));
fail("Null values must not be allowed as values in enumerated elements.");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
}
protected void checkEnumFlag(String text) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/profile/src/test/java/org/apache/oodt/profile/ResourceAttributesTest.java
----------------------------------------------------------------------
diff --git a/profile/src/test/java/org/apache/oodt/profile/ResourceAttributesTest.java b/profile/src/test/java/org/apache/oodt/profile/ResourceAttributesTest.java
index ac216e7..b69bd37 100644
--- a/profile/src/test/java/org/apache/oodt/profile/ResourceAttributesTest.java
+++ b/profile/src/test/java/org/apache/oodt/profile/ResourceAttributesTest.java
@@ -166,7 +166,7 @@ public class ResourceAttributesTest extends TestCase {
t.transform(s, r);
}
- static ResourceAttributes TEST_RESOURCE_ATTRIBUTES; {
+ static ResourceAttributes TEST_RESOURCE_ATTRIBUTES; static {
List contexts = Collections.singletonList("context");
List locations = Collections.singletonList("location");
TEST_RESOURCE_ATTRIBUTES = new ResourceAttributes(null, "identifier", "title",
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/api/src/main/java/org/apache/oodt/cas/protocol/cli/action/CrossProtocolTransferCliAction.java
----------------------------------------------------------------------
diff --git a/protocol/api/src/main/java/org/apache/oodt/cas/protocol/cli/action/CrossProtocolTransferCliAction.java b/protocol/api/src/main/java/org/apache/oodt/cas/protocol/cli/action/CrossProtocolTransferCliAction.java
index 84feeb8..94005e7 100644
--- a/protocol/api/src/main/java/org/apache/oodt/cas/protocol/cli/action/CrossProtocolTransferCliAction.java
+++ b/protocol/api/src/main/java/org/apache/oodt/cas/protocol/cli/action/CrossProtocolTransferCliAction.java
@@ -107,7 +107,7 @@ public class CrossProtocolTransferCliAction extends ProtocolCliAction {
} finally {
try {
bogusFile.delete();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/api/src/main/java/org/apache/oodt/cas/protocol/verify/BasicProtocolVerifier.java
----------------------------------------------------------------------
diff --git a/protocol/api/src/main/java/org/apache/oodt/cas/protocol/verify/BasicProtocolVerifier.java b/protocol/api/src/main/java/org/apache/oodt/cas/protocol/verify/BasicProtocolVerifier.java
index 93df18c..f3921c3 100644
--- a/protocol/api/src/main/java/org/apache/oodt/cas/protocol/verify/BasicProtocolVerifier.java
+++ b/protocol/api/src/main/java/org/apache/oodt/cas/protocol/verify/BasicProtocolVerifier.java
@@ -75,7 +75,7 @@ public class BasicProtocolVerifier implements ProtocolVerifier {
+ " failed compatibility test : " + e.getMessage(), e);
return false;
} finally {
- try { protocol.close(); } catch (Exception e) {}
+ try { protocol.close(); } catch (Exception ignored) {}
}
return true;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/api/src/test/java/org/apache/oodt/cas/protocol/auth/TestBasicAuthentication.java
----------------------------------------------------------------------
diff --git a/protocol/api/src/test/java/org/apache/oodt/cas/protocol/auth/TestBasicAuthentication.java b/protocol/api/src/test/java/org/apache/oodt/cas/protocol/auth/TestBasicAuthentication.java
index 149e583..ab40e7f 100644
--- a/protocol/api/src/test/java/org/apache/oodt/cas/protocol/auth/TestBasicAuthentication.java
+++ b/protocol/api/src/test/java/org/apache/oodt/cas/protocol/auth/TestBasicAuthentication.java
@@ -36,14 +36,14 @@ public class TestBasicAuthentication extends TestCase {
try {
new BasicAuthentication(null, "pass");
fail("Should have thrown IllegalArgumentException");
- }catch (IllegalArgumentException e) {}
+ }catch (IllegalArgumentException ignored) {}
try {
new BasicAuthentication("user", null);
fail("Should have thrown IllegalArgumentException");
- }catch (IllegalArgumentException e) {}
+ }catch (IllegalArgumentException ignored) {}
try {
new BasicAuthentication(null, null);
fail("Should have thrown IllegalArgumentException");
- }catch (IllegalArgumentException e) {}
+ }catch (IllegalArgumentException ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/http/src/test/java/org/apache/oodt/cas/protocol/http/TestHttpFile.java
----------------------------------------------------------------------
diff --git a/protocol/http/src/test/java/org/apache/oodt/cas/protocol/http/TestHttpFile.java b/protocol/http/src/test/java/org/apache/oodt/cas/protocol/http/TestHttpFile.java
index c9b451a..f0ad7b4 100644
--- a/protocol/http/src/test/java/org/apache/oodt/cas/protocol/http/TestHttpFile.java
+++ b/protocol/http/src/test/java/org/apache/oodt/cas/protocol/http/TestHttpFile.java
@@ -44,10 +44,10 @@ public class TestHttpFile extends TestCase {
try {
new HttpFile(null, false, new URL("http://some-site"));
fail("Should have thrown an IllegalArgumentException");
- } catch (IllegalArgumentException e) {}
+ } catch (IllegalArgumentException ignored) {}
try {
new HttpFile("/path/to/file", false, null);
fail("Should have thrown an IllegalArgumentException");
- } catch (IllegalArgumentException e) {}
+ } catch (IllegalArgumentException ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/imaps/src/main/java/org/apache/oodt/cas/protocol/imaps/ImapsProtocol.java
----------------------------------------------------------------------
diff --git a/protocol/imaps/src/main/java/org/apache/oodt/cas/protocol/imaps/ImapsProtocol.java b/protocol/imaps/src/main/java/org/apache/oodt/cas/protocol/imaps/ImapsProtocol.java
index b09a4d7..e5fdf5f 100644
--- a/protocol/imaps/src/main/java/org/apache/oodt/cas/protocol/imaps/ImapsProtocol.java
+++ b/protocol/imaps/src/main/java/org/apache/oodt/cas/protocol/imaps/ImapsProtocol.java
@@ -180,7 +180,7 @@ public class ImapsProtocol implements Protocol {
} finally {
try {
closeFolder(currentFolder);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
@@ -242,7 +242,7 @@ public class ImapsProtocol implements Protocol {
} finally {
try {
closeFolder(currentFolder);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
// }
@@ -271,7 +271,7 @@ public class ImapsProtocol implements Protocol {
} finally {
try {
closeFolder(currentFolder);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
return currentFilesForCurrentFolder;
@@ -368,7 +368,7 @@ public class ImapsProtocol implements Protocol {
if (openCalls <= 0) {
try {
folder.close(true);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java
----------------------------------------------------------------------
diff --git a/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java b/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java
index 0c7501f..f2b78b3 100644
--- a/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java
+++ b/protocol/imaps/src/test/java/org/apache/oodt/cas/protocol/imaps/TestImapsProtocol.java
@@ -69,7 +69,7 @@ public class TestImapsProtocol extends TestCase {
gMail.stop();
try {
imapsProtocol.close();
- } catch (Exception e) {}
+ } catch (Exception ignored) {}
assertEquals(0, ImapsProtocol.connectCalls);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
----------------------------------------------------------------------
diff --git a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
index f1d6d74..0dd26af 100644
--- a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
+++ b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
@@ -280,8 +280,8 @@ public class TestJschSftpProtocol extends TestCase {
}
return publicKeyFile;
} finally {
- try { ps.close(); } catch (Exception ingore) {}
- try { br.close(); } catch (Exception ingore) {}
+ try { ps.close(); } catch (Exception ignored) {}
+ try { br.close(); } catch (Exception ignored) {}
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/UnsupportedShellProcessProvider.java
----------------------------------------------------------------------
diff --git a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/UnsupportedShellProcessProvider.java b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/UnsupportedShellProcessProvider.java
index 826ea46..9e784b8 100644
--- a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/UnsupportedShellProcessProvider.java
+++ b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/UnsupportedShellProcessProvider.java
@@ -55,17 +55,17 @@ public final class UnsupportedShellProcessProvider extends
try {
stdin.getInputStream().close();
stdin.getOutputStream().close();
- } catch (Exception ex) {
+ } catch (Exception ignored) {
}
try {
stdout.getInputStream().close();
stdout.getOutputStream().close();
- } catch (Exception ex1) {
+ } catch (Exception ignored) {
}
try {
stderr.getInputStream().close();
stderr.getOutputStream().close();
- } catch (Exception ex2) {
+ } catch (Exception ignored) {
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/Daemon.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/Daemon.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/Daemon.java
index cee0373..6fd2f72 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/Daemon.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/Daemon.java
@@ -301,7 +301,7 @@ public class Daemon extends UnicastRemoteObject implements DaemonRmiInterface,
synchronized (this) {
try {
wait(length);
- } catch (InterruptedException e) {
+ } catch (InterruptedException ignored) {
}
}
}
@@ -319,7 +319,7 @@ public class Daemon extends UnicastRemoteObject implements DaemonRmiInterface,
+ " on RMI registry port " + this.rmiRegPort
+ " has been stopped");
this.wait(0);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
LOG.log(Level.INFO, "Daemon with ID = " + this.getDaemonID()
+ " on RMI registry port " + this.rmiRegPort + " has resumed");
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonLauncher.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonLauncher.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonLauncher.java
index 6815ba7..da42f3d 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonLauncher.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonLauncher.java
@@ -184,7 +184,7 @@ public class DaemonLauncher implements DaemonLauncherMBean {
synchronized (daemonLauncher) {
try {
daemonLauncher.wait();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/renamingconventions/RenamingConvention.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/renamingconventions/RenamingConvention.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/renamingconventions/RenamingConvention.java
index f2e0935..6fff6d8 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/renamingconventions/RenamingConvention.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/renamingconventions/RenamingConvention.java
@@ -139,7 +139,7 @@ public class RenamingConvention {
String parentPath = "";
try {
parentPath = fileToGenNewNameFor.getProtocolFile().getParent().getPath();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
return parentPath;
}
@@ -148,7 +148,7 @@ public class RenamingConvention {
String parentFileName = "";
try {
parentFileName = fileToGenNewNameFor.getProtocolFile().getParent().getName();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
return parentFileName;
}
@@ -158,7 +158,7 @@ public class RenamingConvention {
try {
grandParentPath = fileToGenNewNameFor.getProtocolFile().getParent()
.getParent().getPath();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
return grandParentPath;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
index de28eb6..abecbd9 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/ProtocolHandler.java
@@ -307,7 +307,7 @@ public class ProtocolHandler {
wait(1000);
}
System.out.println();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
@@ -316,7 +316,7 @@ public class ProtocolHandler {
// make sure protocol is disconnected
try {
protocol.close();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
// try connecting Protocol
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java
index 49fec6b..d9ab5c5 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java
@@ -382,7 +382,7 @@ public class FileRetrievalSystem {
return;
else
this.wait(5000);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
throw new ProtocolException(
@@ -483,7 +483,7 @@ public class FileRetrievalSystem {
synchronized (this) {
try {
wait(5000);
- } catch (Exception e1) {
+ } catch (Exception ignored) {
}
}
} else {
@@ -572,7 +572,7 @@ public class FileRetrievalSystem {
while ((session = getSession(file)) == null) {
try {
waitMainThread();
- } catch (InterruptedException e1) {
+ } catch (InterruptedException ignored) {
}
}
return session;
@@ -659,7 +659,7 @@ public class FileRetrievalSystem {
e.printStackTrace();
try {
protocolHandler.disconnect(session);
- } catch (Exception exc) {
+ } catch (Exception ignored) {
}
session = protocolHandler.getAppropriateProtocol(file, /* reuse */
false, /* navigate */true);
@@ -801,7 +801,7 @@ public class FileRetrievalSystem {
+ e.getMessage(), e);
try {
protocolHandler.disconnect(curSession);
- } catch (Exception exc) {
+ } catch (Exception ignored) {
}
try {
curSession = protocolHandler
@@ -902,7 +902,7 @@ public class FileRetrievalSystem {
try {
this.resetVariables();
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java
index e211aa5..3908f29 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/RetrievalSetup.java
@@ -200,7 +200,7 @@ public class RetrievalSetup {
synchronized (this) {
try {
this.wait(5000);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
index 3c7c28b..7b34708 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
@@ -165,7 +165,7 @@ public class XmlRpcBatchMgr implements Batchmgr {
int reducedLoad = job.getLoadValue();
try {
mon.reduceLoad(node, reducedLoad);
- } catch (MonitorException e) {
+ } catch (MonitorException ignored) {
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/resource/src/main/java/org/apache/oodt/cas/resource/jobrepo/XStreamJobRepository.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/jobrepo/XStreamJobRepository.java b/resource/src/main/java/org/apache/oodt/cas/resource/jobrepo/XStreamJobRepository.java
index a931bcb..93ba9cc 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/jobrepo/XStreamJobRepository.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/jobrepo/XStreamJobRepository.java
@@ -82,7 +82,7 @@ public class XStreamJobRepository implements JobRepository {
}finally {
try {
os.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
@@ -97,7 +97,7 @@ public class XStreamJobRepository implements JobRepository {
}finally {
try {
is.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
@@ -132,7 +132,7 @@ public class XStreamJobRepository implements JobRepository {
}finally {
try {
os.close();
- }catch (Exception e) {}
+ }catch (Exception ignored) {}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxBatchmgr.java
----------------------------------------------------------------------
diff --git a/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxBatchmgr.java b/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxBatchmgr.java
index 0541c81..fb7b2e8 100644
--- a/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxBatchmgr.java
+++ b/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxBatchmgr.java
@@ -70,7 +70,7 @@ public class TestQueueMuxBatchmgr extends TestCase {
try {
queue.executeRemotely(this.getSpecFromQueue("queue-3"),node1);
TestCase.fail("Failed to throw JobExecutionException on unknown queue.");
- } catch(JobExecutionException e) {}
+ } catch(JobExecutionException ignored) {}
} catch (JobExecutionException e) {
TestCase.fail("Unexpected Exception: "+e.getMessage());
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxMonitor.java
----------------------------------------------------------------------
diff --git a/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxMonitor.java b/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxMonitor.java
index 8b91d5a..b2d0724 100644
--- a/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxMonitor.java
+++ b/resource/src/test/java/org/apache/oodt/cas/resource/mux/TestQueueMuxMonitor.java
@@ -136,7 +136,7 @@ public class TestQueueMuxMonitor extends TestCase {
try {
monitor.reduceLoad(superfluous, 2);
TestCase.fail("Exception not thrown for unknown queue.");
- } catch (MonitorException e) {}
+ } catch (MonitorException ignored) {}
} catch(MonitorException e) {
TestCase.fail("Unanticipated monitor exception caught: "+e.getMessage());
}
@@ -151,7 +151,7 @@ public class TestQueueMuxMonitor extends TestCase {
try {
monitor.assignLoad(superfluous, 2);
TestCase.fail("Exception not thrown for unknown queue.");
- } catch (MonitorException e) {}
+ } catch (MonitorException ignored) {}
} catch(MonitorException e) {
TestCase.fail("Unanticipated monitor exception caught: "+e.getMessage());
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/TaskProcessor.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/TaskProcessor.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/TaskProcessor.java
index d139e8f..613eb55 100755
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/TaskProcessor.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/TaskProcessor.java
@@ -82,7 +82,7 @@ public class TaskProcessor extends WorkflowProcessor {
try {
requiredBlockTimeElapse = Integer
.parseInt(requiredBlockTimeElapseString);
- } catch (Exception e) {
+ } catch (Exception ignored) {
}
}
Calendar calendar = Calendar.getInstance();
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessorHelper.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessorHelper.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessorHelper.java
index faa2e71..2955d27 100755
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessorHelper.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessorHelper.java
@@ -339,7 +339,7 @@ public class WorkflowProcessorHelper {
} catch (Exception e) {
try {
host = ExecHelper.exec(new String[] { "hostname" }).getOutput().trim();
- } catch (Exception e1) {
+ } catch (Exception ignored) {
}
}
if (host == null)
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
index 16ca5c7..f6975df 100644
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/TaskJob.java
@@ -193,7 +193,7 @@ public class TaskJob implements JobInstance, WorkflowStatus, CoreMetKeys{
InetAddress addr = InetAddress.getLocalHost();
// Get the host name
return addr.getHostName();
- } catch (UnknownHostException e) {
+ } catch (UnknownHostException ignored) {
}
return null;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
index 55e11d3..4e191a5 100644
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
@@ -649,7 +649,7 @@ public class XmlRpcWorkflowManager {
InetAddress addr = InetAddress.getLocalHost();
// Get the host name
return addr.getHostName();
- } catch (UnknownHostException e) {
+ } catch (UnknownHostException ignored) {
}
return null;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlps/src/main/java/org/apache/oodt/xmlps/structs/CDEResultInputStream.java
----------------------------------------------------------------------
diff --git a/xmlps/src/main/java/org/apache/oodt/xmlps/structs/CDEResultInputStream.java b/xmlps/src/main/java/org/apache/oodt/xmlps/structs/CDEResultInputStream.java
index 3547d40..2198afe 100644
--- a/xmlps/src/main/java/org/apache/oodt/xmlps/structs/CDEResultInputStream.java
+++ b/xmlps/src/main/java/org/apache/oodt/xmlps/structs/CDEResultInputStream.java
@@ -34,7 +34,7 @@ class CDEResultInputStream extends InputStream {
String s = null;
try {
s = res.getNextRowAsString();
- } catch (SQLException e) {
+ } catch (SQLException ignored) {
}
if (rowStream != null)
rowStream.close();
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedObjectCodec.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedObjectCodec.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedObjectCodec.java
index c2fb54d..c314915 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedObjectCodec.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedObjectCodec.java
@@ -54,7 +54,7 @@ class CompressedObjectCodec implements Codec {
ObjectOutputStream objStream = new ObjectOutputStream(gzip);
objStream.writeObject(object);
objStream.close();
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
Element value = doc.createElement("resultValue");
value.appendChild(doc.createCDATASection(byteArray.toString()));
return value;
@@ -81,7 +81,7 @@ class CompressedObjectCodec implements Codec {
throw ex;
} catch (OptionalDataException ex) {
throw ex;
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedStringCodec.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedStringCodec.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedStringCodec.java
index d945f2d..f77be48 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedStringCodec.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/CompressedStringCodec.java
@@ -46,7 +46,7 @@ class CompressedStringCodec implements Codec {
GZIPOutputStream gzip = new GZIPOutputStream(base64);
gzip.write(object.toString().getBytes());
gzip.close();
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
Element value = doc.createElement("resultValue");
value.appendChild(doc.createCDATASection(byteArray.toString()));
return value;
@@ -70,7 +70,7 @@ class CompressedStringCodec implements Codec {
b.append(new String(buf, 0, numRead));
gzip.close();
rc = b.toString();
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/ObjectCodec.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/ObjectCodec.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/ObjectCodec.java
index 1065794..0024b63 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/ObjectCodec.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/ObjectCodec.java
@@ -51,7 +51,7 @@ class ObjectCodec implements Codec {
ObjectOutputStream objStream = new ObjectOutputStream(base64);
objStream.writeObject(object);
objStream.close();
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
Element value = doc.createElement("resultValue");
value.appendChild(doc.createCDATASection(byteArray.toString()));
return value;
@@ -77,7 +77,7 @@ class ObjectCodec implements Codec {
throw ex;
} catch (OptionalDataException ex) {
throw ex;
- } catch (IOException cantHappen) {}
+ } catch (IOException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryElement.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryElement.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryElement.java
index 02e1a5c..2e583f1 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryElement.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryElement.java
@@ -119,7 +119,7 @@ public class QueryElement implements Serializable, Cloneable, Documentable {
Object rc = null;
try {
rc = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryHeader.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryHeader.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryHeader.java
index a03ac3f..ce26d70 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryHeader.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/QueryHeader.java
@@ -263,7 +263,7 @@ public class QueryHeader implements Serializable, Cloneable, Documentable {
Object rc = null;
try {
rc = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java b/xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java
index 608d947..3694b74 100755
--- a/xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java
+++ b/xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java
@@ -869,7 +869,7 @@ public class XMLQuery implements java.io.Serializable, Cloneable {
Object rc = null;
try {
rc = super.clone();
- } catch (CloneNotSupportedException cantHappen) {}
+ } catch (CloneNotSupportedException ignored) {}
return rc;
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/test/java/org/apache/oodt/xmlquery/CodecFactoryTest.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/test/java/org/apache/oodt/xmlquery/CodecFactoryTest.java b/xmlquery/src/test/java/org/apache/oodt/xmlquery/CodecFactoryTest.java
index 0ff095f..756ee6f 100755
--- a/xmlquery/src/test/java/org/apache/oodt/xmlquery/CodecFactoryTest.java
+++ b/xmlquery/src/test/java/org/apache/oodt/xmlquery/CodecFactoryTest.java
@@ -39,7 +39,7 @@ public class CodecFactoryTest extends TestCase {
try {
Codec codec = CodecFactory.createCodec("unknown.class.name");
fail("CodecFactory somehow created an object of an unknown class");
- } catch (RuntimeException good) {}
+ } catch (RuntimeException ignored) {}
}
public void testValidCodec() {
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/test/java/org/apache/oodt/xmlquery/HeaderTest.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/test/java/org/apache/oodt/xmlquery/HeaderTest.java b/xmlquery/src/test/java/org/apache/oodt/xmlquery/HeaderTest.java
index 5340546..94cd9d0 100755
--- a/xmlquery/src/test/java/org/apache/oodt/xmlquery/HeaderTest.java
+++ b/xmlquery/src/test/java/org/apache/oodt/xmlquery/HeaderTest.java
@@ -88,7 +88,7 @@ public class HeaderTest extends TestCase {
try {
Header h0 = new Header(bogus);
fail("Header constructor failed to throw exception when given invalid XML node");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
Header h1 = new Header("name1", "type1", "unit1");
Node root = h1.toXML(doc);
http://git-wip-us.apache.org/repos/asf/oodt/blob/fae02f97/xmlquery/src/test/java/org/apache/oodt/xmlquery/ResultTest.java
----------------------------------------------------------------------
diff --git a/xmlquery/src/test/java/org/apache/oodt/xmlquery/ResultTest.java b/xmlquery/src/test/java/org/apache/oodt/xmlquery/ResultTest.java
index 350fb38..fd3e8ed 100755
--- a/xmlquery/src/test/java/org/apache/oodt/xmlquery/ResultTest.java
+++ b/xmlquery/src/test/java/org/apache/oodt/xmlquery/ResultTest.java
@@ -122,7 +122,7 @@ public class ResultTest extends TestCase {
try {
Result r0 = new Result(bogus);
fail("Result constructor failed to throw exception when given invalid XML node");
- } catch (IllegalArgumentException good) {}
+ } catch (IllegalArgumentException ignored) {}
Result r1 = new Result("1", "text/xml", "edaDataSetInv1", "geeba1", new ArrayList(), TEST_VALUE,
/*classified*/true, /*validity*/3456789);
[6/7] oodt git commit: OODT-909 create improved exceptions
Posted by ma...@apache.org.
OODT-909 create improved exceptions
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/daf0904a
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/daf0904a
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/daf0904a
Branch: refs/heads/master
Commit: daf0904a625d7fb52a435f3a1506c5ddd5b7cc40
Parents: 4ed2a42
Author: Tom Barber <to...@analytical-labs.com>
Authored: Tue Oct 27 17:02:31 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Tue Oct 27 17:02:31 2015 +0000
----------------------------------------------------------------------
CHANGES.txt | 32 +++++++++++++++-
.../oodt/cas/workflow/gui/WorkflowGUI.java | 3 +-
.../model/repo/XmlWorkflowModelRepository.java | 37 +++++++++++--------
.../gui/util/exceptions/WorkflowException.java | 27 ++++++++++++++
.../org/apache/oodt/commons/ExecServer.java | 12 ++++--
.../oodt/commons/activity/ActivityTracker.java | 2 +-
.../org/apache/oodt/commons/date/DateUtils.java | 25 +++++++------
.../commons/exceptions/CommonsException.java | 11 ++++++
.../apache/oodt/commons/exec/EnvUtilities.java | 2 +-
.../org/apache/oodt/commons/util/Base64.java | 3 +-
.../org/apache/oodt/commons/util/DOMParser.java | 16 ++++++--
.../org/apache/oodt/commons/util/LogInit.java | 11 ++++--
.../org/apache/oodt/commons/xml/DOMUtil.java | 7 ++--
.../cas/crawl/AutoDetectProductCrawler.java | 13 +++++--
.../cas/crawl/MetExtractorProductCrawler.java | 13 +++----
.../oodt/cas/crawl/StdProductCrawler.java | 3 +-
.../cas/crawl/action/EmailNotification.java | 21 +++++------
.../oodt/cas/crawl/action/IngestAncillary.java | 3 +-
.../cas/crawl/daemon/CrawlDaemonController.java | 8 ++--
.../MimeExtractorConfigReader.java | 32 +++++++++++++---
.../cas/curation/service/MetadataResource.java | 6 ++-
.../curation/util/CurationXmlStructFactory.java | 11 ++++--
.../util/exceptions/CurationException.java | 11 ++++++
.../exceptions/CasMetadataException.java | 27 ++++++++++++++
.../oodt/cas/metadata/util/PathUtils.java | 39 ++++++++++----------
.../apache/oodt/pcs/tools/PCSHealthMonitor.java | 2 +-
.../apache/oodt/pcs/tools/PCSLongLister.java | 5 ++-
.../org/apache/oodt/pcs/tools/PCSTrace.java | 19 +++++-----
.../cas/pushpull/daemon/DaemonController.java | 2 +-
.../exceptions/RetrievalMethodException.java | 4 ++
.../parsers/DirStructXmlParser.java | 5 ++-
.../pushpull/retrievalmethod/ListRetriever.java | 6 ++-
.../pushpull/retrievalmethod/RemoteCrawler.java | 9 ++++-
.../resource/exceptions/ResourceException.java | 31 ++++++++++++++++
.../cas/resource/monitor/utils/MockGmetad.java | 2 +-
.../resource/system/XmlRpcResourceManager.java | 9 ++---
.../resource/system/extern/XmlRpcBatchStub.java | 4 +-
.../oodt/cas/resource/tools/JobSubmitter.java | 3 +-
.../cas/resource/tools/RunDirJobSubmitter.java | 18 +++++----
.../apache/oodt/cas/resource/util/Ulimit.java | 13 ++++---
.../apache/oodt/security/sso/OpenSSOImpl.java | 8 ++--
.../oodt/security/sso/opensso/SSOProxy.java | 14 +++----
.../sso/opensso/SingleSignOnException.java | 11 ++++++
.../apache/oodt/cas/product/data/DataUtils.java | 21 ++++++-----
.../product/exceptions/CasProductException.java | 27 ++++++++++++++
.../jaxrs/services/CasProductJaxrsService.java | 39 ++++++++++----------
.../oodt/xmlps/exceptions/XmlpsException.java | 27 ++++++++++++++
.../oodt/xmlps/mapping/MappingReader.java | 22 +++++++----
.../oodt/xmlps/product/XMLPSProductHandler.java | 8 ++--
.../oodt/xmlps/profile/XMLPSProfileHandler.java | 17 ++++-----
50 files changed, 495 insertions(+), 206 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4534d27..11158a9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,9 +23,37 @@ Release 0.11 - Current Development
* OODT-892 Tidy up null assignments (magicaltrout)
-* OODT-755 Fix error message in FM client when ingestion fails
+* OODT-755 Fix error message in FM client when ingestion fails - code quality from sonar (magicaltrout)
-* OODT-894 Remove inefficient constructors
+* OODT-894 Remove inefficient constructors - code quality from sonar (magicaltrout)
+
+* OODT-909 create more explicit exceptions - code quality from sonar (magicaltrout)
+
+* OODT-907 remove never queries collections - code quality from sonar (magicaltrout)
+
+* OODT-906 remove redundant assignments - code quality from sonar (magicaltrout)
+
+* OODT-904 remove redundant throws - code quality from sonar (magicaltrout)
+
+* OODT-903 simplify flows - code quality from sonar (magicaltrout)
+
+* OODT-902 remove redundant modifiers from enums - code quality from sonar (magicaltrout)
+
+* OODT-901 resolve javadoc issues - code quality from sonar (magicaltrout)
+
+* OODT-900 remove boxing/unboxing etc in code - code quality from sonar (magicaltrout)
+
+* OODT-899 remove redundant local variables - code quality from sonar (magicaltrout)
+
+* OODT-898 remove redundant finals - code quality from sonar (magicaltrout)
+
+* OODT-897 remove module dependencies - code quality from sonar (magicaltrout)
+
+* OODT-896 remove interface modifers - code quality from sonar (magicaltrout)
+
+* OODT-895 remove redundant measure unit - code quality from sonar (magicaltrout)
+
+* OODT-894 tidy up inefficient constructors - code quality from sonar (magicaltrout)
Release 0.10 - 08/30/2015
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java
----------------------------------------------------------------------
diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java
index 454b5fc..13ba5f0 100644
--- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java
+++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java
@@ -41,6 +41,7 @@ import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import java.io.File;
+import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -74,7 +75,7 @@ public class WorkflowGUI extends JFrame {
private XmlWorkflowModelRepository repo;
- public WorkflowGUI() throws Exception {
+ public WorkflowGUI() throws IOException, IllegalAccessException, InstantiationException {
this.addWindowFocusListener(new WindowFocusListener() {
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java
----------------------------------------------------------------------
diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java
index f1d663b..e43a305 100644
--- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java
+++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java
@@ -18,14 +18,24 @@
package org.apache.oodt.cas.workflow.gui.model.repo;
//OODT imports
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.workflow.gui.model.ModelGraph;
import org.apache.oodt.cas.workflow.gui.model.ModelNode;
+import org.apache.oodt.cas.workflow.gui.util.exceptions.WorkflowException;
import org.apache.oodt.commons.xml.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
-//JDK imports
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -44,14 +54,10 @@ import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
+
+//JDK imports
/**
*
@@ -77,7 +83,8 @@ public class XmlWorkflowModelRepository {
this.files.add(file);
}
- public void loadGraphs(Set<String> supportedProcessorIds) throws Exception {
+ public void loadGraphs(Set<String> supportedProcessorIds)
+ throws XPathExpressionException, WorkflowException, IOException, SAXException, ParserConfigurationException {
this.graphs = new HashSet<ModelGraph>();
HashMap<String, ConfigGroup> globalConfGroups = new HashMap<String, ConfigGroup>();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -126,12 +133,12 @@ public class XmlWorkflowModelRepository {
return this.files;
}
- public void save() throws Exception {
+ public void save() throws IOException, ParserConfigurationException {
this.backupCurrentFiles();
this.saveGraphs();
}
- private void backupCurrentFiles() throws Exception {
+ private void backupCurrentFiles() throws IOException {
File backupDir = new File(this.workspace, ".backup");
for (File file : this.files) {
FileUtils.copyFile(file, new File(backupDir, file.getName()));
@@ -308,7 +315,7 @@ public class XmlWorkflowModelRepository {
private ModelGraph loadGraph(List<FileBasedElement> rootElements,
FileBasedElement workflowNode, Metadata staticMetadata,
HashMap<String, ConfigGroup> globalConfGroups,
- Set<String> supportedProcessorIds) throws Exception {
+ Set<String> supportedProcessorIds) throws XPathExpressionException, WorkflowException {
String modelIdRef = null;
String modelId = null;
@@ -427,7 +434,7 @@ public class XmlWorkflowModelRepository {
graph = this.findGraph(rootElements, modelIdRef, new Metadata(
staticMetadata), globalConfGroups, supportedProcessorIds);
if (graph == null)
- throw new Exception("Workflow '" + modelIdRef
+ throw new WorkflowException("Workflow '" + modelIdRef
+ "' has not been defined in this context");
graph.setIsRef(true);
graph.getModel().setStaticMetadata(new Metadata());
@@ -446,7 +453,7 @@ public class XmlWorkflowModelRepository {
protected ModelGraph findGraph(List<FileBasedElement> rootElements,
String modelIdRef, Metadata staticMetadata,
HashMap<String, ConfigGroup> globalConfGroups,
- Set<String> supportedProcessorIds) throws Exception {
+ Set<String> supportedProcessorIds) throws XPathExpressionException, WorkflowException {
XPath xpath = XPathFactory.newInstance().newXPath();
XPathExpression expr = xpath.compile("//*[@id = '" + modelIdRef + "']");
for (FileBasedElement rootElement : rootElements) {
@@ -463,7 +470,7 @@ public class XmlWorkflowModelRepository {
private void loadConfiguration(List<FileBasedElement> rootElements,
FileBasedElement workflowNode, ModelNode modelNode,
- HashMap<String, ConfigGroup> globalConfGroups) throws Exception {
+ HashMap<String, ConfigGroup> globalConfGroups) {
NodeList children = workflowNode.getElement().getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node curChild = children.item(i);
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/util/exceptions/WorkflowException.java
----------------------------------------------------------------------
diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/util/exceptions/WorkflowException.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/util/exceptions/WorkflowException.java
new file mode 100644
index 0000000..87edb1a
--- /dev/null
+++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/util/exceptions/WorkflowException.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.workflow.gui.util.exceptions;
+
+/**
+ * Workflow Exception for internal Exceptions.
+ */
+public class WorkflowException extends Exception {
+
+ public WorkflowException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/ExecServer.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/ExecServer.java b/commons/src/main/java/org/apache/oodt/commons/ExecServer.java
index 3c6f1d5..3a03290 100644
--- a/commons/src/main/java/org/apache/oodt/commons/ExecServer.java
+++ b/commons/src/main/java/org/apache/oodt/commons/ExecServer.java
@@ -22,8 +22,13 @@ import org.apache.oodt.commons.util.LogInit;
import org.apache.oodt.commons.util.PropertyMgr;
import org.apache.oodt.commons.util.XML;
import org.apache.xmlrpc.XmlRpcClientLite;
+import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcServer;
-import org.w3c.dom.*;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -141,8 +146,6 @@ public class ExecServer {
} catch (SAXException ex) {
System.err.println("Error " + ex.getClass().getName() + " while attempting to parse the configuration"
+ " file: " + ex.getMessage());
- } catch (javax.naming.NamingException ex) {
- System.err.println("Naming/directory error: " + ex.getClass().getName() + ": " + ex.getMessage());
} catch (java.lang.reflect.InvocationTargetException ex) {
Throwable target = ex.getTargetException();
System.err.println("Constructor for \"" + className + "\" threw " + target.getClass().getName() + ": "
@@ -313,7 +316,8 @@ public class ExecServer {
* @return The return value from the method named by <var>method</var>.
* @throws Exception If any error occurs.
*/
- public Object callLocalServerManager(int port, String user, String password, String method, List params) throws Exception {
+ public Object callLocalServerManager(int port, String user, String password, String method, List params)
+ throws IOException, XmlRpcException {
XmlRpcClientLite local = new XmlRpcClientLite("localhost", port);
local.setBasicAuthentication(user, password);
return local.execute(method, new Vector(params));
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/activity/ActivityTracker.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/activity/ActivityTracker.java b/commons/src/main/java/org/apache/oodt/commons/activity/ActivityTracker.java
index 8bd9f9f..4af6812 100644
--- a/commons/src/main/java/org/apache/oodt/commons/activity/ActivityTracker.java
+++ b/commons/src/main/java/org/apache/oodt/commons/activity/ActivityTracker.java
@@ -59,7 +59,7 @@ public class ActivityTracker {
*
* @throws Exception if an error occurs.
*/
- static void initializeFactories() throws Exception {
+ static void initializeFactories() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
String facNames = System.getProperty("org.apache.oodt.commons.activity.factories", System.getProperty("activity.factories", ""));
List factories = new ArrayList();
for (StringTokenizer tokens = new StringTokenizer(facNames, ",|"); tokens.hasMoreTokens();) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/date/DateUtils.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/date/DateUtils.java b/commons/src/main/java/org/apache/oodt/commons/date/DateUtils.java
index cd22509..ad854ed 100644
--- a/commons/src/main/java/org/apache/oodt/commons/date/DateUtils.java
+++ b/commons/src/main/java/org/apache/oodt/commons/date/DateUtils.java
@@ -19,6 +19,9 @@
package org.apache.oodt.commons.date;
//JDK imports
+
+import org.apache.oodt.commons.exceptions.CommonsException;
+
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -95,16 +98,16 @@ public class DateUtils {
private DateUtils() {}
- public static int getLeapSecsForDate(Calendar utcCal) throws Exception {
+ public static int getLeapSecsForDate(Calendar utcCal) throws CommonsException {
long timeInMillis = utcCal.getTimeInMillis();
for (int i = dateAndLeapSecs.length - 1; i >= 0; i--) {
if (dateAndLeapSecs[i][IndexType.DATE.index] < timeInMillis)
return (int) dateAndLeapSecs[i][IndexType.LEAP_SECS.index];
}
- throw new Exception("No Leap Second found for given date!");
+ throw new CommonsException("No Leap Second found for given date!");
}
- public static synchronized Calendar toTai(Calendar cal) throws Exception {
+ public static synchronized Calendar toTai(Calendar cal) throws CommonsException {
Calendar taiCal = Calendar.getInstance(createTaiTimeZone(getLeapSecsForDate(cal)));
taiCal.setTimeInMillis(cal.getTimeInMillis() + getLeapSecsForDate(cal) * 1000);
return taiCal;
@@ -116,11 +119,11 @@ public class DateUtils {
return calUtc;
}
- private static Calendar taiToLocal(Calendar taiCal) throws Exception {
+ private static Calendar taiToLocal(Calendar taiCal) {
return toLocal(taiToUtc(taiCal));
}
- public static synchronized Calendar toLocal(Calendar cal) throws Exception {
+ public static synchronized Calendar toLocal(Calendar cal) {
if (cal.getTimeZone().getID().equals("TAI")) {
return taiToLocal(cal);
} else {
@@ -130,7 +133,7 @@ public class DateUtils {
}
}
- public static synchronized Calendar toUtc(Calendar cal) throws Exception {
+ public static synchronized Calendar toUtc(Calendar cal) {
if (cal.getTimeZone().getID().equals("TAI")) {
return taiToUtc(cal);
} else {
@@ -140,7 +143,7 @@ public class DateUtils {
}
}
- public static Calendar getCurrentUtcTime() throws Exception {
+ public static Calendar getCurrentUtcTime() {
return toUtc(getCurrentLocalTime());
}
@@ -148,7 +151,7 @@ public class DateUtils {
return Calendar.getInstance();
}
- public static Calendar getCurrentTaiTime() throws Exception {
+ public static Calendar getCurrentTaiTime() throws CommonsException {
return toTai(getCurrentUtcTime());
}
@@ -197,7 +200,7 @@ public class DateUtils {
return cal;
}
- public static double getTimeInSecs(Calendar cal, Calendar epoch) throws Exception {
+ public static double getTimeInSecs(Calendar cal, Calendar epoch) throws CommonsException {
return getTimeInMillis(cal, epoch) / 1000.0;
}
@@ -205,7 +208,7 @@ public class DateUtils {
return new DecimalFormat("#.000").format(seconds);
}
- public static long getTimeInMillis(Calendar cal, Calendar epoch) throws Exception {
+ public static long getTimeInMillis(Calendar cal, Calendar epoch) throws CommonsException {
long epochDiffInMilli;
/**
* Fixes date conversion issues preventing tests passing in the UK but working elsewhere in the world.
@@ -225,7 +228,7 @@ public class DateUtils {
return new SimpleTimeZone(leapSecs * 1000, "TAI");
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws ParseException, CommonsException {
Calendar curTime = getCurrentLocalTime();
System.out.println("Test Time: " + toString(toCalendar(toString(toTai(toCalendar("2008-01-20T16:29:55.000Z",
FormatType.UTC_FORMAT))), FormatType.TAI_FORMAT)));
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/exceptions/CommonsException.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/exceptions/CommonsException.java b/commons/src/main/java/org/apache/oodt/commons/exceptions/CommonsException.java
new file mode 100644
index 0000000..25804bc
--- /dev/null
+++ b/commons/src/main/java/org/apache/oodt/commons/exceptions/CommonsException.java
@@ -0,0 +1,11 @@
+package org.apache.oodt.commons.exceptions;
+
+/**
+ * Created by bugg on 27/10/15.
+ */
+public class CommonsException extends Exception {
+
+ public CommonsException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java b/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
index 9e0eafd..3979f32 100644
--- a/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
+++ b/commons/src/main/java/org/apache/oodt/commons/exec/EnvUtilities.java
@@ -145,7 +145,7 @@ public final class EnvUtilities {
}
protected static InputStream preProcessInputStream(InputStream is)
- throws Exception {
+ throws IOException {
// basically read this sucker into a BufferedReader
// line by line, and replaceAll on \ with \\
// so \\\\ with \\\\\\\\
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/util/Base64.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/util/Base64.java b/commons/src/main/java/org/apache/oodt/commons/util/Base64.java
index f10bede..fb1c7b3 100644
--- a/commons/src/main/java/org/apache/oodt/commons/util/Base64.java
+++ b/commons/src/main/java/org/apache/oodt/commons/util/Base64.java
@@ -20,6 +20,7 @@ import org.apache.oodt.commons.io.Base64EncodingOutputStream;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -181,7 +182,7 @@ public class Base64 {
*
* @param argv Command-line arguments.
*/
- public static void main(String[] argv) throws Exception {
+ public static void main(String[] argv) throws IOException {
if (argv.length < 1 || argv.length > 2) {
System.err.println("Usage: encode|decode [file]");
System.exit(1);
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/util/DOMParser.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/util/DOMParser.java b/commons/src/main/java/org/apache/oodt/commons/util/DOMParser.java
index 38ee748..0a9ad8b 100644
--- a/commons/src/main/java/org/apache/oodt/commons/util/DOMParser.java
+++ b/commons/src/main/java/org/apache/oodt/commons/util/DOMParser.java
@@ -16,10 +16,18 @@
package org.apache.oodt.commons.util;
+import org.w3c.dom.Document;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
import java.io.IOException;
-import java.util.*;
-import org.xml.sax.*;
-import org.w3c.dom.*;
+import java.util.Locale;
+
import javax.xml.parsers.DocumentBuilder;
/** An XML Document Object Model parser.
@@ -73,7 +81,7 @@ public class DOMParser {
}
/** Resets or copies the parser. */
- public void resetOrCopy() throws Exception {
+ public void resetOrCopy() {
reset();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/util/LogInit.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/util/LogInit.java b/commons/src/main/java/org/apache/oodt/commons/util/LogInit.java
index 9c43f03..41d86aa 100644
--- a/commons/src/main/java/org/apache/oodt/commons/util/LogInit.java
+++ b/commons/src/main/java/org/apache/oodt/commons/util/LogInit.java
@@ -15,9 +15,13 @@
package org.apache.oodt.commons.util;
-import java.util.*;
-import org.apache.oodt.commons.io.*;
+import org.apache.oodt.commons.io.Log;
+import org.apache.oodt.commons.io.LogFilter;
+import org.apache.oodt.commons.io.LogListener;
+
import java.beans.PropertyChangeEvent;
+import java.util.Properties;
+import java.util.StringTokenizer;
/**
The <code>LogInit</code> class is intended to be used to initialize
@@ -51,7 +55,8 @@ public class LogInit {
@param source The default source to be included in messages.
@throws Exception If the logging capability cannot be initialized.
*/
- public static void init(Properties props, String source) throws Exception {
+ public static void init(Properties props, String source)
+ throws ClassNotFoundException, IllegalAccessException, InstantiationException {
// Set up the log event pipeline: filter -> multiplexer -> memory
// log/user-specified log. First the multiplexer.
LogEventMultiplexer mux = new LogEventMultiplexer();
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/commons/src/main/java/org/apache/oodt/commons/xml/DOMUtil.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/oodt/commons/xml/DOMUtil.java b/commons/src/main/java/org/apache/oodt/commons/xml/DOMUtil.java
index 0343d27..1abc1b0 100644
--- a/commons/src/main/java/org/apache/oodt/commons/xml/DOMUtil.java
+++ b/commons/src/main/java/org/apache/oodt/commons/xml/DOMUtil.java
@@ -18,6 +18,7 @@
package org.apache.oodt.commons.xml;
+import org.apache.oodt.commons.exceptions.CommonsException;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
@@ -50,11 +51,11 @@ public class DOMUtil {
* @return Element "element" with Name "name"'s first occurence.
*/
public static Element getFirstElement(Element element, String name)
- throws Exception {
+ throws CommonsException {
NodeList n1 = element.getElementsByTagName(name);
if (n1.getLength() < 1) {
- throw new Exception("Element: " + element + " does not contain: "
+ throw new CommonsException("Element: " + element + " does not contain: "
+ name);
}
@@ -75,7 +76,7 @@ public class DOMUtil {
* @return the Text inbetween the simple element tags.
*/
public static String getSimpleElementText(Element node, String name)
- throws Exception {
+ throws CommonsException {
Element namedElement = getFirstElement(node, name);
return getSimpleElementText(namedElement);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/AutoDetectProductCrawler.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/AutoDetectProductCrawler.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/AutoDetectProductCrawler.java
index 232a63d..d937e9f 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/AutoDetectProductCrawler.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/AutoDetectProductCrawler.java
@@ -17,16 +17,21 @@
package org.apache.oodt.cas.crawl;
//OODT imports
+import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
import org.apache.oodt.cas.crawl.typedetection.MetExtractorSpec;
import org.apache.oodt.cas.crawl.typedetection.MimeExtractorConfigReader;
import org.apache.oodt.cas.crawl.typedetection.MimeExtractorRepo;
import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
+import org.apache.oodt.cas.metadata.exceptions.NamingConventionException;
import org.apache.oodt.cas.metadata.filenaming.NamingConvention;
import org.apache.oodt.cas.metadata.preconditions.PreCondEvalUtils;
import org.springframework.beans.factory.annotation.Required;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
@@ -69,7 +74,7 @@ public class AutoDetectProductCrawler extends ProductCrawler implements
private MimeExtractorRepo mimeExtractorRepo;
@Override
- protected Metadata getMetadataForProduct(File product) throws Exception {
+ protected Metadata getMetadataForProduct(File product) throws IOException, MetExtractionException {
List<MetExtractorSpec> specs = this.mimeExtractorRepo
.getExtractorSpecsForFile(product);
Metadata metadata = new Metadata();
@@ -116,7 +121,7 @@ public class AutoDetectProductCrawler extends ProductCrawler implements
@Override
protected File renameProduct(File product, Metadata productMetadata)
- throws Exception {
+ throws NamingConventionException {
String namingConventionId = mimeExtractorRepo
.getNamingConventionId(mimeExtractorRepo.getMimeType(product));
if (namingConventionId != null) {
@@ -129,7 +134,9 @@ public class AutoDetectProductCrawler extends ProductCrawler implements
}
@Required
- public void setMimeExtractorRepo(String mimeExtractorRepo) throws Exception {
+ public void setMimeExtractorRepo(String mimeExtractorRepo)
+ throws IllegalAccessException, CrawlerActionException, MetExtractionException, InstantiationException,
+ FileNotFoundException, ClassNotFoundException {
this.mimeExtractorRepo = MimeExtractorConfigReader
.read(mimeExtractorRepo);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/MetExtractorProductCrawler.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/MetExtractorProductCrawler.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/MetExtractorProductCrawler.java
index c8e8bc4..9e66c6d 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/MetExtractorProductCrawler.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/MetExtractorProductCrawler.java
@@ -16,20 +16,19 @@
*/
package org.apache.oodt.cas.crawl;
-//OODT imports
+import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
import org.apache.oodt.cas.metadata.MetExtractor;
import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
+import org.apache.oodt.cas.metadata.exceptions.NamingConventionException;
import org.apache.oodt.cas.metadata.filenaming.NamingConvention;
import org.apache.oodt.cas.metadata.preconditions.PreConditionComparator;
+import org.springframework.beans.factory.annotation.Required;
-//JDK imports
import java.io.File;
import java.util.ArrayList;
import java.util.List;
-//Spring imports
-import org.springframework.beans.factory.annotation.Required;
/**
* @author mattmann
@@ -52,7 +51,7 @@ public class MetExtractorProductCrawler extends ProductCrawler {
private String namingConventionId;
@Override
- protected Metadata getMetadataForProduct(File product) throws Exception {
+ protected Metadata getMetadataForProduct(File product) throws MetExtractionException {
return metExtractor.extractMetadata(product);
}
@@ -70,12 +69,12 @@ public class MetExtractorProductCrawler extends ProductCrawler {
@Override
protected File renameProduct(File product, Metadata productMetadata)
- throws Exception {
+ throws CrawlerActionException, NamingConventionException {
if (getNamingConventionId() != null) {
NamingConvention namingConvention = (NamingConvention)
getApplicationContext().getBean(getNamingConventionId());
if (namingConvention == null) {
- throw new Exception("NamingConvention Id '" + getNamingConventionId()
+ throw new CrawlerActionException("NamingConvention Id '" + getNamingConventionId()
+ "' is not defined");
}
return namingConvention.rename(product, productMetadata);
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/StdProductCrawler.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/StdProductCrawler.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/StdProductCrawler.java
index b0f3e80..00e0c91 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/StdProductCrawler.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/StdProductCrawler.java
@@ -18,6 +18,7 @@ package org.apache.oodt.cas.crawl;
//OODT imports
import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
import org.apache.oodt.cas.metadata.extractors.MetReaderExtractor;
//JDK imports
@@ -49,7 +50,7 @@ public class StdProductCrawler extends ProductCrawler {
}
@Override
- protected Metadata getMetadataForProduct(File product) throws Exception {
+ protected Metadata getMetadataForProduct(File product) throws MetExtractionException {
MetReaderExtractor extractor = new MetReaderExtractor(
this.metFileExtension);
return extractor.extractMetadata(product);
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/EmailNotification.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/EmailNotification.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/EmailNotification.java
index 46539ab..211165a 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/EmailNotification.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/EmailNotification.java
@@ -17,9 +17,18 @@
package org.apache.oodt.cas.crawl.action;
//JDK imports
+import com.google.common.collect.Lists;
+
+import org.apache.commons.lang.Validate;
+import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.util.PathUtils;
+import org.springframework.beans.factory.annotation.Required;
+
import java.io.File;
import java.util.List;
import java.util.Properties;
+
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
@@ -28,19 +37,9 @@ import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
//Spring imports
-import org.springframework.beans.factory.annotation.Required;
-
//Apache imports
-import org.apache.commons.lang.Validate;
-
//OODT imports
-import org.apache.oodt.cas.crawl.action.CrawlerAction;
-import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
-import org.apache.oodt.cas.metadata.Metadata;
-import org.apache.oodt.cas.metadata.util.PathUtils;
-
//Google imports
-import com.google.common.collect.Lists;
/**
* This action sends an email notification. It performs metadata and system
@@ -151,7 +150,7 @@ public class EmailNotification extends CrawlerAction {
this.ignoreInvalidAddresses = ignoreInvalidAddresses;
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws CrawlerActionException {
if (args.length != 5) {
System.out.println("Usage: java " + EmailNotification.class.getName()
+ " <mailhost> <sender> <recipients> <subject> <message>");
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/IngestAncillary.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/IngestAncillary.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/IngestAncillary.java
index 4cf0399..1e5dfbc 100755
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/IngestAncillary.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/IngestAncillary.java
@@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
//OODT imports
+import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
import org.apache.oodt.cas.filemgr.ingest.Ingester;
import org.apache.oodt.cas.filemgr.ingest.StdIngester;
import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
@@ -182,7 +183,7 @@ public class IngestAncillary extends FileBasedAction {
this.writeBackKeyPrefix = writeBackKeyPrefix;
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws CrawlerActionException {
if (args.length != 6) {
System.out
.println("Usage: java "
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
index a6d1110..cf4ed40 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
@@ -20,16 +20,16 @@ package org.apache.oodt.cas.crawl.daemon;
//OODT imports
import org.apache.oodt.cas.crawl.structs.exceptions.CrawlException;
+import org.apache.xmlrpc.XmlRpcClient;
+import org.apache.xmlrpc.XmlRpcException;
-//JDK imports
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Vector;
+//JDK imports
//APACHE imports
-import org.apache.xmlrpc.XmlRpcClient;
-import org.apache.xmlrpc.XmlRpcException;
/**
* @author mattmann
@@ -155,7 +155,7 @@ public class CrawlDaemonController {
}
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws CrawlException, InstantiationException {
String avgCrawlOperation = "--getAverageCrawlTime\n";
String getMilisCrawlOperation = "--getMilisCrawling\n";
String getNumCrawlsOperation = "--getNumCrawls\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/crawler/src/main/java/org/apache/oodt/cas/crawl/typedetection/MimeExtractorConfigReader.java
----------------------------------------------------------------------
diff --git a/crawler/src/main/java/org/apache/oodt/cas/crawl/typedetection/MimeExtractorConfigReader.java b/crawler/src/main/java/org/apache/oodt/cas/crawl/typedetection/MimeExtractorConfigReader.java
index db39a56..307aa52 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/typedetection/MimeExtractorConfigReader.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/typedetection/MimeExtractorConfigReader.java
@@ -17,12 +17,15 @@
package org.apache.oodt.cas.crawl.typedetection;
//OODT imports
+import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
import org.apache.oodt.cas.metadata.util.PathUtils;
import org.apache.oodt.commons.xml.XMLUtils;
//JDK imports
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.util.LinkedList;
//W3C imports
@@ -46,7 +49,9 @@ public final class MimeExtractorConfigReader implements
throw new InstantiationException("Don't construct reader classes!");
}
- public static MimeExtractorRepo read(String mapFilePath) throws Exception {
+ public static MimeExtractorRepo read(String mapFilePath)
+ throws ClassNotFoundException, FileNotFoundException, MetExtractionException, InstantiationException,
+ IllegalAccessException, CrawlerActionException {
try {
Document doc = XMLUtils.getDocumentRoot(new FileInputStream(
mapFilePath));
@@ -158,18 +163,33 @@ public final class MimeExtractorConfigReader implements
extractorRepo.addMetExtractorSpecs(mimeType, specs);
}
return extractorRepo;
- } catch (Exception e) {
- e.printStackTrace();
- throw e;
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ throw e;
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ throw e;
+ } catch (MetExtractionException e) {
+ e.printStackTrace();
+ throw e;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ throw e;
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ throw e;
+ } catch (CrawlerActionException e) {
+ e.printStackTrace();
+ throw e;
}
}
- private static String getNamingConventionId(Element parent) throws Exception {
+ private static String getNamingConventionId(Element parent) throws CrawlerActionException {
NodeList namingConventions = parent
.getElementsByTagName(NAMING_CONVENTION_TAG);
if (namingConventions != null && namingConventions.getLength() > 0) {
if (namingConventions.getLength() > 1) {
- throw new Exception("Can only have 1 '"
+ throw new CrawlerActionException("Can only have 1 '"
+ NAMING_CONVENTION_TAG + "' tag per mimetype");
}
Element namingConvention = (Element) namingConventions.item(0);
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/curator/services/src/main/java/org/apache/oodt/cas/curation/service/MetadataResource.java
----------------------------------------------------------------------
diff --git a/curator/services/src/main/java/org/apache/oodt/cas/curation/service/MetadataResource.java b/curator/services/src/main/java/org/apache/oodt/cas/curation/service/MetadataResource.java
index 2cef366..045edcb 100644
--- a/curator/services/src/main/java/org/apache/oodt/cas/curation/service/MetadataResource.java
+++ b/curator/services/src/main/java/org/apache/oodt/cas/curation/service/MetadataResource.java
@@ -26,6 +26,7 @@ import net.sf.json.JSONSerializer;
import org.apache.oodt.cas.curation.structs.ExtractorConfig;
import org.apache.oodt.cas.curation.util.CurationXmlStructFactory;
import org.apache.oodt.cas.curation.util.ExtractorConfigReader;
+import org.apache.oodt.cas.curation.util.exceptions.CurationException;
import org.apache.oodt.cas.filemgr.catalog.Catalog;
import org.apache.oodt.cas.filemgr.repository.XMLRepositoryManager;
import org.apache.oodt.cas.filemgr.structs.Element;
@@ -50,6 +51,7 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -686,7 +688,9 @@ public class MetadataResource extends CurationService {
}
private Metadata writeProductTypeMetadata(String policy,
- String productTypeName, Metadata metadata) throws Exception {
+ String productTypeName, Metadata metadata)
+ throws MalformedURLException, InstantiationException, RepositoryManagerException, UnsupportedEncodingException,
+ CurationException {
String rootPolicyPath = this.cleanse(CurationService.config
.getPolicyUploadPath());
String policyPath = new File(rootPolicyPath + policy).toURL()
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/CurationXmlStructFactory.java
----------------------------------------------------------------------
diff --git a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/CurationXmlStructFactory.java b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/CurationXmlStructFactory.java
index 3aeb7a8..46ecbf2 100644
--- a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/CurationXmlStructFactory.java
+++ b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/CurationXmlStructFactory.java
@@ -19,6 +19,8 @@
package org.apache.oodt.cas.curation.util;
//JDK imports
+
+import org.apache.oodt.cas.curation.util.exceptions.CurationException;
import org.apache.oodt.cas.filemgr.structs.ProductType;
import org.apache.oodt.cas.filemgr.util.XmlStructFactory;
import org.apache.oodt.commons.xml.XMLUtils;
@@ -26,6 +28,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
@@ -44,12 +47,12 @@ import java.util.List;
public class CurationXmlStructFactory {
public static void writeProductTypeXmlDocument(
- List<ProductType> productTypes, String xmlFilePath) throws Exception {
+ List<ProductType> productTypes, String xmlFilePath) throws UnsupportedEncodingException, CurationException {
XMLUtils.writeXmlFile(getProductTypeXmlDocument(productTypes), xmlFilePath);
}
public static Document getProductTypeXmlDocument(
- List<ProductType> productTypes) throws Exception {
+ List<ProductType> productTypes) throws UnsupportedEncodingException, CurationException {
Document doc = XmlStructFactory.getProductTypeXmlDocument(productTypes);
// for every product type, i want to add in the versioner info and the
@@ -68,7 +71,7 @@ public class CurationXmlStructFactory {
}
private static void augmentElement(List<ProductType> productTypes,
- Element typeElem, Document doc) throws Exception {
+ Element typeElem, Document doc) throws UnsupportedEncodingException, CurationException {
String productTypeName = typeElem.getAttribute("name");
ProductType type = getType(productTypes, productTypeName);
@@ -86,7 +89,7 @@ public class CurationXmlStructFactory {
for (String val : vals) {
Element valElem = doc.createElement("val");
if (val == null) {
- throw new Exception("Attempt to write null value "
+ throw new CurationException("Attempt to write null value "
+ "for property: [" + key + "]: val: [null]");
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/exceptions/CurationException.java
----------------------------------------------------------------------
diff --git a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/exceptions/CurationException.java b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/exceptions/CurationException.java
new file mode 100644
index 0000000..d8e1db6
--- /dev/null
+++ b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/exceptions/CurationException.java
@@ -0,0 +1,11 @@
+package org.apache.oodt.cas.curation.util.exceptions;
+
+/**
+ * Created by bugg on 27/10/15.
+ */
+public class CurationException extends Exception {
+
+ public CurationException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/metadata/src/main/java/org/apache/oodt/cas/metadata/exceptions/CasMetadataException.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/oodt/cas/metadata/exceptions/CasMetadataException.java b/metadata/src/main/java/org/apache/oodt/cas/metadata/exceptions/CasMetadataException.java
new file mode 100644
index 0000000..fc3597b
--- /dev/null
+++ b/metadata/src/main/java/org/apache/oodt/cas/metadata/exceptions/CasMetadataException.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.metadata.exceptions;
+
+/**
+ * Cas Metadata Exception for internal Exceptions.
+ */
+public class CasMetadataException extends Exception {
+
+ public CasMetadataException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java b/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java
index 8954f2e..b10d906 100644
--- a/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java
+++ b/metadata/src/main/java/org/apache/oodt/cas/metadata/util/PathUtils.java
@@ -20,7 +20,14 @@
package org.apache.oodt.cas.metadata.util;
-//JDK imports
+import org.apache.commons.lang.StringUtils;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.CasMetadataException;
+import org.apache.oodt.commons.date.DateUtils;
+import org.apache.oodt.commons.exceptions.CommonsException;
+import org.apache.oodt.commons.exec.EnvUtilities;
+
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@@ -29,13 +36,6 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-//APACHE imports
-import org.apache.commons.lang.StringUtils;
-
-//OODT imports
-import org.apache.oodt.commons.date.DateUtils;
-import org.apache.oodt.commons.exec.EnvUtilities;
-import org.apache.oodt.cas.metadata.Metadata;
/**
* @author mattmann
@@ -87,12 +87,13 @@ public final class PathUtils {
return finalPath.toString();
}
- public static String doDynamicReplacement(String string) throws Exception {
+ public static String doDynamicReplacement(String string)
+ throws ParseException, CommonsException, CasMetadataException {
return doDynamicReplacement(string, null);
}
public static String doDynamicReplacement(String string, Metadata metadata)
- throws Exception {
+ throws ParseException, CommonsException, CasMetadataException {
return PathUtils.replaceEnvVariables(doDynamicDateReplacement(
doDynamicDateRollReplacement(
doDynamicDateFormatReplacement(
@@ -109,7 +110,7 @@ public final class PathUtils {
}
public static String doDynamicDateReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws CasMetadataException, CommonsException {
Pattern datePattern = Pattern
.compile("\\[\\s*DATE\\s*(?:[+-]{1}[^\\.]{1,}?){0,1}\\.\\s*(?:(?:DAY)|(?:MONTH)|(?:YEAR)|(?:UTC)|(?:TAI)){1}\\s*\\]");
Matcher dateMatcher = datePattern.matcher(string);
@@ -131,7 +132,7 @@ public final class PathUtils {
"[\\+\\s]", ""));
gc.add(GregorianCalendar.DAY_OF_YEAR, rollDays);
} else
- throw new Exception(
+ throw new CasMetadataException(
"Malformed dynamic date replacement specified (no dot separator) - '"
+ dateString + "'");
}
@@ -139,7 +140,7 @@ public final class PathUtils {
// determine type and make the appropriate replacement
String[] splitDate = dateString.split("\\.");
if (splitDate.length < 2)
- throw new Exception("No date type specified - '" + dateString
+ throw new CasMetadataException("No date type specified - '" + dateString
+ "'");
String dateType = splitDate[1].replaceAll("[\\[\\]\\s]", "");
String replacement;
@@ -158,7 +159,7 @@ public final class PathUtils {
} else if (dateType.equals("TAI")) {
replacement = DateUtils.toString(DateUtils.toTai(gc));
} else {
- throw new Exception("Invalid date type specified '"
+ throw new CasMetadataException("Invalid date type specified '"
+ dateString + "'");
}
@@ -176,7 +177,7 @@ public final class PathUtils {
* current UTC time
*/
public static String doDynamicDateRollReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws ParseException, CasMetadataException, CommonsException {
Pattern dateFormatPattern = Pattern
.compile("\\[\\s*DATE_ADD\\s*\\(.{1,}?,.{1,}?,.{1,}?,.{1,}?\\)\\s*\\]");
Matcher dateFormatMatcher = dateFormatPattern.matcher(string);
@@ -227,7 +228,7 @@ public final class PathUtils {
}
public static String doDynamicDateFormatReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws ParseException, CasMetadataException, CommonsException {
Pattern dateFormatPattern = Pattern
.compile("\\[\\s*FORMAT\\s*\\(.{1,}?,.{1,}?,.{1,}?\\)\\s*\\]");
Matcher dateFormatMatcher = dateFormatPattern.matcher(string);
@@ -265,7 +266,7 @@ public final class PathUtils {
* with TAI time with format: "yyyy-MM-dd'T'HH:mm:ss.SSS-0000<leapSecs>"
*/
public static String doDynamicUtcToTaiDateReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws ParseException, CommonsException, CasMetadataException {
Pattern utcToTaiPattern = Pattern.compile("\\[\\s*UTC_TO_TAI\\s*\\(.{1,}?\\)\\s*\\]");
Matcher matcher = utcToTaiPattern.matcher(string);
while (matcher.find()) {
@@ -288,7 +289,7 @@ public final class PathUtils {
* with seconds between <epoch-date> and <date-string>
*/
public static String doDynamicDateToSecsReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws CommonsException, ParseException, CasMetadataException {
Pattern utcToTaiPattern = Pattern.compile("\\[\\s*DATE_TO_SECS\\s*\\(.{1,}?\\,.{1,}?,.{1,}?\\)\\s*\\]");
Matcher matcher = utcToTaiPattern.matcher(string);
while (matcher.find()) {
@@ -316,7 +317,7 @@ public final class PathUtils {
* with milliseconds between <epoch-date> and <date-string>
*/
public static String doDynamicDateToMillisReplacement(String string,
- Metadata metadata) throws Exception {
+ Metadata metadata) throws ParseException, CommonsException, CasMetadataException {
Pattern utcToTaiPattern = Pattern.compile("\\[\\s*DATE_TO_MILLIS\\s*\\(.{1,}?\\,.{1,}?,.{1,}?\\)\\s*\\]");
Matcher matcher = utcToTaiPattern.matcher(string);
while (matcher.find()) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
index 7538984..743994e 100644
--- a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
+++ b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
@@ -182,7 +182,7 @@ public final class PCSHealthMonitor implements CoreMetKeys,
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws InstantiationException {
String usage = "PCSHealthMonitor <fm url> <wm url> <rm url> <crawler xml file path> <workflow states xml file path>\n";
String fmUrlStr, wmUrlStr, rmUrlStr;
String crawlerXmlFilePath, workflowStateXmlPath;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSLongLister.java
----------------------------------------------------------------------
diff --git a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSLongLister.java b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSLongLister.java
index 496fbf0..315de3f 100644
--- a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSLongLister.java
+++ b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSLongLister.java
@@ -28,6 +28,7 @@ import org.apache.oodt.cas.metadata.Metadata;
//JDK imports
import java.io.File;
+import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.List;
import java.util.Stack;
@@ -55,7 +56,7 @@ public class PCSLongLister implements PCSMetadata, CoreMetKeys {
fm = new FileManagerUtils(fmUrlStr);
try {
this.conf = new ListingConf(new File(confFile));
- } catch (Exception e) {
+ } catch (FileNotFoundException e) {
throw new InstantiationException(e.getMessage());
}
}
@@ -87,7 +88,7 @@ public class PCSLongLister implements PCSMetadata, CoreMetKeys {
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws InstantiationException {
String usage = "PCSLongLister <conf file> <fmurl> [files]";
List fileList;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSTrace.java
----------------------------------------------------------------------
diff --git a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSTrace.java b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSTrace.java
index aeacaec..e86840e 100644
--- a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSTrace.java
+++ b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSTrace.java
@@ -18,20 +18,21 @@
package org.apache.oodt.pcs.tools;
//JDK imports
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-
-//OODT imports
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.workflow.structs.WorkflowInstance;
import org.apache.oodt.pcs.metadata.PCSConfigMetadata;
import org.apache.oodt.pcs.metadata.PCSMetadata;
import org.apache.oodt.pcs.pedigree.Pedigree;
import org.apache.oodt.pcs.pedigree.PedigreeTree;
import org.apache.oodt.pcs.util.FileManagerUtils;
import org.apache.oodt.pcs.util.WorkflowManagerUtils;
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.metadata.Metadata;
-import org.apache.oodt.cas.workflow.structs.WorkflowInstance;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+//OODT imports
/**
*
@@ -190,7 +191,7 @@ public final class PCSTrace implements PCSMetadata, PCSConfigMetadata {
* @param args
* @throws Exception
*/
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
String productName = null;
String workflowUrlStr = null, filemgrUrlStr = null;
boolean enableNotCat = false;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonController.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonController.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonController.java
index 264e7cd..88da43f 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonController.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/daemon/DaemonController.java
@@ -153,7 +153,7 @@ public class DaemonController {
* @throws Exception
* On error! :)
*/
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws RemoteException {
String avgCrawlOperation = "--getAverageRunTime\n";
String getMilisCrawlOperation = "--getMilisCrawling\n";
String getNumCrawlsOperation = "--getNumCrawls\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/exceptions/RetrievalMethodException.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/exceptions/RetrievalMethodException.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/exceptions/RetrievalMethodException.java
index 914ee15..b43e716 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/exceptions/RetrievalMethodException.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/exceptions/RetrievalMethodException.java
@@ -38,4 +38,8 @@ public class RetrievalMethodException extends PushPullFrameworkException {
public RetrievalMethodException(String msg) {
super(msg);
}
+
+ public RetrievalMethodException(String msg, Throwable t) {
+ super(msg, t);
+ }
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/DirStructXmlParser.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/DirStructXmlParser.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/DirStructXmlParser.java
index 34fa21d..c1e8dc9 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/DirStructXmlParser.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/filerestrictions/parsers/DirStructXmlParser.java
@@ -20,6 +20,7 @@ package org.apache.oodt.cas.pushpull.filerestrictions.parsers;
//OODT imports
import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.CasMetadataException;
import org.apache.oodt.cas.metadata.util.PathUtils;
import org.apache.oodt.cas.pushpull.exceptions.ParserException;
import org.apache.oodt.cas.pushpull.expressions.GlobalVariables;
@@ -28,6 +29,7 @@ import org.apache.oodt.cas.pushpull.expressions.Variable;
import org.apache.oodt.cas.pushpull.filerestrictions.Parser;
import org.apache.oodt.cas.pushpull.filerestrictions.VirtualFile;
import org.apache.oodt.cas.pushpull.filerestrictions.VirtualFileStructure;
+import org.apache.oodt.commons.exceptions.CommonsException;
import org.apache.oodt.commons.xml.XMLUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -35,6 +37,7 @@ import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import java.io.FileInputStream;
+import java.text.ParseException;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.logging.Level;
@@ -207,7 +210,7 @@ public class DirStructXmlParser implements Parser {
return input;
}
- private void parseVariablesXML(NodeList list) throws Exception {
+ private void parseVariablesXML(NodeList list) throws ParseException, CommonsException, CasMetadataException {
// loop through all variable elements
for (int i = 0; i < list.getLength(); i++) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/ListRetriever.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/ListRetriever.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/ListRetriever.java
index 743e5f8..ccf28b1 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/ListRetriever.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/ListRetriever.java
@@ -24,6 +24,7 @@ import org.apache.oodt.cas.metadata.Metadata;
import org.apache.oodt.cas.pushpull.config.DataFilesInfo;
import org.apache.oodt.cas.pushpull.config.DownloadInfo;
import org.apache.oodt.cas.pushpull.exceptions.AlreadyInDatabaseException;
+import org.apache.oodt.cas.pushpull.exceptions.ParserException;
import org.apache.oodt.cas.pushpull.exceptions.RetrievalMethodException;
import org.apache.oodt.cas.pushpull.exceptions.ToManyFailedDownloadsException;
import org.apache.oodt.cas.pushpull.exceptions.UndefinedTypeException;
@@ -38,6 +39,7 @@ import org.apache.oodt.cas.pushpull.retrievalsystem.FileRetrievalSystem;
//JDK imports
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -59,7 +61,7 @@ public class ListRetriever implements RetrievalMethod {
public void processPropFile(FileRetrievalSystem frs, Parser propFileParser,
File propFile, DataFilesInfo dfi, DataFileToPropFileLinker linker)
- throws Exception {
+ throws FileNotFoundException, ParserException, RetrievalMethodException {
RemoteSite remoteSite;
// parse property file
@@ -97,7 +99,7 @@ public class ListRetriever implements RetrievalMethod {
e.printStackTrace();
linker.markAsFailed(propFile, "Failed to download " + file
+ " from " + remoteSite + " : " + e.getMessage());
- throw new Exception("Uknown error accured while downloading "
+ throw new RetrievalMethodException("Uknown error accured while downloading "
+ file + " from " + remoteSite + " -- bailing out : "
+ e.getMessage());
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/RemoteCrawler.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/RemoteCrawler.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/RemoteCrawler.java
index f4c2ca8..925a65d 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/RemoteCrawler.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalmethod/RemoteCrawler.java
@@ -21,9 +21,11 @@ package org.apache.oodt.cas.pushpull.retrievalmethod;
//OODT imports
import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.protocol.exceptions.ProtocolException;
import org.apache.oodt.cas.pushpull.config.DataFilesInfo;
import org.apache.oodt.cas.pushpull.config.DownloadInfo;
import org.apache.oodt.cas.pushpull.exceptions.AlreadyInDatabaseException;
+import org.apache.oodt.cas.pushpull.exceptions.ParserException;
import org.apache.oodt.cas.pushpull.exceptions.RetrievalMethodException;
import org.apache.oodt.cas.pushpull.exceptions.ToManyFailedDownloadsException;
import org.apache.oodt.cas.pushpull.exceptions.UndefinedTypeException;
@@ -43,6 +45,8 @@ import org.apache.oodt.cas.pushpull.retrievalsystem.FileRetrievalSystem;
//JDK imports
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.net.MalformedURLException;
import java.util.List;
import java.util.Stack;
import java.util.logging.Level;
@@ -73,7 +77,8 @@ public class RemoteCrawler implements RetrievalMethod {
@Override
public void processPropFile(FileRetrievalSystem frs, Parser propFileParser,
File propFile, DataFilesInfo dfi, DataFileToPropFileLinker linker)
- throws Exception {
+ throws FileNotFoundException, ParserException, ProtocolException, MalformedURLException,
+ RetrievalMethodException {
RemoteSite remoteSite;
// parse property file
@@ -157,7 +162,7 @@ public class RemoteCrawler implements RetrievalMethod {
LOG.log(Level.WARNING, "Skipping file : " + e.getMessage());
} catch (Exception e) {
linker.markAsFailed(propFile, e.getMessage());
- throw new Exception("Uknown error accured while downloading "
+ throw new RetrievalMethodException("Uknown error accured while downloading "
+ file + " from " + remoteSite + " -- bailing out : "
+ e.getMessage(), e);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/exceptions/ResourceException.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/exceptions/ResourceException.java b/resource/src/main/java/org/apache/oodt/cas/resource/exceptions/ResourceException.java
new file mode 100644
index 0000000..90afdb1
--- /dev/null
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/exceptions/ResourceException.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.resource.exceptions;
+
+/**
+ * Created by bugg on 27/10/15.
+ */
+public class ResourceException extends Exception{
+
+ public ResourceException(String message){
+ super(message);
+ }
+
+ public ResourceException(String message, Throwable t){
+ super(message, t);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/monitor/utils/MockGmetad.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/monitor/utils/MockGmetad.java b/resource/src/main/java/org/apache/oodt/cas/resource/monitor/utils/MockGmetad.java
index f41ebc3..e5a77ce 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/monitor/utils/MockGmetad.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/monitor/utils/MockGmetad.java
@@ -85,7 +85,7 @@ public class MockGmetad implements Runnable {
}
- public static void main(String [] args) throws Exception{
+ public static void main(String [] args){
String xmlPath;
int serverPort;
final String usage = "java MockGmetad <xml path> <port>\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
index 1f73aa8..3aee637 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/system/XmlRpcResourceManager.java
@@ -18,7 +18,6 @@
package org.apache.oodt.cas.resource.system;
-//OODT imports
import org.apache.oodt.cas.resource.scheduler.Scheduler;
import org.apache.oodt.cas.resource.structs.Job;
import org.apache.oodt.cas.resource.structs.JobInput;
@@ -37,6 +36,7 @@ import org.apache.xmlrpc.WebServer;
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
@@ -47,9 +47,6 @@ import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
-//APACHE imports
-//JDK imports
-
/**
* @author woollard
* @version $Revision$
@@ -74,7 +71,7 @@ public class XmlRpcResourceManager {
/* our scheduler */
private Scheduler scheduler = null;
- public XmlRpcResourceManager(int port) throws Exception {
+ public XmlRpcResourceManager(int port) throws IOException {
// load properties from workflow manager properties file, if specified
if (System.getProperty("org.apache.oodt.cas.resource.properties") != null) {
String configFile = System
@@ -427,7 +424,7 @@ public class XmlRpcResourceManager {
return report;
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
int portNum = -1;
String usage = "XmlRpcResourceManager --portNum <port number for xml rpc service>\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/system/extern/XmlRpcBatchStub.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/system/extern/XmlRpcBatchStub.java b/resource/src/main/java/org/apache/oodt/cas/resource/system/extern/XmlRpcBatchStub.java
index 5e614ae..77d7275 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/system/extern/XmlRpcBatchStub.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/system/extern/XmlRpcBatchStub.java
@@ -62,7 +62,7 @@ public class XmlRpcBatchStub {
private static Map jobThreadMap = null;
- public XmlRpcBatchStub(int port) throws Exception {
+ public XmlRpcBatchStub(int port) {
webServerPort = port;
// start up the web server
@@ -181,7 +181,7 @@ public class XmlRpcBatchStub {
}
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) {
int portNum = -1;
String usage = "XmlRpcBatchStub --portNum <port number for xml rpc service>\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/tools/JobSubmitter.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/tools/JobSubmitter.java b/resource/src/main/java/org/apache/oodt/cas/resource/tools/JobSubmitter.java
index 1c27311..16fd3bb 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/tools/JobSubmitter.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/tools/JobSubmitter.java
@@ -21,6 +21,7 @@ package org.apache.oodt.cas.resource.tools;
//JDK imports
import java.io.File;
import java.io.FileFilter;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -95,7 +96,7 @@ public final class JobSubmitter {
return submitJob(spec);
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws MalformedURLException, JobExecutionException {
String resMgrUrlStr = null;
String jobFilePath = null, jobFileDirPath = null;
String usage = "JobSubmitter --rUrl <resource mgr url> [options]\n"
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/tools/RunDirJobSubmitter.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/tools/RunDirJobSubmitter.java b/resource/src/main/java/org/apache/oodt/cas/resource/tools/RunDirJobSubmitter.java
index 63970d5..5f32b04 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/tools/RunDirJobSubmitter.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/tools/RunDirJobSubmitter.java
@@ -19,22 +19,24 @@
package org.apache.oodt.cas.resource.tools;
//JDK imports
+import org.apache.oodt.cas.resource.structs.Job;
+import org.apache.oodt.cas.resource.structs.JobInput;
+import org.apache.oodt.cas.resource.structs.JobSpec;
+import org.apache.oodt.cas.resource.structs.NameValueJobInput;
+import org.apache.oodt.cas.resource.structs.exceptions.JobExecutionException;
+import org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient;
+import org.apache.oodt.cas.resource.util.JobBuilder;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
//OODT imports
-import org.apache.oodt.cas.resource.structs.Job;
-import org.apache.oodt.cas.resource.structs.JobInput;
-import org.apache.oodt.cas.resource.structs.JobSpec;
-import org.apache.oodt.cas.resource.structs.NameValueJobInput;
-import org.apache.oodt.cas.resource.structs.exceptions.JobExecutionException;
-import org.apache.oodt.cas.resource.system.XmlRpcResourceManagerClient;
-import org.apache.oodt.cas.resource.util.JobBuilder;
/**
* @author cecilia
@@ -123,7 +125,7 @@ public final class RunDirJobSubmitter {
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws JobExecutionException, MalformedURLException {
String resMgrUrlStr = null;
String jobFileName = null;
String runDirFileName = null;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/resource/src/main/java/org/apache/oodt/cas/resource/util/Ulimit.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/util/Ulimit.java b/resource/src/main/java/org/apache/oodt/cas/resource/util/Ulimit.java
index adba1b1..434f262 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/util/Ulimit.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/util/Ulimit.java
@@ -19,6 +19,9 @@
package org.apache.oodt.cas.resource.util;
//JDK imports
+
+import org.apache.oodt.cas.resource.exceptions.ResourceException;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -166,14 +169,14 @@ public final class Ulimit implements UlimitMetKeys {
}
- public static Map getUlimitPropertiesMap() throws Exception {
+ public static Map getUlimitPropertiesMap() throws ResourceException, IOException {
Process p;
try {
p = Runtime.getRuntime().exec(
new String[] { shell, runShellCmdOption, ulimitCommand });
} catch (IOException e) {
e.printStackTrace();
- throw new Exception(
+ throw new ResourceException(
"IOException executing ulimit command: Message: "
+ e.getMessage());
}
@@ -197,16 +200,16 @@ public final class Ulimit implements UlimitMetKeys {
return properties;
}
- public static List getUlimitProperties() throws Exception {
+ public static List getUlimitProperties() throws ResourceException, IOException {
Process p;
try {
p = Runtime.getRuntime().exec(
new String[] { shell, runShellCmdOption, ulimitCommand });
} catch (IOException e) {
e.printStackTrace();
- throw new Exception(
+ throw new ResourceException(
"IOException executing ulimit command: Message: "
- + e.getMessage());
+ + e.getMessage(), e);
}
BufferedReader in = new BufferedReader(new InputStreamReader(p
.getInputStream()));
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/sso/src/main/java/org/apache/oodt/security/sso/OpenSSOImpl.java
----------------------------------------------------------------------
diff --git a/sso/src/main/java/org/apache/oodt/security/sso/OpenSSOImpl.java b/sso/src/main/java/org/apache/oodt/security/sso/OpenSSOImpl.java
index 4145556..318ff9d 100755
--- a/sso/src/main/java/org/apache/oodt/security/sso/OpenSSOImpl.java
+++ b/sso/src/main/java/org/apache/oodt/security/sso/OpenSSOImpl.java
@@ -17,12 +17,13 @@
package org.apache.oodt.security.sso;
-//JDK imports
import org.apache.commons.codec.binary.Base64;
import org.apache.oodt.security.sso.opensso.SSOMetKeys;
import org.apache.oodt.security.sso.opensso.SSOProxy;
+import org.apache.oodt.security.sso.opensso.SingleSignOnException;
import org.apache.oodt.security.sso.opensso.UserDetails;
+import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Vector;
@@ -30,9 +31,6 @@ import java.util.logging.Logger;
import javax.servlet.http.Cookie;
-//APACHE imports
-//LMMP imports
-
/**
*
* Connects to OpenSSO's authorization endpoint and authenticates a user,
@@ -120,7 +118,7 @@ public class OpenSSOImpl extends AbstractWebBasedSingleSignOn implements
* @throws Exception
* If any error (e.g., HTTP REST error) occurs.
*/
- public List<String> getGroupsForUser() throws Exception {
+ public List<String> getGroupsForUser() throws IOException, SingleSignOnException {
String token = this.getSSOToken();
if (token == null) {
return Collections.EMPTY_LIST;
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/sso/src/main/java/org/apache/oodt/security/sso/opensso/SSOProxy.java
----------------------------------------------------------------------
diff --git a/sso/src/main/java/org/apache/oodt/security/sso/opensso/SSOProxy.java b/sso/src/main/java/org/apache/oodt/security/sso/opensso/SSOProxy.java
index 972fedf..7e24413 100755
--- a/sso/src/main/java/org/apache/oodt/security/sso/opensso/SSOProxy.java
+++ b/sso/src/main/java/org/apache/oodt/security/sso/opensso/SSOProxy.java
@@ -17,7 +17,7 @@
package org.apache.oodt.security.sso.opensso;
-//JDK imports
+
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpStatus;
@@ -31,8 +31,6 @@ import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
-//APACHE imports
-
/**
*
* A client class to the services provided by the <a
@@ -114,7 +112,7 @@ public class SSOProxy implements SSOMetKeys {
}
public IdentityDetails readIdentity(String username, String token)
- throws Exception {
+ throws IOException, SingleSignOnException {
HttpClient httpClient = new HttpClient();
PostMethod post = new PostMethod(IDENT_READ_ENDPOINT);
LOG.log(Level.INFO, "Obtaining identity: username: [" + username
@@ -127,14 +125,14 @@ public class SSOProxy implements SSOMetKeys {
httpClient.executeMethod(post);
if (post.getStatusCode() != HttpStatus.SC_OK) {
- throw new Exception(post.getStatusLine().toString());
+ throw new SingleSignOnException(post.getStatusLine().toString());
}
return parseIdentityDetails(post.getResponseBodyAsString().trim());
}
- public UserDetails getUserAttributes(String token) throws Exception {
+ public UserDetails getUserAttributes(String token) throws IOException, SingleSignOnException {
HttpClient httpClient = new HttpClient();
PostMethod post = new PostMethod(IDENT_ATTR_ENDPOINT);
LOG.log(Level.INFO, "Obtaining user attributes: token: [" + token
@@ -145,7 +143,7 @@ public class SSOProxy implements SSOMetKeys {
httpClient.executeMethod(post);
if (post.getStatusCode() != HttpStatus.SC_OK) {
- throw new Exception(post.getStatusLine().toString());
+ throw new SingleSignOnException(post.getStatusLine().toString());
}
return parseUserDetails(post.getResponseBodyAsString().trim());
@@ -282,7 +280,7 @@ public class SSOProxy implements SSOMetKeys {
return details;
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException, SingleSignOnException {
String usage = "SSOProxy <cmd> [args]\n\n" + "Where cmd is one of:\n"
+ "authenticate <user> <pass>\n" + "identity <user> <token>\n"
+ "attributes <token>\nlogout <token>\n";
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/sso/src/main/java/org/apache/oodt/security/sso/opensso/SingleSignOnException.java
----------------------------------------------------------------------
diff --git a/sso/src/main/java/org/apache/oodt/security/sso/opensso/SingleSignOnException.java b/sso/src/main/java/org/apache/oodt/security/sso/opensso/SingleSignOnException.java
new file mode 100644
index 0000000..bed65e7
--- /dev/null
+++ b/sso/src/main/java/org/apache/oodt/security/sso/opensso/SingleSignOnException.java
@@ -0,0 +1,11 @@
+package org.apache.oodt.security.sso.opensso;
+
+/**
+ * Created by bugg on 27/10/15.
+ */
+public class SingleSignOnException extends Exception {
+
+ public SingleSignOnException(String message) {
+ super(message);
+ }
+}
[5/7] oodt git commit: OODT-909 create improved exceptions
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataUtils.java
----------------------------------------------------------------------
diff --git a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataUtils.java b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataUtils.java
index df64812..d692f4a 100644
--- a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataUtils.java
+++ b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataUtils.java
@@ -19,6 +19,14 @@
package org.apache.oodt.cas.product.data;
//JDK imports
+
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.ProductType;
+import org.apache.oodt.cas.filemgr.structs.Reference;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.SerializableMetadata;
+import org.apache.oodt.cas.product.exceptions.CasProductException;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -35,11 +43,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
//OODT imports
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.structs.Reference;
-import org.apache.oodt.cas.metadata.Metadata;
-import org.apache.oodt.cas.metadata.SerializableMetadata;
/**
*
@@ -62,7 +65,7 @@ public final class DataUtils implements DataDeliveryKeys {
};
public static String createDatasetZipFile(ProductType type,
- String workingDirPath) throws Exception {
+ String workingDirPath) throws IOException, CasProductException {
String datasetZipFileName = type.getName() + ".zip";
workingDirPath += workingDirPath.endsWith("/") ? "" : "/";
String datasetZipFilePath = workingDirPath + datasetZipFileName;
@@ -85,7 +88,7 @@ public final class DataUtils implements DataDeliveryKeys {
File[] productZipFiles = new File(workingDirPath).listFiles(ZIP_FILTER);
if (productZipFiles == null || productZipFiles.length == 0)
{
- throw new Exception("No product zip files to include in dataset: ["
+ throw new CasProductException("No product zip files to include in dataset: ["
+ type.getName() + "]");
}
@@ -121,7 +124,7 @@ public final class DataUtils implements DataDeliveryKeys {
}
public static String createProductZipFile(Product product, Metadata metadata,
- String workingDirPath) throws Exception {
+ String workingDirPath) throws IOException {
String productZipFileName = product.getProductName() + ".zip";
workingDirPath += workingDirPath.endsWith("/") ? "" : "/";
String productZipFilePath = workingDirPath + productZipFileName;
@@ -201,7 +204,7 @@ public final class DataUtils implements DataDeliveryKeys {
}
private static void addMetFileToProductZip(Metadata productMet,
- String metFileBaseName, ZipOutputStream out) throws Exception {
+ String metFileBaseName, ZipOutputStream out) throws IOException {
// get the product metadata, and add its met file to the stream
ByteArrayOutputStream metOut = new ByteArrayOutputStream();
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/exceptions/CasProductException.java
----------------------------------------------------------------------
diff --git a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/exceptions/CasProductException.java b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/exceptions/CasProductException.java
new file mode 100644
index 0000000..c6f9d9c
--- /dev/null
+++ b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/exceptions/CasProductException.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.cas.product.exceptions;
+
+/**
+ * CasProductException for internal exceptions
+ */
+public class CasProductException extends Exception {
+
+ public CasProductException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
----------------------------------------------------------------------
diff --git a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
index 9b4560b..534cd16 100755
--- a/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
+++ b/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
@@ -17,26 +17,13 @@
package org.apache.oodt.cas.product.jaxrs.services;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.servlet.ServletContext;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-
import org.apache.oodt.cas.filemgr.structs.FileTransferStatus;
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductType;
import org.apache.oodt.cas.filemgr.structs.Reference;
import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.product.exceptions.CasProductException;
import org.apache.oodt.cas.product.jaxrs.exceptions.BadRequestException;
import org.apache.oodt.cas.product.jaxrs.exceptions.NotFoundException;
import org.apache.oodt.cas.product.jaxrs.resources.DatasetResource;
@@ -45,6 +32,20 @@ import org.apache.oodt.cas.product.jaxrs.resources.ReferenceResource;
import org.apache.oodt.cas.product.jaxrs.resources.TransferResource;
import org.apache.oodt.cas.product.jaxrs.resources.TransfersResource;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+
/**
* Service class that handles HTTP requests and returns file manager entities
* such as {@link Reference references} and {@link Product products} as
@@ -329,8 +330,7 @@ public class CasProductJaxrsService
* @throws Exception if an object cannot be retrieved from the context
* attribute
*/
- public File getContextWorkingDir() throws Exception
- {
+ public File getContextWorkingDir() throws CasProductException {
Object workingDirObject = context.getAttribute("workingDir");
if (workingDirObject != null && workingDirObject instanceof File)
{
@@ -340,7 +340,7 @@ public class CasProductJaxrsService
String message = "Unable to get the file manager's working "
+ "directory from the servlet context.";
LOGGER.log(Level.WARNING, message);
- throw new Exception(message);
+ throw new CasProductException(message);
}
@@ -352,8 +352,7 @@ public class CasProductJaxrsService
* attribute
*/
public XmlRpcFileManagerClient getContextClient()
- throws Exception
- {
+ throws CasProductException {
// Get the file manager client from the servlet context.
Object clientObject = context.getAttribute("client");
if (clientObject != null &&
@@ -365,6 +364,6 @@ public class CasProductJaxrsService
String message = "Unable to get the file manager client from the "
+ "servlet context.";
LOGGER.log(Level.WARNING, message);
- throw new Exception(message);
+ throw new CasProductException(message);
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/xmlps/src/main/java/org/apache/oodt/xmlps/exceptions/XmlpsException.java
----------------------------------------------------------------------
diff --git a/xmlps/src/main/java/org/apache/oodt/xmlps/exceptions/XmlpsException.java b/xmlps/src/main/java/org/apache/oodt/xmlps/exceptions/XmlpsException.java
new file mode 100644
index 0000000..9a4f765
--- /dev/null
+++ b/xmlps/src/main/java/org/apache/oodt/xmlps/exceptions/XmlpsException.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oodt.xmlps.exceptions;
+
+/**
+ * XmlpsException for internally thrown exceptions.
+ */
+public class XmlpsException extends Exception {
+
+ public XmlpsException(String message){
+ super(message);
+ }
+}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/xmlps/src/main/java/org/apache/oodt/xmlps/mapping/MappingReader.java
----------------------------------------------------------------------
diff --git a/xmlps/src/main/java/org/apache/oodt/xmlps/mapping/MappingReader.java b/xmlps/src/main/java/org/apache/oodt/xmlps/mapping/MappingReader.java
index e24acd7..fb0e9c5 100644
--- a/xmlps/src/main/java/org/apache/oodt/xmlps/mapping/MappingReader.java
+++ b/xmlps/src/main/java/org/apache/oodt/xmlps/mapping/MappingReader.java
@@ -18,12 +18,20 @@
package org.apache.oodt.xmlps.mapping;
//OODT imports
+
import org.apache.oodt.commons.xml.XMLUtils;
+import org.apache.oodt.xmlps.exceptions.XmlpsException;
import org.apache.oodt.xmlps.mapping.funcs.MappingFunc;
import org.apache.oodt.xmlps.util.GenericCDEObjectFactory;
-import org.w3c.dom.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
@@ -43,7 +51,7 @@ public final class MappingReader implements MappingReaderMetKeys {
throw new InstantiationException("Don't construct reader objects!");
}
- public static Mapping getMapping(InputStream is) throws Exception {
+ public static Mapping getMapping(InputStream is) throws XmlpsException {
Document mappingDoc = XMLUtils.getDocumentRoot(is);
Mapping map = new Mapping();
@@ -58,20 +66,20 @@ public final class MappingReader implements MappingReaderMetKeys {
}
- public static Mapping getMapping(URL mappingUrl) throws Exception {
+ public static Mapping getMapping(URL mappingUrl) throws IOException, XmlpsException {
return getMapping(mappingUrl.openStream());
}
- public static Mapping getMapping(String filePath) throws Exception {
+ public static Mapping getMapping(String filePath) throws FileNotFoundException, XmlpsException {
return getMapping(new FileInputStream(filePath));
}
private static void readTables(Element rootElem, Mapping map)
- throws Exception {
+ throws XmlpsException {
Element tblsElem = XMLUtils.getFirstElement(TABLES_OUTER_TAG, rootElem);
if (tblsElem == null) {
- throw new Exception("Unable to parse mapping XML file: [" + map.getName()
+ throw new XmlpsException("Unable to parse mapping XML file: [" + map.getName()
+ "]: reason: no defined tables tag element!");
}
@@ -79,7 +87,7 @@ public final class MappingReader implements MappingReaderMetKeys {
String defaultTbl = tblsElem.getAttribute("default");
// make sure that the default attribute is set
if (defaultTbl == null || (defaultTbl.equals(""))) {
- throw new Exception("Unable to parse mapping XML file: [" + map.getName()
+ throw new XmlpsException("Unable to parse mapping XML file: [" + map.getName()
+ "]: reason: there needs to be a default table defined "
+ "by the \"default\" attribute!");
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/xmlps/src/main/java/org/apache/oodt/xmlps/product/XMLPSProductHandler.java
----------------------------------------------------------------------
diff --git a/xmlps/src/main/java/org/apache/oodt/xmlps/product/XMLPSProductHandler.java b/xmlps/src/main/java/org/apache/oodt/xmlps/product/XMLPSProductHandler.java
index 4ec85fe..9f27c94 100644
--- a/xmlps/src/main/java/org/apache/oodt/xmlps/product/XMLPSProductHandler.java
+++ b/xmlps/src/main/java/org/apache/oodt/xmlps/product/XMLPSProductHandler.java
@@ -18,8 +18,10 @@
package org.apache.oodt.xmlps.product;
//OODT imports
+
import org.apache.oodt.product.ProductException;
import org.apache.oodt.product.QueryHandler;
+import org.apache.oodt.xmlps.exceptions.XmlpsException;
import org.apache.oodt.xmlps.mapping.DatabaseTable;
import org.apache.oodt.xmlps.mapping.FieldScope;
import org.apache.oodt.xmlps.mapping.Mapping;
@@ -132,7 +134,7 @@ public class XMLPSProductHandler implements QueryHandler {
return query;
}
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws InstantiationException, ProductException {
String usage = "XMLPSProductHandler <query>\n";
if (args.length != 1) {
@@ -276,7 +278,7 @@ public class XMLPSProductHandler implements QueryHandler {
}
protected void translateToDomain(List<QueryElement> elemSet,
- boolean selectSet) throws Exception {
+ boolean selectSet) throws XmlpsException {
// go through each query element: use the mapping fields
// to translate the names
@@ -318,7 +320,7 @@ public class XMLPSProductHandler implements QueryHandler {
break;
QueryElement litElem = i.next();
if (!litElem.getRole().equals(XMLQueryHelper.ROLE_LITERAL)) {
- throw new Exception("next query element not "
+ throw new XmlpsException("next query element not "
+ XMLQueryHelper.ROLE_LITERAL + "! role is "
+ litElem.getRole() + " instead!");
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/daf0904a/xmlps/src/main/java/org/apache/oodt/xmlps/profile/XMLPSProfileHandler.java
----------------------------------------------------------------------
diff --git a/xmlps/src/main/java/org/apache/oodt/xmlps/profile/XMLPSProfileHandler.java b/xmlps/src/main/java/org/apache/oodt/xmlps/profile/XMLPSProfileHandler.java
index 5f66e14..7f2987f 100644
--- a/xmlps/src/main/java/org/apache/oodt/xmlps/profile/XMLPSProfileHandler.java
+++ b/xmlps/src/main/java/org/apache/oodt/xmlps/profile/XMLPSProfileHandler.java
@@ -17,15 +17,18 @@
package org.apache.oodt.xmlps.profile;
-//OODT imports
+import org.apache.oodt.profile.Profile;
+import org.apache.oodt.profile.ProfileException;
+import org.apache.oodt.profile.handlers.ProfileHandler;
+import org.apache.oodt.xmlps.exceptions.XmlpsException;
import org.apache.oodt.xmlps.mapping.DatabaseTable;
import org.apache.oodt.xmlps.mapping.MappingReader;
import org.apache.oodt.xmlps.product.XMLPSProductHandler;
-import org.apache.oodt.xmlps.profile.DBMSExecutor;
import org.apache.oodt.xmlps.queryparser.Expression;
import org.apache.oodt.xmlps.queryparser.HandlerQueryParser;
+import org.apache.oodt.xmlquery.QueryElement;
+import org.apache.oodt.xmlquery.XMLQuery;
-//JDK imports
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -35,12 +38,6 @@ import java.util.Stack;
import java.util.logging.Level;
import java.util.logging.Logger;
-//OODT imports
-import org.apache.oodt.profile.Profile;
-import org.apache.oodt.profile.ProfileException;
-import org.apache.oodt.profile.handlers.ProfileHandler;
-import org.apache.oodt.xmlquery.QueryElement;
-import org.apache.oodt.xmlquery.XMLQuery;
/**
*
@@ -196,7 +193,7 @@ public class XMLPSProfileHandler extends XMLPSProductHandler implements
}
protected void translateToDomain(List<QueryElement> elemSet,
- boolean selectSet) throws Exception {
+ boolean selectSet) throws XmlpsException {
super.translateToDomain(elemSet, selectSet);
}
[2/7] oodt git commit: OODT-890 remove unrequired catch blocks
Posted by ma...@apache.org.
OODT-890 remove unrequired catch blocks
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/733436e8
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/733436e8
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/733436e8
Branch: refs/heads/master
Commit: 733436e8b699b3b8e6ae2c03fe4fc671e33d848f
Parents: 76dfbad
Author: Tom Barber <to...@analytical-labs.com>
Authored: Mon Oct 26 23:03:59 2015 +0000
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Mon Oct 26 23:03:59 2015 +0000
----------------------------------------------------------------------
.../cas/filemgr/browser/model/QueryBuilder.java | 13 ++-----------
.../XmlRpcCommunicationChannelClient.java | 4 +---
.../XmlRpcCommunicationChannelServer.java | 4 +---
.../system/impl/CatalogServiceLocal.java | 4 +---
.../oodt/cas/curation/util/DateUtils.java | 10 ++++------
.../catalog/solr/DefaultProductSerializer.java | 6 ++----
.../filemgr/datatransfer/S3DataTransferer.java | 2 --
.../oodt/cas/filemgr/tools/CatalogSearch.java | 13 ++-----------
.../oodt/cas/filemgr/tools/QueryTool.java | 8 ++------
.../cli/action/TestIngestProductCliAction.java | 6 ------
.../apache/oodt/pcs/listing/ListingConf.java | 2 --
.../ofsn/OFSNFileHandlerConfiguration.java | 3 +--
.../apache/oodt/profile/gui/LeafListener.java | 8 --------
.../cas/protocol/sftp/TestJschSftpProtocol.java | 2 --
.../oodt/cas/pushpull/config/RemoteSpecs.java | 2 +-
.../cas/resource/batchmgr/XmlRpcBatchMgr.java | 5 +----
.../resource/noderepo/XmlNodeRepository.java | 13 +++++--------
.../resource/queuerepo/XmlQueueRepository.java | 20 +++++++-------------
.../engine/processor/WorkflowProcessor.java | 2 +-
.../repository/XMLWorkflowRepository.java | 3 ---
20 files changed, 31 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
----------------------------------------------------------------------
diff --git a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
index ec8f58d..79097d4 100644
--- a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
+++ b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
@@ -62,11 +62,7 @@ public class QueryBuilder {
org.apache.lucene.search.Query luceneQ) {
if (luceneQ instanceof TermQuery) {
Term t = ((TermQuery) luceneQ).getTerm();
- if (t.field().equals("__FREE__")) {
- // if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new
- // FreeTextQueryCriteria());
- // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t.text());
- } else {
+ if (!t.field().equals("__FREE__")) {
String element = database.getElementID(t.field());
if (!element.equals("") && !t.text().equals("")) {
@@ -75,12 +71,7 @@ public class QueryBuilder {
}
} else if (luceneQ instanceof PhraseQuery) {
Term[] t = ((PhraseQuery) luceneQ).getTerms();
- if (t[0].field().equals("__FREE__")) {
- // if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new
- // FreeTextQueryCriteria());
- // for(int i=0;i<t.length;i++)
- // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t[i].text());
- } else {
+ if (!t[0].field().equals("__FREE__")) {
for (Term aT : t) {
String element = database.getElementID(aT.field());
if (!element.equals("") && !aT.text().equals("")) {
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelClient.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelClient.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelClient.java
index 2813dd2..0e2f26a 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelClient.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelClient.java
@@ -166,9 +166,7 @@ public class XmlRpcCommunicationChannelClient extends AbstractCommunicationChann
int numBytes;
while ((numBytes = is.read(buf, offset, chunkSize)) != -1)
this.transferFile(new File(toURL.getPath()).getAbsolutePath(), buf, offset, numBytes);
- }catch (Exception e) {
- throw e;
- }finally {
+ } finally {
try {
is.close();
}catch(Exception ignored) {}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
index 77018b3..0b62850 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/server/channel/xmlrpc/XmlRpcCommunicationChannelServer.java
@@ -144,9 +144,7 @@ public class XmlRpcCommunicationChannelServer extends
fOut = new FileOutputStream(outFile, false);
fOut.write(fileData, (int) offset, (int) numBytes);
- }catch (Exception e) {
- throw e;
- }finally {
+ } finally {
try {
fOut.close();
}catch(Exception e) {}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
----------------------------------------------------------------------
diff --git a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
index b545ce8..8cbf1f5 100644
--- a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
+++ b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
@@ -374,9 +374,7 @@ public class CatalogServiceLocal implements CatalogService {
try {
LOG.log(Level.INFO, "Deleting all index mappings for catalog '" + rmCatalog + "'");
this.ingestMapper.deleteAllMappingsForCatalog(catalogId);
- }catch (Exception e) {
- throw e;
- }finally {
+ } finally {
this.ingestMapperLock.writeLock().unlock();
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/curator/services/src/main/java/org/apache/oodt/cas/curation/util/DateUtils.java
----------------------------------------------------------------------
diff --git a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/DateUtils.java b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/DateUtils.java
index 27cbad4..85f6d1f 100644
--- a/curator/services/src/main/java/org/apache/oodt/cas/curation/util/DateUtils.java
+++ b/curator/services/src/main/java/org/apache/oodt/cas/curation/util/DateUtils.java
@@ -37,17 +37,15 @@ import java.util.Locale;
*/
public final class DateUtils {
- public static SimpleDateFormat ISO8601FORMAT = new SimpleDateFormat(
- "yyyy-MM-dd'T'HH:mm:ssZ");
-
- public static SimpleDateFormat RFC822DATEFORMAT = new SimpleDateFormat(
- "EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US);
-
public static String getDateAsRFC822String(Date date) {
+ SimpleDateFormat RFC822DATEFORMAT = new SimpleDateFormat(
+ "EEE', 'dd' 'MMM' 'yyyy' 'HH:mm:ss' 'Z", Locale.US);
return RFC822DATEFORMAT.format(date);
}
public static String getDateAsISO8601String(Date date) {
+ SimpleDateFormat ISO8601FORMAT = new SimpleDateFormat(
+ "yyyy-MM-dd'T'HH:mm:ssZ");
String result = ISO8601FORMAT.format(date);
// convert YYYYMMDDTHH:mm:ss+HH00 into YYYYMMDDTHH:mm:ss+HH:00
// - note the added colon for the Timezone
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
index f758b4f..74e070c 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
@@ -489,10 +489,8 @@ public class DefaultProductSerializer implements ProductSerializer {
* @param metadata : the metadata container
*/
protected void deserializeSingleValueField(String name, String value, Metadata metadata) {
-
- if (name.equals(Parameters.ID)) {
- // ignore Solr internal identifier (as it is duplicate information of CAS.ProductId)
- } else {
+ // ignore Solr internal identifier (as it is duplicate information of CAS.ProductId)
+ if (!name.equals(Parameters.ID)){
metadata.addMetadata(name, value);
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
index 4af138b..1c813f1 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/S3DataTransferer.java
@@ -115,8 +115,6 @@ public class S3DataTransferer implements DataTransfer {
outStream = new FileOutputStream(new File(directory, new File(
stripProtocol(ref.getDataStoreReference(), false)).getName()));
IOUtils.copy(inStream, outStream);
- } catch (IOException e) {
- throw e;
} finally {
try { inStream.close(); } catch (Exception e) {}
try { outStream.close(); } catch (Exception e) {}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
index da2fe5a..bf01039 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
@@ -244,22 +244,13 @@ public class CatalogSearch {
Query luceneQuery) {
if (luceneQuery instanceof TermQuery) {
Term t = ((TermQuery) luceneQuery).getTerm();
- if (t.field().equals(freeTextBlock)) {
- // if(casQuery.getCriteria().isEmpty())
- // casQuery.addCriterion(new FreeTextQueryCriteria());
- // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t.text());
- } else {
+ if (!t.field().equals(freeTextBlock)) {
casQuery
.addCriterion(new TermQueryCriteria(t.field(), t.text()));
}
} else if (luceneQuery instanceof PhraseQuery) {
Term[] t = ((PhraseQuery) luceneQuery).getTerms();
- if (t[0].field().equals(freeTextBlock)) {
- // if(casQuery.getCriteria().isEmpty())
- // casQuery.addCriterion(new FreeTextQueryCriteria());
- // for(int i=0;i<t.length;i++)
- // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t[i].text());
- } else {
+ if (!t[0].field().equals(freeTextBlock)) {
for (Term aT : t) {
casQuery.addCriterion(new TermQueryCriteria(aT.field(),
aT.text()));
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
index 1a3174d..e36c262 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
@@ -129,17 +129,13 @@ public final class QueryTool {
Query luceneQuery) {
if (luceneQuery instanceof TermQuery) {
Term t = ((TermQuery) luceneQuery).getTerm();
- if (t.field().equals(freeTextBlock)) {
- // nothing for now
- } else {
+ if (!t.field().equals(freeTextBlock)) {
casQuery.addCriterion(new TermQueryCriteria(t.field(),
t.text()));
}
} else if (luceneQuery instanceof PhraseQuery) {
Term[] t = ((PhraseQuery) luceneQuery).getTerms();
- if (t[0].field().equals(freeTextBlock)) {
- // nothing for now
- } else {
+ if (!t[0].field().equals(freeTextBlock)) {
for (Term aT : t) {
casQuery.addCriterion(new TermQueryCriteria(
aT.field(), aT.text()));
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
index 7655f54..ae96fd8 100644
--- a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
@@ -261,8 +261,6 @@ public class TestIngestProductCliAction extends TestCase {
ps.println(" <val>" + NOMINAL_DATE_MET_VAL + "</val>");
ps.println(" </keyval>");
ps.println("</cas:metadata>");
- } catch (IOException e) {
- throw e;
} finally {
ps.close();
}
@@ -277,8 +275,6 @@ public class TestIngestProductCliAction extends TestCase {
try {
ps = new PrintStream(new FileOutputStream(new File(reference, subRef)));
ps.println("This is a test sub-reference file");
- } catch (IOException e) {
- throw e;
} finally {
ps.close();
}
@@ -293,8 +289,6 @@ public class TestIngestProductCliAction extends TestCase {
try {
ps = new PrintStream(new FileOutputStream(reference));
ps.println("This is a test sub-reference file");
- } catch (IOException e) {
- throw e;
} finally {
ps.close();
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/pcs/core/src/main/java/org/apache/oodt/pcs/listing/ListingConf.java
----------------------------------------------------------------------
diff --git a/pcs/core/src/main/java/org/apache/oodt/pcs/listing/ListingConf.java b/pcs/core/src/main/java/org/apache/oodt/pcs/listing/ListingConf.java
index a649cde..4d86e04 100644
--- a/pcs/core/src/main/java/org/apache/oodt/pcs/listing/ListingConf.java
+++ b/pcs/core/src/main/java/org/apache/oodt/pcs/listing/ListingConf.java
@@ -58,8 +58,6 @@ public class ListingConf {
InstantiationException {
try {
this.conf = new PGEConfigFileReader().read(new FileInputStream(file));
- } catch (FileNotFoundException e) {
- throw e;
} catch (PGEConfigFileException e) {
throw new InstantiationException(e.getMessage());
} finally {
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandlerConfiguration.java
----------------------------------------------------------------------
diff --git a/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandlerConfiguration.java b/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandlerConfiguration.java
index 5e8b73d..3b5ffbe 100644
--- a/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandlerConfiguration.java
+++ b/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandlerConfiguration.java
@@ -124,7 +124,6 @@ public class OFSNFileHandlerConfiguration {
}
private void cleanse(String path) {
- if (path != null && !path.endsWith("/")) {
- }
+
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/profile/src/main/java/org/apache/oodt/profile/gui/LeafListener.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/oodt/profile/gui/LeafListener.java b/profile/src/main/java/org/apache/oodt/profile/gui/LeafListener.java
index 2ba8e01..83ac3af 100755
--- a/profile/src/main/java/org/apache/oodt/profile/gui/LeafListener.java
+++ b/profile/src/main/java/org/apache/oodt/profile/gui/LeafListener.java
@@ -241,11 +241,7 @@ public class LeafListener extends MouseAdapter{
if(e.isPopupTrigger()){
popup.show(tree,e.getX(),e.getY());
}
- else{
- //System.out.println("Wasn't popup trigger!");
- }
- //}
}
}
@@ -278,11 +274,7 @@ public class LeafListener extends MouseAdapter{
if(e.isPopupTrigger()){
popup.show(tree,e.getX(),e.getY());
}
- else{
- //System.out.println("Wasn't popup trigger!");
- }
- //}
}
}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
----------------------------------------------------------------------
diff --git a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
index 3bded2d..f1d6d74 100644
--- a/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
+++ b/protocol/sftp/src/test/java/org/apache/oodt/cas/protocol/sftp/TestJschSftpProtocol.java
@@ -279,8 +279,6 @@ public class TestJschSftpProtocol extends TestCase {
ps.println(nextLine.replace("2022", Integer.toString(port)));
}
return publicKeyFile;
- } catch (IOException e) {
- throw e;
} finally {
try { ps.close(); } catch (Exception ingore) {}
try { br.close(); } catch (Exception ingore) {}
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/pushpull/src/main/java/org/apache/oodt/cas/pushpull/config/RemoteSpecs.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/config/RemoteSpecs.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/config/RemoteSpecs.java
index b39eb20..add1466 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/config/RemoteSpecs.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/config/RemoteSpecs.java
@@ -110,7 +110,7 @@ public class RemoteSpecs implements ConfigParserMetKeys {
.getAttribute(FIRSTRUN_DATETIME_ATTR);
period = runInfo.getAttribute(PERIOD_ATTR);
runOnReboot = (runInfo.getAttribute(RUNONREBOOT_ATTR)
- .toLowerCase().equals("yes")) ? true : false;
+ .toLowerCase().equals("yes"));
epsilon = runInfo.getAttribute(EPSILON_ATTR);
if (epsilon.equals(""))
epsilon = "0s";
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
index 4f5fa4c..3c7c28b 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/XmlRpcBatchMgr.java
@@ -177,8 +177,6 @@ public class XmlRpcBatchMgr implements Batchmgr {
synchronized (this.specToProxyMap) {
XmlRpcBatchMgrProxy proxy = (XmlRpcBatchMgrProxy) this.specToProxyMap
.remove(spec.getJob().getId());
- if (proxy != null) {
- }
}
try {
@@ -197,8 +195,7 @@ public class XmlRpcBatchMgr implements Batchmgr {
synchronized (this.specToProxyMap) {
XmlRpcBatchMgrProxy proxy = (XmlRpcBatchMgrProxy) this.specToProxyMap
.remove(spec.getJob().getId());
- if (proxy != null) {
- }
+
}
try {
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/resource/src/main/java/org/apache/oodt/cas/resource/noderepo/XmlNodeRepository.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/noderepo/XmlNodeRepository.java b/resource/src/main/java/org/apache/oodt/cas/resource/noderepo/XmlNodeRepository.java
index fd31062..e0ad30f 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/noderepo/XmlNodeRepository.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/noderepo/XmlNodeRepository.java
@@ -18,11 +18,13 @@
package org.apache.oodt.cas.resource.noderepo;
//OODT imports
-import org.apache.oodt.commons.xml.XMLUtils;
import org.apache.oodt.cas.resource.structs.ResourceNode;
import org.apache.oodt.cas.resource.util.XmlStructFactory;
+import org.apache.oodt.commons.xml.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
-//JDK imports
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
@@ -34,10 +36,8 @@ import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
+//JDK imports
//DOM imports
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
/**
*
@@ -76,9 +76,6 @@ public class XmlNodeRepository implements NodeRepository {
String nodesDirStr = nodesDir.getAbsolutePath();
- if (!nodesDirStr.endsWith("/")) {
- }
-
// get all the workflow xml files
File[] nodesFiles = nodesDir.listFiles(nodesXmlFilter);
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
----------------------------------------------------------------------
diff --git a/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java b/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
index 0988f4a..b8671cc 100644
--- a/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
+++ b/resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/XmlQueueRepository.java
@@ -18,11 +18,13 @@
package org.apache.oodt.cas.resource.queuerepo;
//OODT imports
-import org.apache.oodt.commons.xml.XMLUtils;
import org.apache.oodt.cas.resource.scheduler.QueueManager;
import org.apache.oodt.cas.resource.util.XmlStructFactory;
+import org.apache.oodt.commons.xml.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
-//JDK imports
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
@@ -34,10 +36,8 @@ import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
+//JDK imports
//DOM imports
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
/**
*
@@ -78,19 +78,13 @@ public class XmlQueueRepository implements QueueRepository {
File nodesDir = new File(new URI(dirUri));
if (nodesDir.isDirectory()) {
- String nodesDirStr = nodesDir.getAbsolutePath();
-
- if (!nodesDirStr.endsWith("/")) {
- }
// get all the workflow xml files
File[] nodesFiles = nodesDir.listFiles(queuesXmlFilter);
for (File nodesFile : nodesFiles) {
- String nodesXmlFile = nodesFile
- .getAbsolutePath();
- Document nodesRoot = null;
+ Document nodesRoot;
try {
nodesRoot = XMLUtils
.getDocumentRoot(new FileInputStream(
@@ -109,7 +103,7 @@ public class XmlQueueRepository implements QueueRepository {
String nodeId = ((Element) nodeList.item(k))
.getAttribute("id");
Vector assignments = (Vector) XmlStructFactory
- .getQueueAssignment((Element) nodeList
+ .getQueueAssignment(onodeList
.item(k));
for (Object assignment : assignments) {
try {
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
index 3c4b086..64031d2 100755
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/engine/processor/WorkflowProcessor.java
@@ -235,7 +235,7 @@ public abstract class WorkflowProcessor implements WorkflowProcessorListener,
}
}
- } else if (this.isDone().getName().equals("ResultsFailure")) {
+ } else if (this.iusDone().getName().equals("ResultsFailure")) {
// do nothing -- this workflow failed!!!
} else if (this.isDone().getName().equals("ResultsBail")) {
for (WorkflowProcessor subProcessor : this.getRunnableSubProcessors())
http://git-wip-us.apache.org/repos/asf/oodt/blob/733436e8/workflow/src/main/java/org/apache/oodt/cas/workflow/repository/XMLWorkflowRepository.java
----------------------------------------------------------------------
diff --git a/workflow/src/main/java/org/apache/oodt/cas/workflow/repository/XMLWorkflowRepository.java b/workflow/src/main/java/org/apache/oodt/cas/workflow/repository/XMLWorkflowRepository.java
index 361dcaf..f0eb8ee 100644
--- a/workflow/src/main/java/org/apache/oodt/cas/workflow/repository/XMLWorkflowRepository.java
+++ b/workflow/src/main/java/org/apache/oodt/cas/workflow/repository/XMLWorkflowRepository.java
@@ -531,10 +531,7 @@ public class XMLWorkflowRepository implements WorkflowRepository {
try {
File workflowDir = new File(new URI(dirUri));
if (workflowDir.isDirectory()) {
- String workflowDirStr = workflowDir.getAbsolutePath();
- if (!workflowDirStr.endsWith("/")) {
- }
// get all the workflow xml files
File[] workflowFiles = workflowDir