marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject marmotta git commit: MARMOTTA_671: fixed redundant conditions
Date Fri, 08 Dec 2017 03:59:34 GMT
Repository: marmotta
Updated Branches:
  refs/heads/develop fadd9424b -> 095785507


MARMOTTA_671: fixed redundant conditions


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

Branch: refs/heads/develop
Commit: 095785507278bc29eeb18f40aba6888f67fd6182
Parents: fadd942
Author: Sergio Fernández <wikier@apache.org>
Authored: Thu Dec 7 19:59:26 2017 -0800
Committer: Sergio Fernández <wikier@apache.org>
Committed: Thu Dec 7 19:59:26 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/marmotta/client/util/HTTPUtil.java  | 2 +-
 .../marmotta/ldpath/backend/linkeddata/LDCacheBackend.java   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/09578550/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
----------------------------------------------------------------------
diff --git a/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
b/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
index d1aad13..e43bfbf 100644
--- a/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
+++ b/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
@@ -95,7 +95,7 @@ public class HTTPUtil {
 
         final HttpPost post = new HttpPost(uriBuilder.build());
 
-        if (StringUtils.isNotBlank(config.getMarmottaUser()) && StringUtils.isNotBlank(config.getMarmottaUser()))
{
+        if (StringUtils.isNotBlank(config.getMarmottaUser())) {
             final String credentials = String.format("%s:%s", config.getMarmottaUser(), config.getMarmottaPassword());
             try {
                 final String encoded = DatatypeConverter.printBase64Binary(credentials.getBytes("UTF-8"));

http://git-wip-us.apache.org/repos/asf/marmotta/blob/09578550/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
index fd0b554..4c25753 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
+++ b/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
@@ -45,12 +45,11 @@ import java.util.concurrent.ThreadPoolExecutor;
  * Author: Sebastian Schaffert
  */
 public class LDCacheBackend implements RDFBackend<Value> {
-    private static final Logger log = LoggerFactory.getLogger(LDCacheBackend.class);
 
+    private static final Logger log = LoggerFactory.getLogger(LDCacheBackend.class);
 
     private LDCache ldcache;
 
-
     public LDCacheBackend() {
         LDCachingBackend backend = new LDCachingInfinispanBackend();
         backend.initialize();
@@ -130,7 +129,7 @@ public class LDCacheBackend implements RDFBackend<Value> {
                 try {
                     return new URI(((Literal)n).getDatatype().stringValue());
                 } catch (URISyntaxException e) {
-                    log.error("literal datatype was not a valid URI: {}",((Literal) n).getDatatype());
+                    log.error("literal datatype was not a valid URI: {}", ((Literal) n).getDatatype());
                     return null;
                 }
             } else {
@@ -317,7 +316,7 @@ public class LDCacheBackend implements RDFBackend<Value> {
     @Override
     public Collection<Value> listObjects(Value subject, Value property) {
         log.info("retrieving resource {}", subject);
-        if(subject instanceof org.openrdf.model.URI && subject instanceof org.openrdf.model.URI)
{
+        if (subject instanceof org.openrdf.model.URI) {
             org.openrdf.model.URI s = (org.openrdf.model.URI) subject;
             org.openrdf.model.URI p = (org.openrdf.model.URI) property;
             return ldcache.get(s).filter(s, p, null).objects();
@@ -339,4 +338,5 @@ public class LDCacheBackend implements RDFBackend<Value> {
     public Collection<Value> listSubjects(Value property, Value object) {
         throw new UnsupportedOperationException("reverse traversal not supported for Linked
Data backend");
     }
+    
 }


Mime
View raw message