You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "Sergio Fernández (JIRA)" <ji...@apache.org> on 2017/12/08 04:19:00 UTC
[jira] [Resolved] (MARMOTTA-671) Redundant conditions in an if
statement
[ https://issues.apache.org/jira/browse/MARMOTTA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergio Fernández resolved MARMOTTA-671.
---------------------------------------
Resolution: Fixed
Fixed on [commit 0957855|https://github.com/apache/marmotta/commit/095785507278bc29eeb18f40aba6888f67fd6182].
> Redundant conditions in an if statement
> ---------------------------------------
>
> Key: MARMOTTA-671
> URL: https://issues.apache.org/jira/browse/MARMOTTA-671
> Project: Marmotta
> Issue Type: Bug
> Components: Client Library
> Affects Versions: 3.3.0
> Reporter: songwanging
> Assignee: Sergio Fernández
> Priority: Minor
> Fix For: 3.4.0
>
>
> Our tool DeepTect has detected the following two pieces of buggy code snippet, in which the if branch has exactly the same conditions.
> Path1: marmotta/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java
> {code:java}
> if (StringUtils.isNotBlank(config.getMarmottaUser()) && StringUtils.isNotBlank(config.getMarmottaUser())) {
> ...
> }
> {code}
> Path2: marmotta/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java
> {code:java}
> if(subject instanceof org.openrdf.model.URI && subject instanceof org.openrdf.model.URI) {
> ..
> }
> {code}
> In the above code snippets, the if statement contains the same conditions
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)