Skip to content

Commit

Permalink
Remove duplicated lombok annotations in the pulsar-commmon module (ap…
Browse files Browse the repository at this point in the history
…ache#5993)

### Motivation

Some of the classes in the pulsar-common module had a mixture of the following lombok annotations:

```
@DaTa
@Setter	
@Getter	
@EqualsAndHashCode	
@tostring
```

The [@DaTa](https://projectlombok.org/features/Data) annotation includes all other annotations:

> All together now: A shortcut for @tostring, @EqualsAndHashCode, @Getter on all fields, @Setter on all non-final fields, and @requiredargsconstructor!


### Modifications

Removed `@Setter`, `@Getter`, `@EqualsAndHashCode`, and '@tostring' if the `@Data` annotation was also present
  • Loading branch information
vzhikserg authored and tuteng committed Jan 9, 2020
1 parent 0bc54c5 commit baeb879
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,12 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* Configuration of Pulsar Function.
*/
@Getter
@Setter
@Data
@EqualsAndHashCode
@ToString
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,12 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* Function state.
*/
@Getter
@Setter
@Data
@EqualsAndHashCode
@ToString
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* Class representing resources, such as CPU, RAM, and disk size.
*/
@Getter
@Setter
@Data
@EqualsAndHashCode
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder(toBuilder = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,13 @@
package org.apache.pulsar.common.functions;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
* Configuration of a windowing function.
*/
@Data
@Setter
@Getter
@Accessors(chain = true)
@ToString
public class WindowConfig {

public static final String WINDOW_CONFIG_KEY = "__WINDOWCONFIGS__";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.pulsar.client.api.SubscriptionInitialPosition;
import org.apache.pulsar.common.functions.ConsumerConfig;
import org.apache.pulsar.common.functions.FunctionConfig;
Expand All @@ -37,11 +33,7 @@
/**
* Configuration of Pulsar Sink.
*/
@Getter
@Setter
@Data
@EqualsAndHashCode
@ToString
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,14 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.pulsar.common.functions.FunctionConfig;
import org.apache.pulsar.common.functions.Resources;

/**
* Pulsar source configuration.
*/
@Getter
@Setter
@Data
@EqualsAndHashCode
@ToString
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.Map;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import org.apache.pulsar.common.schema.SchemaInfo;
import org.apache.pulsar.common.schema.SchemaType;

Expand All @@ -31,7 +30,6 @@
*/
@Builder
@Data
@ToString
public class SchemaData {
private final SchemaType type;
private final boolean isDeleted;
Expand Down

0 comments on commit baeb879

Please sign in to comment.