More checkstyle fixes

This commit is contained in:
Soby Chacko
2024-10-31 15:33:13 -04:00
committed by Mark Pollack
parent 12ff83b068
commit 254239cfe0
4 changed files with 6 additions and 23 deletions

View File

@@ -34,7 +34,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<disable.checks>true</disable.checks>
<disable.checks>false</disable.checks>
</properties>
<dependencies>

View File

@@ -1,20 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2023-2024 the original author or authors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@@ -37,7 +21,7 @@
</scm>
<properties>
<disable.checks>true</disable.checks>
<disable.checks>false</disable.checks>
</properties>
<dependencies>

View File

@@ -16,19 +16,17 @@
package org.springframework.ai.autoconfigure.ollama;
import java.time.Duration;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.testcontainers.ollama.OllamaContainer;
import java.time.Duration;
import org.springframework.ai.ollama.api.OllamaApi;
import org.springframework.ai.ollama.management.ModelManagementOptions;
import org.springframework.ai.ollama.management.OllamaModelManager;
import org.springframework.ai.ollama.management.PullModelStrategy;
import static org.springframework.ai.autoconfigure.ollama.BaseOllamaIT.isDisabled;
public class BaseOllamaIT {
private static OllamaContainer ollamaContainer;
@@ -38,7 +36,7 @@ public class BaseOllamaIT {
@BeforeAll
public static void setUp() {
if (useTestcontainers && !BaseOllamaIT.isDisabled()) {
if (useTestcontainers && !isDisabled()) {
ollamaContainer = new OllamaContainer(OllamaImage.IMAGE).withReuse(true);
ollamaContainer.start();
}

View File

@@ -28,5 +28,6 @@
<suppress files="FiltersParser\.java" checks="AvoidNestedBlocks"/>
<suppress files="FiltersParser\.java" checks="MultipleVariableDeclarations"/>
<suppress files="FiltersLexer\.java" checks="MultipleVariableDeclarations"/>
<suppress files="BaseOllamaIT.java" checks="HideUtilityClassConstructor"/>
</suppressions>