-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: correct visibility scope issues in Spring AI components #3284
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,8 +33,8 @@ private OpenAIAutoConfigurationUtil() { | |
| // Avoids instantiation | ||
| } | ||
|
|
||
| public static @NotNull ResolvedConnectionProperties resolveConnectionProperties( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,7 +144,7 @@ public void setAws(Aws aws) { | |
| this.aws = aws; | ||
| } | ||
|
|
||
| static class Aws { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| public static class Aws { | ||
|
|
||
| private String domainName; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,11 +38,11 @@ | |
| */ | ||
| public class RedisFilterExpressionConverter extends AbstractFilterExpressionConverter { | ||
|
|
||
| public static final NumericBoundary POSITIVE_INFINITY = new NumericBoundary(Double.POSITIVE_INFINITY, true); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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() | ||
|
|
@@ -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"; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropertiesOllamaConnectionDetailsis 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.