-
Notifications
You must be signed in to change notification settings - Fork 529
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
RESTWS-641: Add support for MIME types when posting complexObs value in json request #360
base: master
Are you sure you want to change the base?
Conversation
Can you include the ticket id in the commit message as required at? https://wiki.openmrs.org/display/docs/Pull+Request+Tips |
My screen shows me the ticket Id is included. (As in, "RESTWS-641: Add support for MIME types when posting complexObs value in json request" ). I also tried to change the message with git commit --amend. Hope the ticket id appears now. Or may maybe am missing some obvious point, any help is highly appreciated. Thank you. cc @dkayiwa |
Can you look at the commit message from here? d1c9557 |
import java.io.InputStream; | ||
import java.util.List; | ||
import java.util.Locale; | ||
import static org.junit.Assert.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you take a look at this? https://wiki.openmrs.org/display/docs/Java+Conventions#JavaConventions-Donotusewildcardimports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conventions followed @dkayiwa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
@dkayiwa , yes Sir. |
b7331f9
to
696bb81
Compare
ComplexData complexData = new ComplexData(obs.getUuid() + ".raw", new ByteArrayInputStream(bytes)); | ||
String extension = "raw"; | ||
//Try to extract extension from the MIME type if it is provided in value | ||
if (value.toString().indexOf("data:") == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above test is a bit confusing at the first glance. I thought you are testing for absence of mime type with a return value of 0. It took me time to discover that you are actually checking if it starts with it. Don't you think startsWith would be clearer?
f9c73bb
to
2a4407f
Compare
Hello reviewer,
I'd like to have this reviewed.
link to ticket https://issues.openmrs.org/browse/RESTWS-641