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

Remove Lombok usage #773

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lombok.config

This file was deleted.

27 changes: 0 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -47,8 +47,6 @@
<gpg.bestPractices>true</gpg.bestPractices>
<version.jackson>2.18.3</version.jackson>
<version.logback>1.5.17</version.logback>
<version.lombok>1.18.36</version.lombok>
<version.lombok.plugin>1.18.20.0</version.lombok.plugin>
<version.restfuse>1.2.0</version.restfuse>
<version.slf4j>2.0.16</version.slf4j>
<version.antlr4>4.13.2</version.antlr4>
@@ -220,11 +218,6 @@
<artifactId>weld-se-core</artifactId>
<version>5.1.5.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${version.lombok}</version>
</dependency>

<dependency>
<groupId>jakarta.platform</groupId>
@@ -577,13 +570,6 @@
<!-- parent pom currently defines v1.7 -->
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${version.lombok}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
@@ -649,19 +635,6 @@
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>${version.lombok.plugin}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
6 changes: 0 additions & 6 deletions scim-client/pom.xml
Original file line number Diff line number Diff line change
@@ -61,12 +61,6 @@
<groupId>com.fasterxml.jackson.jakarta.rs</groupId>
<artifactId>jackson-jakarta-rs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
6 changes: 0 additions & 6 deletions scim-core/pom.xml
Original file line number Diff line number Diff line change
@@ -51,12 +51,6 @@
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.directory.scimple</groupId>
<artifactId>scim-test</artifactId>
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@

package org.apache.directory.scim.core.repository;

import lombok.Data;
import org.apache.directory.scim.spec.exception.ScimResourceInvalidException;
import org.apache.directory.scim.spec.resources.ScimExtension;
import org.apache.directory.scim.spec.resources.ScimResource;
@@ -31,7 +30,6 @@
import java.util.List;
import java.util.Map;

@Data
public class RepositoryRegistry {
/** A logger for this class */
private static final Logger log = LoggerFactory.getLogger(RepositoryRegistry.class);
@@ -72,4 +70,56 @@ public synchronized <T extends ScimResource> void registerRepository(Class<T> cl
public <T extends ScimResource> Repository<T> getRepository(Class<T> clazz) {
return (Repository<T>) repositoryMap.get(clazz);
}

public SchemaRegistry getSchemaRegistry() {
return this.schemaRegistry;
}

public RepositoryRegistry setSchemaRegistry(SchemaRegistry schemaRegistry) {
this.schemaRegistry = schemaRegistry;
return this;
}

public Map<Class<? extends ScimResource>, Repository<? extends ScimResource>> getRepositoryMap() {
return this.repositoryMap;
}

public RepositoryRegistry setRepositoryMap(Map<Class<? extends ScimResource>, Repository<? extends ScimResource>> repositoryMap) {
this.repositoryMap = repositoryMap;
return this;
}

public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof RepositoryRegistry)) return false;
final RepositoryRegistry other = (RepositoryRegistry) o;
if (!other.canEqual((Object) this)) return false;
final Object this$schemaRegistry = this.getSchemaRegistry();
final Object other$schemaRegistry = other.getSchemaRegistry();
if (this$schemaRegistry == null ? other$schemaRegistry != null : !this$schemaRegistry.equals(other$schemaRegistry))
return false;
final Object this$repositoryMap = this.getRepositoryMap();
final Object other$repositoryMap = other.getRepositoryMap();
if (this$repositoryMap == null ? other$repositoryMap != null : !this$repositoryMap.equals(other$repositoryMap))
return false;
return true;
}

protected boolean canEqual(final Object other) {
return other instanceof RepositoryRegistry;
}

public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $schemaRegistry = this.getSchemaRegistry();
result = result * PRIME + ($schemaRegistry == null ? 43 : $schemaRegistry.hashCode());
final Object $repositoryMap = this.getRepositoryMap();
result = result * PRIME + ($repositoryMap == null ? 43 : $repositoryMap.hashCode());
return result;
}

public String toString() {
return "RepositoryRegistry(schemaRegistry=" + this.getSchemaRegistry() + ", repositoryMap=" + this.getRepositoryMap() + ")";
}
}
Original file line number Diff line number Diff line change
@@ -19,13 +19,8 @@

package org.apache.directory.scim.core.repository.extensions;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=true)
public class ClientFilterException extends Exception {

private static final long serialVersionUID = 3308947684934769952L;

private final int status;
@@ -35,4 +30,32 @@ public ClientFilterException(int statusCode, String message) {
this.status = statusCode;
}

public int getStatus() {
return this.status;
}

public String toString() {
return "ClientFilterException(status=" + this.getStatus() + ", " + getMessage() + ")";
}

public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof ClientFilterException)) return false;
final ClientFilterException other = (ClientFilterException) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
if (this.getStatus() != other.getStatus()) return false;
return true;
}

protected boolean canEqual(final Object other) {
return other instanceof ClientFilterException;
}

public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
result = result * PRIME + this.getStatus();
return result;
}
}
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@

package org.apache.directory.scim.core.repository;

import lombok.SneakyThrows;
import org.apache.directory.scim.core.schema.SchemaRegistry;
import org.apache.directory.scim.spec.extension.EnterpriseExtension;
import org.apache.directory.scim.spec.filter.FilterParseException;
@@ -676,12 +675,15 @@ public void replaceCollectionWithMultipleOps() throws FilterParseException {
));
}

@SneakyThrows
private PatchOperation patchOperation(Type operationType, String path, Object value) {
PatchOperation op = new PatchOperation();
op.setOperation(operationType);
if (path != null) {
op.setPath(PatchOperationPath.fromString(path));
try {
op.setPath(PatchOperationPath.fromString(path));
} catch (FilterParseException e) {
throw new RuntimeException("Failed to parse Operation path in test", e);
}
}
if (value != null) {
op.setValue(value);
6 changes: 0 additions & 6 deletions scim-server-examples/scim-server-jersey/pom.xml
Original file line number Diff line number Diff line change
@@ -92,12 +92,6 @@
<artifactId>logback-classic</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.directory.scimple</groupId>
<artifactId>scim-compliance-tests</artifactId>
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;

import lombok.Data;
import org.apache.directory.scim.spec.annotation.ScimAttribute;
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
*/
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
@XmlAccessorType(XmlAccessType.NONE)
@Data
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
public class LuckyNumberExtension implements ScimExtension {

@@ -59,4 +56,38 @@ public String getUrn() {
return SCHEMA_URN;
}


public long getLuckyNumber() {
return this.luckyNumber;
}

public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
this.luckyNumber = luckyNumber;
return this;
}

public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof LuckyNumberExtension)) return false;
final LuckyNumberExtension other = (LuckyNumberExtension) o;
if (!other.canEqual((Object) this)) return false;
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
return true;
}

protected boolean canEqual(final Object other) {
return other instanceof LuckyNumberExtension;
}

public int hashCode() {
final int PRIME = 59;
int result = 1;
final long $luckyNumber = this.getLuckyNumber();
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
return result;
}

public String toString() {
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
}
}
5 changes: 0 additions & 5 deletions scim-server-examples/scim-server-memory/pom.xml
Original file line number Diff line number Diff line change
@@ -49,11 +49,6 @@
<groupId>org.apache.directory.scimple</groupId>
<artifactId>scim-server</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;

import lombok.Data;
import org.apache.directory.scim.spec.annotation.ScimAttribute;
import org.apache.directory.scim.spec.annotation.ScimExtensionType;
import org.apache.directory.scim.spec.resources.ScimExtension;
@@ -38,7 +36,6 @@
*/
@XmlRootElement( name = "LuckyNumberExtension", namespace = "http://www.psu.edu/schemas/psu-scim" )
@XmlAccessorType(XmlAccessType.NONE)
@Data
@ScimExtensionType(id = LuckyNumberExtension.SCHEMA_URN, description="Lucky Numbers", name="LuckyNumbers", required=true)
public class LuckyNumberExtension implements ScimExtension {

@@ -59,4 +56,37 @@ public String getUrn() {
return SCHEMA_URN;
}

public long getLuckyNumber() {
return this.luckyNumber;
}

public LuckyNumberExtension setLuckyNumber(long luckyNumber) {
this.luckyNumber = luckyNumber;
return this;
}

public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof LuckyNumberExtension)) return false;
final LuckyNumberExtension other = (LuckyNumberExtension) o;
if (!other.canEqual((Object) this)) return false;
if (this.getLuckyNumber() != other.getLuckyNumber()) return false;
return true;
}

protected boolean canEqual(final Object other) {
return other instanceof LuckyNumberExtension;
}

public int hashCode() {
final int PRIME = 59;
int result = 1;
final long $luckyNumber = this.getLuckyNumber();
result = result * PRIME + (int) ($luckyNumber >>> 32 ^ $luckyNumber);
return result;
}

public String toString() {
return "LuckyNumberExtension(luckyNumber=" + this.getLuckyNumber() + ")";
}
}
6 changes: 0 additions & 6 deletions scim-server-examples/scim-server-quarkus/pom.xml
Original file line number Diff line number Diff line change
@@ -105,12 +105,6 @@
<artifactId>scim-server</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Loading