Skip to content

Deprecated enums still being used#932

Closed
mittal-umang wants to merge 2 commits intobox:mainfrom
mittal-umang:main
Closed

Deprecated enums still being used#932
mittal-umang wants to merge 2 commits intobox:mainfrom
mittal-umang:main

Conversation

@mittal-umang
Copy link
Copy Markdown
Contributor

Fixes #931

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 27, 2021

CLA assistant check
All committers have signed the CLA.

@mwwoda
Copy link
Copy Markdown
Contributor

mwwoda commented Oct 28, 2021

Hi @mittal-umang

Thanks for the contribution! This is something that was overlooked when deprecating the old BoxEvent.Type enum. Right now your PR is actually breaking existing API. We would prefer to have a similar methods with same logic that takes new BoxEvent.EventType and deprecate the old ones. That way we can give existing customers time to migrate to the new methods. I would gladly accept this PR if you can introduce such change.

Thanks,
Mateusz

@mittal-umang
Copy link
Copy Markdown
Contributor Author

mittal-umang commented Oct 28, 2021 via email

@mittal-umang
Copy link
Copy Markdown
Contributor Author

mittal-umang commented Oct 28, 2021 via email

@antusus
Copy link
Copy Markdown
Contributor

antusus commented Nov 9, 2021

Hi @mittal-umang,

Sorry for late response. I can see the problem with duplicating methods having varargs arguments.
I'm a big fan of request objects. It allow us to define required and optional parameters. And I would go this way in this scenario. In fact I'm currently working on this method as I want to prepare SDK to work with new stream of events. Here is the method definition:

public static EventLog getEnterpriseEvents(BoxAPIConnection api, EnterpriseEventsRequest request)

Where EnterpriseEventsRequest will contain all the parameters like after, before, limit, etc. This new method will be using new enum values. Example of usage:

EnterpriseEventsRequest request = new EnterpriseEventsRequest()
    .after(after)
    .before(before)
    .limit(limit)
    .position(position)
    .types(eventTypes);
EventLog.getEnterpriseEvents(api, request);

I will post PR link most likely next week.

@antusus
Copy link
Copy Markdown
Contributor

antusus commented Nov 9, 2021

Pull request that fixes the problem with deprecated enums being used: #934

@mittal-umang
Copy link
Copy Markdown
Contributor Author

mittal-umang commented Nov 9, 2021 via email

@antusus
Copy link
Copy Markdown
Contributor

antusus commented Nov 9, 2021

No you do not need to merge your PR. I went with completely different approach.
Old methods are now marked as deprecated and the new method uses only new BoxEvent.EventType.
This should solve #931 issue.

@antusus
Copy link
Copy Markdown
Contributor

antusus commented Nov 30, 2021

The issue should be resolved with release of 2.58.0

@antusus antusus closed this Nov 30, 2021
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.

Deprecated enums still being used

4 participants