
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 1.22 KB | hits: 18 | expires: Never
Classes generated by QueryDSL/APT and static imports
import com.mysema.query.jpa.impl.JPAQuery;
public class UserStore {
public void something() {
new JPAQuery(null).from(QUser.user).list(QUser.user.login);
}
}
import static something.QUser.user;
import com.mysema.query.jpa.impl.JPAQuery;
public class UserStore {
public void something() {
new JPAQuery(null).from(user).list(user.login);
}
}
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.466s
[INFO] Finished at: Wed May 30 16:05:40 CEST 2012
[INFO] Final Memory: 18M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project apt-bug: Compilation failure: Compilation failure:
...
/home/xxx/apt-bug/src/main/java/something/UserStore.java:3: cannot find symbol
symbol : class QUser
location: package something
import static something.QUser.user;
^
/home/xxx/apt-bug/src/main/java/something/UserStore.java:3: static import only from classes and interfaces
import static something.QUser.user;
^