[
https://issues.apache.org/jira/browse/CAMEL-22334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18020402#comment-18020402
]
Otavio Rodolfo Piske commented on CAMEL-22334:
----------------------------------------------
Hi Tom, yes, I think it would be good to have a deprecation strategy. I'd say,
maybe extract the nested Header and then create a temporary new one that
extends the one that was created. Then mark it as deprecate, document it in the
migration guide ... and that should be it.
> camel-ai: avoid deep nested classes
> -----------------------------------
>
> Key: CAMEL-22334
> URL: https://issues.apache.org/jira/browse/CAMEL-22334
> Project: Camel
> Issue Type: Improvement
> Components: camel-ai, camel-langchain4j-chat,
> camel-langchain4j-embeddings, camel-langchain4j-web-search, camel-milvus,
> camel-neo4j, camel-pinecone, camel-qdrant, camel-weaviate
> Affects Versions: 4.13.0
> Reporter: Otavio Rodolfo Piske
> Assignee: Thomas Cunningham
> Priority: Major
> Labels: easy-fix, help-wanted
> Fix For: 4.x
>
>
> In Camel AI we have many components that rely on nested classes for headers.
> This is inconsistent with the rest of the code base.
> For instance:
> {code:java}
>
> public class SomeThingAi {
> public static final String SCHEME = "weaviate";
> private SomeThingAi() {
> }
> public static class Headers {
> // Lots of headers here
> }
> }
> {code}
>
>
> This is inconsistent with the rest of the code base and we should not rely on
> this pattern.
>
> Instead, create a single class for the headers within that component, like
> all others:
>
> {code:java}
> public class Headers {
> // Lots of headers here
> }{code}
>
> Some affected components:
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)