clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enrid...@apache.org
Subject git commit: CLEREZZA-904 Removed invalid casts after code refactoring
Date Sun, 06 Apr 2014 09:45:14 GMT
Repository: clerezza
Updated Branches:
  refs/heads/master 7d9e7dc3d -> 2b170c383


CLEREZZA-904 Removed invalid casts after code refactoring


Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/2b170c38
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/2b170c38
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/2b170c38

Branch: refs/heads/master
Commit: 2b170c383946cef3f58d9a501be12f471fa96068
Parents: 7d9e7dc
Author: enridaga <enridaga@apache.org>
Authored: Sun Apr 6 10:45:08 2014 +0100
Committer: enridaga <enridaga@apache.org>
Committed: Sun Apr 6 10:45:08 2014 +0100

----------------------------------------------------------------------
 .../virtuoso/storage/access/VirtuosoWeightedProvider.java   | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/2b170c38/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/VirtuosoWeightedProvider.java
----------------------------------------------------------------------
diff --git a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/VirtuosoWeightedProvider.java
b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/VirtuosoWeightedProvider.java
index 238577c..b8f7963 100644
--- a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/VirtuosoWeightedProvider.java
+++ b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/VirtuosoWeightedProvider.java
@@ -64,7 +64,6 @@ import org.slf4j.LoggerFactory;
 
 import virtuoso.jdbc4.VirtuosoConnectionPoolDataSource;
 import virtuoso.jdbc4.VirtuosoException;
-import virtuoso.jdbc4.VirtuosoStatement;
 
 /**
  * A {@link org.apache.clerezza.rdf.core.access.WeightedTcProvider} for
@@ -236,7 +235,7 @@ public class VirtuosoWeightedProvider implements WeightedTcProvider {
 				 */
 				// We take the configuration of the SCR component
 				Object phost = cCtx.getProperties().get(HOST);
-				Object pport = cCtx.getProperties().get(PORT);
+				Object pport = Integer.valueOf((String)cCtx.getProperties().get(PORT));
 				Object puser = cCtx.getProperties().get(USER);
 				Object ppwd = cCtx.getProperties().get(PASSWORD);
 
@@ -248,7 +247,7 @@ public class VirtuosoWeightedProvider implements WeightedTcProvider {
 					phost = "localhost"; 
 				}
 				if(pport == null && System.getProperty("virtuoso.port") != null){
-					pport = System.getProperty("virtuoso.port");
+					pport = Integer.valueOf(System.getProperty("virtuoso.port"));
 				} else if(pport == null){
 					pport = Integer.valueOf(1111); 
 				}
@@ -323,12 +322,12 @@ public class VirtuosoWeightedProvider implements WeightedTcProvider
{
 				+ "> WHERE { ?G a <urn:x-virtuoso/active-graph> }";
 		Connection connection = null;
 		Exception e = null;
-		VirtuosoStatement st = null;
+		Statement st = null;
 		ResultSet rs = null;
 		Set<UriRef> remembered = new HashSet<UriRef>();
 		try {
 			connection = getConnection();
-			st = (VirtuosoStatement) connection.createStatement();
+			st = connection.createStatement();
 			logger.debug("Executing SQL: {}", SQL);
 			rs = (ResultSet) st.executeQuery(SQL);
 			while (rs.next()) {


Mime
View raw message