Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven compiles different then Eclipse for staticConstructor #136

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

Maven compiles different then Eclipse for staticConstructor #136

lombokissues opened this issue Jul 14, 2015 · 4 comments
Labels

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 63)

@lombokissues
Copy link
Author

👤 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
Copy link
Author

👤 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
Copy link
Author

👤 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
Copy link
Author

End of migration

lianhaijun pushed a commit to lianhaijun/lombok that referenced this issue May 8, 2020
projectlombok#88: Delegating to class with generics using @DeleGate annotation
projectlombok#136: "Cannot infer arguments" with @requiredargsconstructor
projectlombok#157: Intellij fails to infer type for constructor defined with @requiredargsconstructor
projectlombok#176: Unchecked warning when using static constructor for @DaTa and @value on parameterized class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant