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

Fixes 4108: Remove org.apache.commons.collections* imports #459

Closed
wants to merge 1 commit into from

Conversation

vga91
Copy link
Owner

@vga91 vga91 commented Jun 25, 2024

Fixes https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/4108

  • Removed commons-collections4 from main and xls gradles
  • Removed org.apache.commons.collections* imports and replaced with ad-hoc newly-created utils functions

* @throws IllegalArgumentException thrown if object is not recognized
* @since 3.1
*/
public static int size(final Object object) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove and use collection.size or map.size

* @return the number of elements contained in the iterator
* @since 4.1
*/
public static int sizeIterator(final Iterator<?> iterator) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can remove this as well

* @param iterable the iterable to check, may be null
* @return the number of elements contained in the iterable
*/
public static int sizeIterable(final Iterable<?> iterable) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can remove this as well

import java.util.Iterator;
import java.util.Map;

public class ExtendedCollectionUtils {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe this class is not needed anymore since java 17 auto cast

@vga91 vga91 closed this Jul 2, 2024
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.

2 participants