Skip to content

Commit

Permalink
Issue postmanlabs#155 pure java codegen: cleaning up: removing commen…
Browse files Browse the repository at this point in the history
…ted code lines
  • Loading branch information
virenderm01 committed May 29, 2020
1 parent d877b24 commit c20afa9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions codegens/java-native/lib/javanative.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ function makeSnippet (request, indentString, options) {
snippet += 'con.setRequestProperty("Content-Type", "application/json");\n';
}
let requestBody = (request.body ? request.body.toJSON() : {});
// snippet for creating mediatype object in java based on content-type of request
// snippet += `con.setRequestProperty("Content-Type", "${parseRequest.parseContentType(request)}");\n`
snippet += parseRequest.parseBody(requestBody, indentString, options.trimRequestBody);
}

Expand Down
2 changes: 0 additions & 2 deletions codegens/java-native/lib/parseRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,11 @@ function parseBody (requestBody, indentString, trimFields) {
'out.close();\n';
return snippet;
case 'formdata':
// snippet += generateBoilerPlateHeader();
snippet += requestBody.formdata.length ?
generateBoilerPlateHeader() + parseFormData(requestBody, indentString, trimFields) +
generateBoilerPlateFooter() :
'out.writeBytes("{}");\n' +
'out.close();\n';
// snippet += generateBoilerPlateFooter();
return snippet;

case 'file':
Expand Down

0 comments on commit c20afa9

Please sign in to comment.