Maven compiles different then Eclipse for staticConstructor #136

Closed
lombokissues opened this Issue Jul 14, 2015 · 4 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 63)

@lombokissues
Collaborator

๐Ÿ‘ค nick.stolwijk ย  ๐Ÿ•— Oct 26, 2009 at 15:39 UTC

What steps will reproduce the problem?

  1. Create a simple project with Maven and add Lombock as dependency and
    configure the compiler plugin to use Javac v1.6
  2. Create a simple class with @ Data(staticConstructor="of")
  3. Run mvn clean install
  4. Check the compiled class with javap:

public class com.example.lombok.model.Car extends java.lang.Object{
public java.lang.String getLicense();
public java.lang.String toString();
public int hashCode();
public boolean equals(java.lang.Object);
static com.example.lombok.model.Car of(java.lang.String);
}

  1. Load your project into Eclipse(Lombok was added)
  2. Let Eclipse compile your class
  3. Check the compiled class with javap:

public class com.example.lombok.model.Car extends java.lang.Object{
public java.lang.String getLicense();
public java.lang.String toString();
public int hashCode();
public boolean equals(java.lang.Object);
public static com.example.lombok.model.Car of(java.lang.String);
}

What is the expected output? What do you see instead?
Expected: a public static function
Actual: a package protected static function

What version of the product are you using? On what operating system?
Lombok 0.8.5
Eclipse 3.5
Kubuntu 9.04
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

Please provide any additional information below.

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Nov 01, 2009 at 23:45 UTC

Hey, whoops. Yeah, that's a bug. It's been fixed in v0.9.0. which is about to be released.

Fixed in 4eea52f

@lombokissues
Collaborator

๐Ÿ‘ค reinierz ย  ๐Ÿ•— Nov 02, 2009 at 00:12 UTC

v0.9.0 has been rolled out! Go ahead and tell maven to update your dependencies to v0.9.0.

@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment