peichhorn/lombok-pg — Issue #51: @ExtensionMethod + static import bug
Author: nicholas22
Created: 2011-11-16 14:43:34+00:00
State: open

The newest release introduces an NPE bug when using @ExtensionMethod and an unresolved/missing method, when said method is part of the class whose methods are used as extension methods:

Description	Resource	Path	Location	Type
Internal compiler error: java.lang.NullPointerException at lombok.eclipse.agent.PatchExtensionMethod.resolveType(PatchExtensionMethod.java:157)	CustomOutputAdapter.java	/DataServices/src/dataservices/persistence/entities/outputAdapters	line 0	Java Problem

So in more detail the problem is as follows:

ReflectionUtils.getMethods(OutputAdapter.class, true).where(contains(SAVE_DATA_METHOD)).single();

In the above snippet, the contains() method is missing (not imported yet) and the class which contains the above uses @ExtensionMethod on my StringUtils class (which has a contains() method), so this somehow triggers the NPE.