Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 1.22 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Classes generated by QueryDSL/APT and static imports
  2. import com.mysema.query.jpa.impl.JPAQuery;
  3.  
  4. public class UserStore {
  5.  
  6.     public void something() {
  7.         new JPAQuery(null).from(QUser.user).list(QUser.user.login);
  8.     }
  9.  
  10. }
  11.        
  12. import static something.QUser.user;
  13. import com.mysema.query.jpa.impl.JPAQuery;
  14.  
  15. public class UserStore {
  16.  
  17.     public void something() {
  18.         new JPAQuery(null).from(user).list(user.login);
  19.     }
  20.  
  21. }
  22.        
  23. [INFO] BUILD FAILURE
  24. [INFO] ------------------------------------------------------------------------
  25. [INFO] Total time: 3.466s
  26. [INFO] Finished at: Wed May 30 16:05:40 CEST 2012
  27. [INFO] Final Memory: 18M/150M
  28. [INFO] ------------------------------------------------------------------------
  29. [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:
  30. ...
  31.        
  32. /home/xxx/apt-bug/src/main/java/something/UserStore.java:3: cannot find symbol
  33. symbol  : class QUser
  34. location: package something
  35. import static something.QUser.user;
  36.                        ^
  37. /home/xxx/apt-bug/src/main/java/something/UserStore.java:3: static import only from classes and interfaces
  38. import static something.QUser.user;
  39. ^