You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jan Philipp (Jira)" <ji...@apache.org> on 2025/01/20 14:50:00 UTC

[jira] [Updated] (CXF-9101) Invalid api visibility in CXFHttpRequest

     [ https://issues.apache.org/jira/browse/CXF-9101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Philipp updated CXF-9101:
-----------------------------
    Description: 
Released in 4.0.6 and 4.1.0, there was merged [https://github.com/apache/cxf/pull/2093] which adds some functionality for AsyncHTTPConduit.

However, this change results into following api visibility (breaking) change.
 * Before CXFHttpRequest#getOutputStream() returns the public type 
AsyncWrappedOutputStream (actually a class)
 * After CXFHttpRequest#getOutputStream() returns the package(!) protected type AsyncWrappedOutputStreamBase (actually an interface). Now a public api method returns a non-public type.
 
For not breaking existing api signatures and not producing invalid combinations, this (interface) should be public also. However, if the api (method) itself should not be public at all, I would suggest a remark in the notes and removing the public access completely. If the latter one, what would be an alternative?
 
In case of asking the context: I'm using winrm4j which has implemented its client backend with CXF. [See usage|https://github.com/cloudsoft/winrm4j/blob/806a943a3d68f3a6ad23385375c61a53c7fbec43/client/src/main/java/io/cloudsoft/winrm4j/client/encryption/AsyncHttpEncryptionAwareConduit.java#L105].
 
Don't be confused, the project I linked looks to be abandoned. I have forked & updated the project against the [4.x-line already|https://github.com/hlsolutions/winrm4j/tree/feature/jdk17_jakarta], but until 4.0.5 there were no issues.

  was:
Released in 4.0.6 and 4.1.0, there was merged [https://github.com/apache/cxf/pull/2093] which adds some functionality for AsyncHTTPConduit.

However, this change results into following api visibility (breaking) change.

* Before CXFHttpRequest#getOutputStream() returns the public type 
AsyncWrappedOutputStream (actually a class)
* After CXFHttpRequest#getOutputStream() returns the package(!) protected type AsyncWrappedOutputStreamBase (actually an interface). No a public api method returns a non-public type.
 
For not breaking existing api signatures and not producing invalid combinations, this (interface) should be public also. However, if the api (method) itself should not be public at all, I would suggest a remark in the notes and removing the public access completely. If the latter one, what would be an alternative?
 
In case of asking the context: I'm using winrm4j which has implemented its client backend with CXF. [See usage|https://github.com/cloudsoft/winrm4j/blob/806a943a3d68f3a6ad23385375c61a53c7fbec43/client/src/main/java/io/cloudsoft/winrm4j/client/encryption/AsyncHttpEncryptionAwareConduit.java#L105].
 
Don't be confused, the project I linked looks to be abandoned. I have forked & updated the project against the [4.x-line already|https://github.com/hlsolutions/winrm4j/tree/feature/jdk17_jakarta], but until 4.0.5 there were no issues.


> Invalid api visibility in CXFHttpRequest
> ----------------------------------------
>
>                 Key: CXF-9101
>                 URL: https://issues.apache.org/jira/browse/CXF-9101
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 4.1.0, 4.0.6
>            Reporter: Jan Philipp
>            Priority: Major
>
> Released in 4.0.6 and 4.1.0, there was merged [https://github.com/apache/cxf/pull/2093] which adds some functionality for AsyncHTTPConduit.
> However, this change results into following api visibility (breaking) change.
>  * Before CXFHttpRequest#getOutputStream() returns the public type 
> AsyncWrappedOutputStream (actually a class)
>  * After CXFHttpRequest#getOutputStream() returns the package(!) protected type AsyncWrappedOutputStreamBase (actually an interface). Now a public api method returns a non-public type.
>  
> For not breaking existing api signatures and not producing invalid combinations, this (interface) should be public also. However, if the api (method) itself should not be public at all, I would suggest a remark in the notes and removing the public access completely. If the latter one, what would be an alternative?
>  
> In case of asking the context: I'm using winrm4j which has implemented its client backend with CXF. [See usage|https://github.com/cloudsoft/winrm4j/blob/806a943a3d68f3a6ad23385375c61a53c7fbec43/client/src/main/java/io/cloudsoft/winrm4j/client/encryption/AsyncHttpEncryptionAwareConduit.java#L105].
>  
> Don't be confused, the project I linked looks to be abandoned. I have forked & updated the project against the [4.x-line already|https://github.com/hlsolutions/winrm4j/tree/feature/jdk17_jakarta], but until 4.0.5 there were no issues.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)