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

At least one of lombok's features does not qualify its field access. #121

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

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 48)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Sep 15, 2009 at 07:22 UTC

Presumably something @ Data does.

http://groups.google.com/group/project-lombok/browse_thread/thread/f35a751139c8e90d

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Sep 15, 2009 at 07:22 UTC

Presumably something @ Data does.

http://groups.google.com/group/project-lombok/browse_thread/thread/f35a751139c8e90d

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Sep 15, 2009 at 09:58 UTC

Actually, fixing issue #120 would
take care of this.

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Sep 15, 2009 at 09:58 UTC

Actually, fixing issue #120 would
take care of this.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Sep 15, 2009 at 11:54 UTC

It would, but, there's a bug here which is why its a separate issue: ALL field access should be qualified (with
this.), to avoid namespace clashes with e.g. a statically imported field. Sure, that would be rare, but nevertheless,
all generated field accesses should always be of the 'this.foo' form.

Status is 'new' because I'm pretty sure we DO qualify all accesses. First need to find out where we're forgetting it.

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Sep 15, 2009 at 11:54 UTC

It would, but, there's a bug here which is why its a separate issue: ALL field access should be qualified (with
this.), to avoid namespace clashes with e.g. a statically imported field. Sure, that would be rare, but nevertheless,
all generated field accesses should always be of the 'this.foo' form.

Status is 'new' because I'm pretty sure we DO qualify all accesses. First need to find out where we're forgetting it.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 fabiankuerten@web.de   🕗 Sep 15, 2009 at 21:54 UTC

package lombokTest;
//Using lombok 0.8.5
import lombok.ToString;
/**

  • A simple bean.
  • @ author Fabian Kürten
    /
    @ ToString // <-- Warning happens in this line;
    // Unqualified access to the field SimpleBean.data
    public class SimpleBean
    {
    /
    *
    • Just a field
      */
      private String data;
      }
Collaborator

lombokissues commented Jul 14, 2015

👤 fabiankuerten@web.de   🕗 Sep 15, 2009 at 21:54 UTC

package lombokTest;
//Using lombok 0.8.5
import lombok.ToString;
/**

  • A simple bean.
  • @ author Fabian Kürten
    /
    @ ToString // <-- Warning happens in this line;
    // Unqualified access to the field SimpleBean.data
    public class SimpleBean
    {
    /
    *
    • Just a field
      */
      private String data;
      }
@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Sep 23, 2009 at 05:46 UTC

Fixed in 35691e8 - should be live in the next major lombok release (I'm
guessing it'll be called v0.9 the way things are looking right now).

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Sep 23, 2009 at 05:46 UTC

Fixed in 35691e8 - should be live in the next major lombok release (I'm
guessing it'll be called v0.9 the way things are looking right now).

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

I am afraid I still experience this bug, though now on a different annotation.
In my eclipse dir:
$ java -jar lombok.jar --version
0.9.2

In projects classpath:
/home/fabian/.m2/repository/org/projectlombok/lombok/0.9.2/lombok-0.9.2.jar

The source:
package lombokTest;
// Using lombok 0.9.2
import lombok.EqualsAndHashCode;
/**

  • A simple bean.
  • @ author Fabian Kürten
    /
    @ EqualsAndHashCode // <-- Warning happens in this line;
    // Unqualified access to the field SimpleBean.data
    public class SimpleBean
    {
    /
    *
    • Just a field
      */
      private String data;
      }

This also happens on others.
Know I wonder: Did you miss this one while fixing the other or do I fail at upgrading?

Attached you will find three files (test cases, though not automated) of which only
the second succeeds.

Collaborator

lombokissues commented Jul 14, 2015

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

I am afraid I still experience this bug, though now on a different annotation.
In my eclipse dir:
$ java -jar lombok.jar --version
0.9.2

In projects classpath:
/home/fabian/.m2/repository/org/projectlombok/lombok/0.9.2/lombok-0.9.2.jar

The source:
package lombokTest;
// Using lombok 0.9.2
import lombok.EqualsAndHashCode;
/**

  • A simple bean.
  • @ author Fabian Kürten
    /
    @ EqualsAndHashCode // <-- Warning happens in this line;
    // Unqualified access to the field SimpleBean.data
    public class SimpleBean
    {
    /
    *
    • Just a field
      */
      private String data;
      }

This also happens on others.
Know I wonder: Did you miss this one while fixing the other or do I fail at upgrading?

Attached you will find three files (test cases, though not automated) of which only
the second succeeds.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean.java View file

Collaborator

lombokissues commented Jul 14, 2015

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean.java View file

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean2.java View file

Collaborator

lombokissues commented Jul 14, 2015

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean2.java View file

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean3.java View file

Collaborator

lombokissues commented Jul 14, 2015

👤 fabiankuerten@web.de   🕗 Mar 14, 2010 at 21:58 UTC

🔗 SimpleBean3.java View file

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Mar 15, 2010 at 22:56 UTC

We probably forgot to catch it. We don't have the 'unqualified access' warning on, and a conflict is rare. We'll get
around this fixing this.

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Mar 15, 2010 at 22:56 UTC

We probably forgot to catch it. We don't have the 'unqualified access' warning on, and a conflict is rare. We'll get
around this fixing this.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 reinierz   🕗 Jul 17, 2010 at 22:36 UTC

We double checked everything - as far as I can tell they're all qualified now. Notably including @ Synchronized, where this technically could even lead to faulty generated code if you have a parameter named $lock.

See commit 8869e97

Collaborator

lombokissues commented Jul 14, 2015

👤 reinierz   🕗 Jul 17, 2010 at 22:36 UTC

We double checked everything - as far as I can tell they're all qualified now. Notably including @ Synchronized, where this technically could even lead to faulty generated code if you have a parameter named $lock.

See commit 8869e97

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

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