Triplea: 'onMethod' is not supported for @Getter on a type.

Created on 13 Mar 2019  路  5Comments  路  Source: triplea-game/triplea

Seeing errors in Eclipse around some of the recently added Lombok annotations on JdbcDatabaseDao.java and Node.java. Is there a dependency that needs updated that wasn't committed or something?

All 5 comments

Interesting :thinking:

@ron-murhammer, would you mind:

  • check and report here the lombok plugin version you are using
  • copy/paste or screenshot the error message, the exact text could be helpful
  • see if the workaround of moving the annotation to field level works, eg:
class JdbcDatabaseDao implements DatabaseDao {

  @Getter(onMethod_ = {@Override})
  private final BadWordDao badWordDao;
  @Getter(onMethod_ = {@Override})
  private final BannedUsernameDao bannedUsernameDao;
  @Getter(onMethod_ = {@Override})
  private final BannedMacDao bannedMacDao;
  @Getter(onMethod_ = {@Override})
  private final MutedMacDao mutedMacDao;
  @Getter(onMethod_ = {@Override})
  private final UserDao userDao;

I suspect that workaround would do the trick, we have examples of this annotation at field level (the placement at class level is I believe new here).

It would be good to not rely on workaround, @RoiEXLab , would you mind checking your eclipse lombok plugin version and reporting it here so we can compare that as well?

As one datapoint of hopefully three, the build.gradle file has: version = '1.18.4'

@DanVanAtta I no longer have eclipse installed on my machine unfortunately.
(BTW we could apply for a free IntelliJ Ultimate license for open source projects in case someone wants one (Conditions))

But in any case I'm assuming the same thing: The version is probably outdated and a simple update will fix the problem.

@DanVanAtta I don't appear to have any lombok plugin version installed in eclipse unless I'm missing something. Only thing is what we have in the gradle build. That is the exact and complete error message. And yes moving to field level annotations works fine just not the class level.

@ron-murhammer For eclipse there isn't any plugin in the marketplace.
Instead you have to install it via the installer as described here: https://projectlombok.org/setup/eclipse

@RoiEXLab Ah good call. Forgot it wasn't in the marketplace. Updating it manually seems to resolved the errors. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZjelcoP picture ZjelcoP  路  5Comments

Khobai picture Khobai  路  9Comments

DanVanAtta picture DanVanAtta  路  4Comments

ron-murhammer picture ron-murhammer  路  6Comments

panther2 picture panther2  路  6Comments