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

src: drop NullaryFunction in favor or java.util.Supplier #2179

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

kofemann
Copy link
Contributor

@kofemann kofemann commented Dec 7, 2022

The NullaryFunction has an equivalent in standard java API. So, lets use it.

The NullaryFunction has an equivalent in standard java API. So, lets use
it.
@mnriem
Copy link
Contributor

mnriem commented Aug 29, 2023

@kofemann Is this change backwards compatible?

@arjantijms
Copy link
Contributor

@mnriem maybe we can just build it, and test it? E.g. by adding it to GlassFish and running all tests that we have?

@kofemann
Copy link
Contributor Author

kofemann commented Sep 6, 2023

@mnriem I am pretty sure this is not a drop-in replacement. However, I have no idea which external applications use grizzly internals. So, I agree with @arjantijms, we just have to build packages, document the change and let depending applications to test.

*
* @return Attribute<T>
*/
<T> Attribute<T> createAttribute(String name, org.glassfish.grizzly.utils.NullaryFunction<T> initializer);
Copy link
Contributor

Choose a reason for hiding this comment

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

With this removed, after switching client code to Supplier, the method left below is used, which is still marked as deprecated. This causes:

[WARNING] .../mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/service/imq/grizzly/GrizzlyMQPacketFilter.java:[42,13] <T>createAttribute(java.lang.String,org.glassfish.grizzly.attributes.NullaryFunction<T>) in org.glassfish.grizzly.attributes.AttributeBuilder has been deprecated
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] .../mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/service/imq/grizzly/GrizzlyMQPacketFilter.java: warnings found and -Werror specified
[INFO] 1 error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the depreciation left in place unintendedly

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

Successfully merging this pull request may close these issues.

None yet

4 participants