moremore0812 / cqengine

Automatically exported from code.google.com/p/cqengine
0 stars 0 forks source link

SelfAttribute broken in CQEngine 1.2.0 #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A regressions was introduced when reflection support was being refactored, 
which now prevents SelfAttributes from being declared.

SelfAttribute<String> attribute = new SelfAttribute<String>();

Produces:

java.lang.IllegalStateException: Attribute '<Unnamed attribute, class 
com.googlecode.cqengine.attribute.SelfAttribute>' is declared with invalid type 
parameters (class com.googlecode.cqengine.attribute.SelfAttribute)

In the meantime a workaround is to declare as a SimpleAttribute instead:

    static final Attribute<String, String> SELF = new SimpleAttribute<String, String>() {
        public String getValue(String object) { return object; }
    };

Original issue reported on code.google.com by ni...@npgall.com on 10 Sep 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Fixed in trunk. This will be included in the next release.

In the meantime, the workaround above can be used with the official 1.2.0 
release, or svn checkout the source and mvn install CQEngine 1.2.1-SNAPSHOT 
locally.

I will leave this ticket open until included in the next release.

Original comment by ni...@npgall.com on 10 Sep 2013 at 12:59

GoogleCodeExporter commented 9 years ago
Released in CQEngine 1.2.1.

Original comment by ni...@npgall.com on 10 Sep 2013 at 9:22