Skip to content

Commit 82e9fad

Browse files
committed
Formatting fixups
1 parent d0df6f4 commit 82e9fad

File tree

2 files changed

+42
-40
lines changed

2 files changed

+42
-40
lines changed

modbus-serial/src/main/java/com/digitalpetri/modbus/serial/SerialPortTransportConfig.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public static class Builder {
9797
* @return this {@link Builder}.
9898
*/
9999
public Builder setSerialPort(String serialPort) {
100-
this.serialPort = serialPort;
101-
return this;
100+
this.serialPort = serialPort;
101+
return this;
102102
}
103103

104104
/**
@@ -108,8 +108,8 @@ public Builder setSerialPort(String serialPort) {
108108
* @return this {@link Builder}.
109109
*/
110110
public Builder setBaudRate(int baudRate) {
111-
this.baudRate = baudRate;
112-
return this;
111+
this.baudRate = baudRate;
112+
return this;
113113
}
114114

115115
/**
@@ -119,8 +119,8 @@ public Builder setBaudRate(int baudRate) {
119119
* @return this {@link Builder}.
120120
*/
121121
public Builder setDataBits(int dataBits) {
122-
this.dataBits = dataBits;
123-
return this;
122+
this.dataBits = dataBits;
123+
return this;
124124
}
125125

126126
/**
@@ -133,8 +133,8 @@ public Builder setDataBits(int dataBits) {
133133
* @see SerialPort#TWO_STOP_BITS
134134
*/
135135
public Builder setStopBits(int stopBits) {
136-
this.stopBits = stopBits;
137-
return this;
136+
this.stopBits = stopBits;
137+
return this;
138138
}
139139

140140
/**
@@ -149,8 +149,8 @@ public Builder setStopBits(int stopBits) {
149149
* @see SerialPort#SPACE_PARITY
150150
*/
151151
public Builder setParity(int parity) {
152-
this.parity = parity;
153-
return this;
152+
this.parity = parity;
153+
return this;
154154
}
155155

156156
/**
@@ -160,8 +160,8 @@ public Builder setParity(int parity) {
160160
* @return this {@link Builder}.
161161
*/
162162
public Builder setRs485Mode(boolean rs485Mode) {
163-
this.rs485Mode = rs485Mode;
164-
return this;
163+
this.rs485Mode = rs485Mode;
164+
return this;
165165
}
166166

167167
/**
@@ -171,8 +171,8 @@ public Builder setRs485Mode(boolean rs485Mode) {
171171
* @return this {@link Builder}.
172172
*/
173173
public Builder setExecutor(ExecutorService executor) {
174-
this.executor = executor;
175-
return this;
174+
this.executor = executor;
175+
return this;
176176
}
177177

178178
/**

modbus-tcp/src/main/java/com/digitalpetri/modbus/tcp/client/NettyClientTransportConfig.java

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public static class Builder {
110110
* @return this Builder.
111111
*/
112112
public Builder setHostname(String hostname) {
113-
this.hostname = hostname;
114-
return this;
113+
this.hostname = hostname;
114+
return this;
115115
}
116116

117117
/**
@@ -121,8 +121,8 @@ public Builder setHostname(String hostname) {
121121
* @return this Builder.
122122
*/
123123
public Builder setPort(int port) {
124-
this.port = port;
125-
return this;
124+
this.port = port;
125+
return this;
126126
}
127127

128128
/**
@@ -132,8 +132,8 @@ public Builder setPort(int port) {
132132
* @return this Builder.
133133
*/
134134
public Builder setConnectTimeout(Duration connectTimeout) {
135-
this.connectTimeout = connectTimeout;
136-
return this;
135+
this.connectTimeout = connectTimeout;
136+
return this;
137137
}
138138

139139
/**
@@ -143,8 +143,8 @@ public Builder setConnectTimeout(Duration connectTimeout) {
143143
* @return this Builder.
144144
*/
145145
public Builder setConnectPersistent(boolean connectPersistent) {
146-
this.connectPersistent = connectPersistent;
147-
return this;
146+
this.connectPersistent = connectPersistent;
147+
return this;
148148
}
149149

150150
/**
@@ -154,8 +154,8 @@ public Builder setConnectPersistent(boolean connectPersistent) {
154154
* @return this Builder.
155155
*/
156156
public Builder setReconnectLazy(boolean reconnectLazy) {
157-
this.reconnectLazy = reconnectLazy;
158-
return this;
157+
this.reconnectLazy = reconnectLazy;
158+
return this;
159159
}
160160

161161
/**
@@ -166,8 +166,8 @@ public Builder setReconnectLazy(boolean reconnectLazy) {
166166
* @see Netty#sharedEventLoop()
167167
*/
168168
public Builder setEventLoopGroup(EventLoopGroup eventLoopGroup) {
169-
this.eventLoopGroup = eventLoopGroup;
170-
return this;
169+
this.eventLoopGroup = eventLoopGroup;
170+
return this;
171171
}
172172

173173
/**
@@ -178,30 +178,32 @@ public Builder setEventLoopGroup(EventLoopGroup eventLoopGroup) {
178178
* @see Modbus#sharedExecutor()
179179
*/
180180
public Builder setExecutor(ExecutorService executor) {
181-
this.executor = executor;
182-
return this;
181+
this.executor = executor;
182+
return this;
183183
}
184184

185185
/**
186186
* Set the {@link Consumer} that can be used to customize the Netty {@link Bootstrap}.
187187
*
188-
* @param bootstrapCustomizer the {@link Consumer} that can be used to customize the Netty {@link Bootstrap}.
188+
* @param bootstrapCustomizer the {@link Consumer} that can be used to customize the Netty
189+
* {@link Bootstrap}.
189190
* @return this Builder.
190191
*/
191192
public Builder setBootstrapCustomizer(Consumer<Bootstrap> bootstrapCustomizer) {
192-
this.bootstrapCustomizer = bootstrapCustomizer;
193-
return this;
193+
this.bootstrapCustomizer = bootstrapCustomizer;
194+
return this;
194195
}
195196

196197
/**
197198
* Set the {@link Consumer} that can be used to customize the Netty {@link ChannelPipeline}.
198199
*
199-
* @param pipelineCustomizer the {@link Consumer} that can be used to customize the Netty {@link ChannelPipeline}.
200+
* @param pipelineCustomizer the {@link Consumer} that can be used to customize the Netty {@link
201+
* ChannelPipeline}.
200202
* @return this Builder.
201203
*/
202204
public Builder setPipelineCustomizer(Consumer<ChannelPipeline> pipelineCustomizer) {
203-
this.pipelineCustomizer = pipelineCustomizer;
204-
return this;
205+
this.pipelineCustomizer = pipelineCustomizer;
206+
return this;
205207
}
206208

207209
/**
@@ -211,8 +213,8 @@ public Builder setPipelineCustomizer(Consumer<ChannelPipeline> pipelineCustomize
211213
* @return this Builder.
212214
*/
213215
public Builder setTlsEnabled(boolean tlsEnabled) {
214-
this.tlsEnabled = tlsEnabled;
215-
return this;
216+
this.tlsEnabled = tlsEnabled;
217+
return this;
216218
}
217219

218220
/**
@@ -222,8 +224,8 @@ public Builder setTlsEnabled(boolean tlsEnabled) {
222224
* @return this Builder.
223225
*/
224226
public Builder setKeyManagerFactory(KeyManagerFactory keyManagerFactory) {
225-
this.keyManagerFactory = keyManagerFactory;
226-
return this;
227+
this.keyManagerFactory = keyManagerFactory;
228+
return this;
227229
}
228230

229231
/**
@@ -233,8 +235,8 @@ public Builder setKeyManagerFactory(KeyManagerFactory keyManagerFactory) {
233235
* @return this Builder.
234236
*/
235237
public Builder setTrustManagerFactory(TrustManagerFactory trustManagerFactory) {
236-
this.trustManagerFactory = trustManagerFactory;
237-
return this;
238+
this.trustManagerFactory = trustManagerFactory;
239+
return this;
238240
}
239241

240242
public NettyClientTransportConfig build() {

0 commit comments

Comments
 (0)