Skip to content

Conversation

@carycheng
Copy link

No description provided.

@carycheng carycheng requested a review from mattwiller November 15, 2018 20:19
@boxcla
Copy link

boxcla commented Nov 15, 2018

Hi @carycheng, thanks for the pull request. Before we can merge it, we need you to sign our Contributor License Agreement. You can do so electronically here: http://opensource.box.com/cla

Once you have signed, just add a comment to this pull request saying, "CLA signed". Thanks!

@coveralls
Copy link

coveralls commented Nov 15, 2018

Pull Request Test Coverage Report for Build 1777

  • 29 of 35 (82.86%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.9%) to 59.736%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/box/sdk/MetadataTemplate.java 29 35 82.86%
Totals Coverage Status
Change from base Build 1772: 0.9%
Covered Lines: 4709
Relevant Lines: 7883

💛 - Coveralls

/**
* @see #getOptionsObject()
*/
private List<Option> optionsObject;

Choose a reason for hiding this comment

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

Is the options property being used anywhere now? If not, you could just change its type and not have two properties for this.

* Gets list of possible options for options type of the field.
* @return list of possible options for option type of the field.
*/
public List<Option> getOptionsObject() {

Choose a reason for hiding this comment

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

This method name should be pluralized, e.g. getOptionsObjects()

*/
public void setOptions(List<String> options) {
this.options = options;
JsonObject optionObject = new JsonObject();

Choose a reason for hiding this comment

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

Is there any issue with re-using the same JsonObject for each key here?

@Category(IntegrationTest.class)
public void createMetadataTemplateSucceeds() {
BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken());
BoxAPIConnection api = new BoxAPIConnection("UXu8HsUlB4K5uDWGWSO075k1qq9hle93");

Choose a reason for hiding this comment

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

Don't commit this!

MetadataTemplate template = MetadataTemplate.createMetadataTemplate(api, "enterprise",
"documentFlow03", "Document Flow 03", false, fields);
} catch (BoxAPIException apiEx) {
System.out.println("Exception: " + apiEx);

Choose a reason for hiding this comment

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

Don't commit this either

@carycheng carycheng merged commit ca0158b into master Nov 16, 2018
@carycheng carycheng deleted the metadata-template-bug branch November 16, 2018 01:12
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.

5 participants