Skip to content

Commit

Permalink
[#1228]: Adjusted formatting of DittoHeaderDefinition.
Browse files Browse the repository at this point in the history
Also made constructors `private` because there is no reason to have a non-private constructor in an enum.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
  • Loading branch information
Juergen Fickel committed Dec 20, 2021
1 parent 6cdc229 commit 10cccf1
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ public enum DittoHeaderDefinition implements HeaderDefinition {
*
* @since 2.3.0
*/
LIVE_CHANNEL_TIMEOUT_STRATEGY("live-channel-timeout-strategy", LiveChannelTimeoutStrategy.class, String.class, true, false,
LIVE_CHANNEL_TIMEOUT_STRATEGY("live-channel-timeout-strategy",
LiveChannelTimeoutStrategy.class,
String.class,
true,
false,
HeaderValueValidators.getEnumValidator(LiveChannelTimeoutStrategy.values())),

/**
Expand Down Expand Up @@ -417,7 +421,10 @@ public enum DittoHeaderDefinition implements HeaderDefinition {
*
* @since 2.3.0
*/
LIVE_CHANNEL_CONDITION("live-channel-condition", String.class, true, false,
LIVE_CHANNEL_CONDITION("live-channel-condition",
String.class,
true,
false,
HeaderValueValidators.getNoOpValidator()),

/**
Expand All @@ -432,10 +439,11 @@ public enum DittoHeaderDefinition implements HeaderDefinition {
*
* @since 2.3.0
*/
LIVE_CHANNEL_CONDITION_MATCHED("live-channel-condition-matched", Boolean.class,
false, true, HeaderValueValidators.getBooleanValidator())

;
LIVE_CHANNEL_CONDITION_MATCHED("live-channel-condition-matched",
Boolean.class,
false,
true,
HeaderValueValidators.getBooleanValidator());

/**
* Map to speed up lookup of header definition by key.
Expand All @@ -456,7 +464,7 @@ public enum DittoHeaderDefinition implements HeaderDefinition {
* @param readFromExternalHeaders whether Ditto reads this header from headers sent by externals.
* @param writeToExternalHeaders whether Ditto publishes this header to externals.
*/
DittoHeaderDefinition(final String theKey,
private DittoHeaderDefinition(final String theKey,
final Class<?> theType,
final boolean readFromExternalHeaders,
final boolean writeToExternalHeaders,
Expand All @@ -472,7 +480,7 @@ public enum DittoHeaderDefinition implements HeaderDefinition {
* @param readFromExternalHeaders whether Ditto reads this header from headers sent by externals.
* @param writeToExternalHeaders whether Ditto publishes this header to externals.
*/
DittoHeaderDefinition(final String theKey,
private DittoHeaderDefinition(final String theKey,
final Class<?> theType,
final Class<?> serializationType,
final boolean readFromExternalHeaders,
Expand Down

0 comments on commit 10cccf1

Please sign in to comment.