Skip to content
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

nonPublicPartOfAPI for EpochMessage reported by revapi #2259

Open
sbernard31 opened this issue Jul 4, 2024 · 1 comment
Open

nonPublicPartOfAPI for EpochMessage reported by revapi #2259

sbernard31 opened this issue Jul 4, 2024 · 1 comment

Comments

@sbernard31
Copy link
Contributor

When building leshan, revapi reports something wrong with californium API. (I think this is not new but before I just ignored all error from californium and I changed my build config about that recently)

Report :

{
  "ignore": true,
  "code": "java.class.nonPublicPartOfAPI",
  "new": "class org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage",
  "justification": "ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE"
    "classSimpleName": "EpochMessage",
  "exampleUseChainInNewApi": "org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage is used as parameter in method void org.eclipse.californium.scandium.dtls.DTLSFlight::wrapMessage(org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage) throws org.eclipse.californium.scandium.dtls.HandshakeException <- org.eclipse.californium.scandium.dtls.DTLSFlight is returned from method org.eclipse.californium.scandium.dtls.DTLSFlight org.eclipse.californium.scandium.dtls.Handshaker::createFlight() <- org.eclipse.californium.scandium.dtls.Handshaker is used as parameter in method void org.eclipse.californium.scandium.dtls.SessionListener::handshakeFlightRetransmitted(org.eclipse.californium.scandium.dtls.Handshaker, int) <- org.eclipse.californium.scandium.dtls.SessionListener is returned from method org.eclipse.californium.scandium.dtls.SessionListener org.eclipse.californium.scandium.dtls.Connection::getSessionListener() <- org.eclipse.californium.scandium.dtls.Connection is used as parameter in method void org.eclipse.californium.scandium.MdcConnectionListener::updateExecution(org.eclipse.californium.scandium.dtls.Connection) @ org.eclipse.leshan.transport.californium.PrincipalMdcConnectionListener (method void org.eclipse.californium.scandium.MdcConnectionListener::updateExecution(org.eclipse.californium.scandium.dtls.Connection) @ org.eclipse.leshan.transport.californium.PrincipalMdcConnectionListener is part of the API)",
  "package": "org.eclipse.californium.scandium.dtls",
  "classQualifiedName": "org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage",
  "elementKind": "class",
  "newArchive": "org.eclipse.californium:scandium:jar:3.12.0",
  "newArchiveRole": "supplementary",
  
},

nonPublicPartOfAPI is described here.

I copy/paste the exampleUseChainInNewApi here because this is the most important part to understand the issue :

org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage is used as parameter in method void org.eclipse.californium.scandium.dtls.DTLSFlight::wrapMessage(org.eclipse.californium.scandium.dtls.DTLSFlight.EpochMessage) throws org.eclipse.californium.scandium.dtls.HandshakeException <- org.eclipse.californium.scandium.dtls.DTLSFlight is returned from method org.eclipse.californium.scandium.dtls.DTLSFlight org.eclipse.californium.scandium.dtls.Handshaker::createFlight() <- org.eclipse.californium.scandium.dtls.Handshaker is used as parameter in method void org.eclipse.californium.scandium.dtls.SessionListener::handshakeFlightRetransmitted(org.eclipse.californium.scandium.dtls.Handshaker, int) <- org.eclipse.californium.scandium.dtls.SessionListener is returned from method org.eclipse.californium.scandium.dtls.SessionListener org.eclipse.californium.scandium.dtls.Connection::getSessionListener() <- org.eclipse.californium.scandium.dtls.Connection is used as parameter in method void org.eclipse.californium.scandium.MdcConnectionListener::updateExecution(org.eclipse.californium.scandium.dtls.Connection) @ org.eclipse.leshan.transport.californium.PrincipalMdcConnectionListener (method void org.eclipse.californium.scandium.MdcConnectionListener::updateExecution(org.eclipse.californium.scandium.dtls.Connection) @ org.eclipse.leshan.transport.californium.PrincipalMdcConnectionListener is part of the API)",
"package": "org.eclipse.californium.scandium.dtls

Solution ?

I think EpochMessage class should be protected instead of private ?

I know this is part of @NoPublicAPI but even if this is not intended to be used the visibility seems inconsistent.

(tested with Cf 3.12.0)

@boaks
Copy link
Contributor

boaks commented Jul 4, 2024

For me this seems to be a leftover protected in

	protected final void wrapMessage(EpochMessage epochMessage) throws HandshakeException {

and I would prefer to change that to private in 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants