Skip to content

Commit

Permalink
Remove hubspot-style and immutables-exceptions dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmith-hs committed Dec 3, 2024
1 parent c392aac commit a0413fd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
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 {
}

0 comments on commit a0413fd

Please sign in to comment.