Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class OllamaApiAutoConfiguration {

@Bean
@ConditionalOnMissingBean(OllamaConnectionDetails.class)
public PropertiesOllamaConnectionDetails ollamaConnectionDetails(OllamaConnectionProperties properties) {
Copy link
Contributor Author

@sobychacko sobychacko May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PropertiesOllamaConnectionDetails is a package-private inner class that was marked as the return type from a public API method. Although the compiler works with that, the IDE throws a visibility issue warning.

public OllamaConnectionDetails ollamaConnectionDetails(OllamaConnectionProperties properties) {
return new PropertiesOllamaConnectionDetails(properties);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ private OpenAIAutoConfigurationUtil() {
// Avoids instantiation
}

public static @NotNull ResolvedConnectionProperties resolveConnectionProperties(
Copy link
Contributor Author

@sobychacko sobychacko May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types of the two arguments in this public method are of classes where they are package-private. This breaks the visibility scope. Since this utility method is only used from the package, we may want to consider marking this as package-protected, matching the same scope of the provided method arg types.

OpenAiParentProperties commonProperties, OpenAiParentProperties modelProperties, String modelType) {
static @NotNull ResolvedConnectionProperties resolveConnectionProperties(OpenAiParentProperties commonProperties,
OpenAiParentProperties modelProperties, String modelType) {

String baseUrl = StringUtils.hasText(modelProperties.getBaseUrl()) ? modelProperties.getBaseUrl()
: commonProperties.getBaseUrl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void setAws(Aws aws) {
this.aws = aws;
}

static class Aws {
Copy link
Contributor Author

@sobychacko sobychacko May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We provide public accessor/setter for this although this is a package-private inner class. Since we can't change those public API's, we should make this inner AWS class as public.

public static class Aws {

private String domainName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class WeaviateVectorStoreAutoConfiguration {

@Bean
@ConditionalOnMissingBean(WeaviateConnectionDetails.class)
public PropertiesWeaviateConnectionDetails weaviateConnectionDetails(WeaviateVectorStoreProperties properties) {
public WeaviateConnectionDetails weaviateConnectionDetails(WeaviateVectorStoreProperties properties) {
return new PropertiesWeaviateConnectionDetails(properties);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
*/
public class RedisFilterExpressionConverter extends AbstractFilterExpressionConverter {

public static final NumericBoundary POSITIVE_INFINITY = new NumericBoundary(Double.POSITIVE_INFINITY, true);
Copy link
Contributor Author

@sobychacko sobychacko May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These public constants cause visibility issues since the underlying types are package-private.

static final NumericBoundary POSITIVE_INFINITY = new NumericBoundary(Double.POSITIVE_INFINITY, true);

public static final NumericBoundary NEGATIVE_INFINITY = new NumericBoundary(Double.NEGATIVE_INFINITY, true);
static final NumericBoundary NEGATIVE_INFINITY = new NumericBoundary(Double.NEGATIVE_INFINITY, true);

private Map<String, MetadataField> metadataFields;
private final Map<String, MetadataField> metadataFields;

public RedisFilterExpressionConverter(List<MetadataField> metadataFields) {
this.metadataFields = metadataFields.stream()
Expand Down Expand Up @@ -168,11 +168,11 @@ private NumericBoundary exclusive(Value value) {
return new NumericBoundary(value.value(), true);
}

static record Numeric(NumericBoundary lower, NumericBoundary upper) {
record Numeric(NumericBoundary lower, NumericBoundary upper) {

}

static record NumericBoundary(Object value, boolean exclusive) {
record NumericBoundary(Object value, boolean exclusive) {

private static final String INFINITY = "inf";

Expand Down