-
Notifications
You must be signed in to change notification settings - Fork 147
Remove Lombok from several Parameters classes #919
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,15 +3,8 @@ | |
|
||
package com.microsoft.aad.msal4j; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.Set; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
/// The authentication parameters provided to the app token provider callback. | ||
public class AppTokenProviderParameters { | ||
|
||
|
@@ -23,4 +16,43 @@ public class AppTokenProviderParameters { | |
public String claims; | ||
/// tenant id | ||
public String tenantId; | ||
|
||
public AppTokenProviderParameters(Set<String> scopes, String correlationId, String claims, String tenantId) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Avery-Dunn - is there value in reviewing these changes ? I.e. did you de-lombok all of this, in which case it's generaetd code and we can take it at face value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this first PR, yes:
Going forward I don't think so. The next PR will affect a lot more classes, but as long as there are no API changes (as confirmed via RevAPI) and tests pass then it shouldn't require any sort of deep review. |
||
this.scopes = scopes; | ||
this.correlationId = correlationId; | ||
this.claims = claims; | ||
this.tenantId = tenantId; | ||
} | ||
|
||
public Set<String> getScopes() { | ||
return this.scopes; | ||
} | ||
|
||
public String getCorrelationId() { | ||
return this.correlationId; | ||
} | ||
|
||
public String getClaims() { | ||
return this.claims; | ||
} | ||
|
||
public String getTenantId() { | ||
return this.tenantId; | ||
} | ||
|
||
public void setScopes(Set<String> scopes) { | ||
this.scopes = scopes; | ||
} | ||
|
||
public void setCorrelationId(String correlationId) { | ||
this.correlationId = correlationId; | ||
} | ||
|
||
public void setClaims(String claims) { | ||
this.claims = claims; | ||
} | ||
|
||
public void setTenantId(String tenantId) { | ||
this.tenantId = tenantId; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the argument for removing lombok? I thought Lombok generates this code at compile time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple things motivated the ask: 1) Lombok needs plugins in IDEs to make the experience reasonable and 2) the debugging experience can be pretty frustrating.
@JonathanGiles any additional thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lombok is also not an official Java annotation processor, in the sense that is does not uses public APIs exposed by the Java compiler. This is risky and may be broken at any time. It feels bad to build such critical library code on such a weak foundation, especially when the code being generated by Lombok can easily be written by us (or our IDE) once, without these concerns in perpetuity.