querydsl/querydsl — pull request #982 by Vedenin (2014-10-03 12:47:14+00:00)
Title: The bug in com.mysema.query.DefaultQueryMetadata.equals() method

If you run this code (in version from 3.0 to 3.5):

DefaultQueryMetadata meta = new DefaultQueryMetadata();
meta.addJoin(JoinType.DEFAULT, new ConstantImpl("1"));
System.out.println("Test = " + meta.equals(meta.clone()));
You must see "Test = false", because in DefaultQueryMetadata.equals() using code:
"... && q.getJoins().equals(joins)", but since version 3.0 method getJoins() returns joinTarget if joins.size()==0 (getJoins() { addLastJoin(); return joins; }, and q.getJoins().equals(joins) == false for some object (if joins.size()==0). I think, it's quite serious bug. However, it can be fixed, only if using q.getJoins().equals(getJoins()) instead of q.getJoins().equals(joins).