Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

change affiliation field from mandatory to optional #3

Merged
merged 6 commits into from
Nov 15, 2017

Conversation

SandySun2000
Copy link
Contributor

@SandySun2000 SandySun2000 commented Nov 9, 2017

#2

Copy link
Contributor

@cr22rc cr22rc left a comment

Choose a reason for hiding this comment

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

Please look at comments.

@@ -171,7 +171,9 @@ String getName() {
}

String getMspid() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would be careful here and in other places as I don't think these are optional. If they're not present probably should throw some type of exeception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the field is required, should I remove the checking?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's one option. I would think better throwing an exception with an error that the field was missing from the NetworkConfig document.

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you done some testing with this change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only do the testing with "affiliation" change from the Jason file. I will leave those fields untouched then

@@ -292,15 +299,21 @@ public String getEventURL() {
}

public String getEnrollId() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Again I think there would always be an id here

return value.getString("enrollId");
if(value.containsKey("enrollId"))
return value.getString("enrollId");
return null;
}

public String getAffiliation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here this seems appropriate

README.md Outdated

## Hyperledger Fabric Java SDK Version
This code is dependent on a 1.1.0-SNAPSHOT
Requires Java SDK 1.1.0-SNAPSHOT
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should be Hyperledger Fabric Java SDK 1.1.0-SNAPSHOT

@georgeanu georgeanu merged commit 21e8e47 into IBM-Blockchain-Archive:master Nov 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants