Skip to content

Commit 5c1377b

Browse files
committed
refactor: remove deprecated code
1 parent 30d5ad1 commit 5c1377b

4 files changed

Lines changed: 3 additions & 75 deletions

File tree

modules/jooby-hibernate-validator/src/main/java/io/jooby/hibernate/validator/HibernateValidatorModule.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,6 @@ public HibernateValidatorModule() {
7171
this(byProvider(HibernateValidator.class).configure());
7272
}
7373

74-
/**
75-
* Setups a configurer callback.
76-
*
77-
* @param configurer Configurer callback.
78-
* @return This module.
79-
* @deprecated Use {@link
80-
* HibernateValidatorModule#HibernateValidatorModule(HibernateValidatorConfiguration)}
81-
*/
82-
@Deprecated
83-
public HibernateValidatorModule doWith(
84-
@NonNull final Consumer<HibernateValidatorConfiguration> configurer) {
85-
this.configurer = configurer;
86-
return this;
87-
}
88-
8974
/**
9075
* Overrides the default status code for the errors produced by validation. Default code is
9176
* UNPROCESSABLE_ENTITY(422)

modules/jooby-jstachio/src/main/java/io/jooby/jstachio/JStachioModule.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,6 @@ public class JStachioModule implements Extension {
6363
return this;
6464
}
6565

66-
/**
67-
* Allow simple reuse of raw byte buffers. It is usually used through <code>ThreadLocal</code>
68-
* variables.
69-
*
70-
* @param reuseBuffer True for reuse the buffer. Default is: <code>false</code>
71-
* @return This module.
72-
* @deprecated
73-
*/
74-
@Deprecated
75-
public JStachioModule reuseBuffer(boolean reuseBuffer) {
76-
return this;
77-
}
78-
7966
/**
8067
* JStachio will by default bind {@linkplain Context#getAttributes() Context attributes} to <code>
8168
* &#64;context</code>. This configuration option allows fetching context keys from something

modules/jooby-rocker/src/main/java/io/jooby/rocker/BufferedRockerOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public BufferedOutput asOutput() {
7272
}
7373

7474
static RockerOutputFactory<BufferedRockerOutput> factory(
75-
Charset charset, BufferedOutputFactory factory, int bufferSize) {
75+
Charset charset, BufferedOutputFactory factory) {
7676
return (contentType, charsetName) ->
7777
new BufferedRockerOutput(charset, contentType, factory.newCompositeOutput());
7878
}

modules/jooby-rocker/src/main/java/io/jooby/rocker/RockerModule.java

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,10 @@
2424
*/
2525
public class RockerModule implements Extension {
2626
private Boolean reloading;
27-
private int bufferSize;
2827
private final Charset charset;
2928

30-
public RockerModule(@NonNull Charset charset, int bufferSize) {
31-
this.charset = charset;
32-
this.bufferSize = bufferSize;
33-
}
34-
3529
public RockerModule(@NonNull Charset charset) {
36-
this(charset, BufferedRockerOutput.BUFFER_SIZE);
30+
this.charset = charset;
3731
}
3832

3933
public RockerModule() {
@@ -51,44 +45,6 @@ public RockerModule() {
5145
return this;
5246
}
5347

54-
/**
55-
* Configure buffer size to use while rendering. The buffer can grow ups when need it, so this
56-
* option works as a hint to allocate initial memory.
57-
*
58-
* @param bufferSize Buffer size.
59-
* @return This module.
60-
* @deprecated Use {@link #bufferSize}
61-
*/
62-
@Deprecated(forRemoval = true)
63-
public @NonNull RockerModule useBuffer(int bufferSize) {
64-
return bufferSize(bufferSize);
65-
}
66-
67-
/**
68-
* Configure buffer size to use while rendering. The buffer can grow ups when need it, so this
69-
* option works as a hint to allocate initial memory.
70-
*
71-
* @param bufferSize Buffer size.
72-
* @return This module.
73-
*/
74-
public @NonNull RockerModule bufferSize(int bufferSize) {
75-
this.bufferSize = bufferSize;
76-
return this;
77-
}
78-
79-
/**
80-
* Allow simple reuse of raw byte buffers. It is usually used through <code>ThreadLocal</code>
81-
* variable pointing to instance of {@link BufferedRockerOutput}.
82-
*
83-
* @param reuseBuffer True for reuse the buffer. Default is: <code>false</code>
84-
* @return This module.
85-
* @deprecated
86-
*/
87-
@Deprecated(forRemoval = true)
88-
public RockerModule reuseBuffer(boolean reuseBuffer) {
89-
return this;
90-
}
91-
9248
@Override
9349
public void install(@NonNull Jooby application) {
9450
var env = application.getEnvironment();
@@ -97,7 +53,7 @@ public void install(@NonNull Jooby application) {
9753
this.reloading == null
9854
? (env.isActive("dev") && runtime.isReloadingPossible())
9955
: this.reloading;
100-
var factory = BufferedRockerOutput.factory(charset, application.getOutputFactory(), bufferSize);
56+
var factory = BufferedRockerOutput.factory(charset, application.getOutputFactory());
10157
runtime.setReloading(reloading);
10258
// renderer
10359
application.encoder(new RockerMessageEncoder(factory));

0 commit comments

Comments
 (0)