merged from trunk
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/branches/information-system/discovery-client/1.0@74182 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ec5cd1ea03
commit
a40f2c72d0
|
@ -1,5 +1,10 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="${build.finalName}" date="2013-01-11">
|
||||
<Changeset component="discovery-client-1.0.0" date="2013-01-11">
|
||||
<Change>First Release</Change>
|
||||
</Changeset>
|
||||
<Changeset component="discovery-client-1.0.1" date="2013-04-29">
|
||||
<Change>Fixed bug in QueryBox to prevented correct working of hashcode() and equals() in subclasses.
|
||||
As a result, different queries appeared the same with consequences downstream where queries where used for caching.
|
||||
</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
|
||||
<groupId>org.gcube.resources.discovery</groupId>
|
||||
<artifactId>discovery-client</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<name>Discovery Client</name>
|
||||
<description>Base API for resource discovery clients</description>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class QueryBox implements Query {
|
|||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((expression == null) ? 0 : expression.hashCode());
|
||||
result = prime * result + ((expression() == null) ? 0 : expression().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ public class QueryBox implements Query {
|
|||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
QueryBox other = (QueryBox) obj;
|
||||
if (expression == null) {
|
||||
if (other.expression != null)
|
||||
if (expression() == null) {
|
||||
if (other.expression() != null)
|
||||
return false;
|
||||
} else if (!expression.equals(other.expression))
|
||||
} else if (!expression().equals(other.expression()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -181,4 +181,6 @@ public class QueryTemplate extends QueryBox implements Query {
|
|||
throw new RuntimeException("cannot replace parameters " + parameters + " in query " + expression,e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue