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 hubspot-style and immutables-exceptions dependencies #1220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<dep.plugin.jacoco.version>0.8.3</dep.plugin.jacoco.version>
<dep.plugin.javadoc.version>3.0.1</dep.plugin.javadoc.version>
<dep.hubspot-immutables.version>1.9</dep.hubspot-immutables.version>


<basepom.test.add.opens>
Expand Down Expand Up @@ -91,16 +90,6 @@
<artifactId>jackson-datatype-jdk8</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.hubspot.immutables</groupId>
<artifactId>hubspot-style</artifactId>
<version>${dep.hubspot-immutables.version}</version>
</dependency>
<dependency>
<groupId>com.hubspot.immutables</groupId>
<artifactId>immutables-exceptions</artifactId>
<version>${dep.hubspot-immutables.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -204,15 +193,6 @@
<artifactId>value</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hubspot.immutables</groupId>
<artifactId>hubspot-style</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hubspot.immutables</groupId>
<artifactId>immutables-exceptions</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.hubspot.jinjava.interpret;

import com.hubspot.immutables.style.HubSpotImmutableStyle;
import com.hubspot.jinjava.lib.expression.DefaultExpressionStrategy;
import com.hubspot.jinjava.lib.expression.ExpressionStrategy;
import com.hubspot.jinjava.style.JinjavaImmutableStyle;
import javax.annotation.Nullable;
import org.immutables.value.Value.Default;
import org.immutables.value.Value.Immutable;

@Immutable(singleton = true)
@HubSpotImmutableStyle
@JinjavaImmutableStyle
public interface ContextConfigurationIF {
@Default
default ExpressionStrategy getExpressionStrategy() {
Expand Down Expand Up @@ -49,7 +49,7 @@ default ErrorHandlingStrategy getErrorHandlingStrategy() {
}

@Immutable(singleton = true)
@HubSpotImmutableStyle
@JinjavaImmutableStyle
interface ErrorHandlingStrategyIF {
@Default
default TemplateErrorTypeHandlingStrategy getFatalErrorStrategy() {
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/com/hubspot/jinjava/style/JinjavaImmutableStyle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.hubspot.jinjava.style;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.immutables.value.Value.Style;
import org.immutables.value.Value.Style.ImplementationVisibility;

@Target({ ElementType.PACKAGE, ElementType.TYPE })
@Retention(RetentionPolicy.CLASS)
@JsonSerialize
@Style(
get = { "is*", "get*" },
init = "set*",
typeAbstract = { "Abstract*", "*IF" },
typeImmutable = "*",
optionalAcceptNullable = true,
forceJacksonPropertyNames = false,
visibility = ImplementationVisibility.SAME,
redactedMask = "**REDACTED**"
)
public @interface JinjavaImmutableStyle {
}
Loading