Skip to content

Added the control to use self closing tag in XML module and added two unit cases to test the same. - #754

Closed
madhavgupta2011 wants to merge 1 commit into
stleary:masterfrom
madhavgupta2011:master
Closed

madhavgupta2011 wants to merge 1 commit into
stleary:masterfrom
madhavgupta2011:master

Conversation

@madhavgupta2011

Copy link
Copy Markdown

Added the control to use self closing tag in XML module and added two unit cases to test the same.

@stleary

stleary commented Jul 11, 2023

Copy link
Copy Markdown
Owner
  • Tests are failing, please fix.
  • The default behavior should not change. Instead, try adding a property to XMLParserConfiguration to allow the developer to change the empty tag behavior. This object is passed to the private XML toString() method, so you don't need to add another parameter.

@madhavgupta2011

Copy link
Copy Markdown
Author

Sure. Will do it. Thanks @stleary

sb.append(key);
sb.append("/>");
if(indentFactor > 0){
if (!keepSelfClosingTags) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if (!condition) code1 else code2

can be replaces with

if (condition) code2 else code1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah, sure. I'll change it. I am thinking to change my approach though.

@javadev

javadev commented Jul 24, 2023

Copy link
Copy Markdown
Contributor
[INFO] Finished at: 2023-07-11T12:12:16Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project json: Compilation failure
Error:  /home/runner/work/JSON-java/JSON-java/src/test/java/org/json/junit/XMLTest.java:[1325,33] error: no suitable method found for toString(JSONObject,boolean)

@javadev

javadev commented Aug 24, 2023

Copy link
Copy Markdown
Contributor

Since July 24, there have been no changes. Therefore, I believe it would be appropriate to consider canceling the pull request.

@stleary

stleary commented Aug 24, 2023

Copy link
Copy Markdown
Owner

@madhavgupta2011 Are you able to make the recommended corrections for this PR?
Do you think there is still a need for this change?

@stleary

stleary commented Oct 5, 2023

Copy link
Copy Markdown
Owner

Thanks, but not accepting this PR. The issue has been reopened.

@stleary stleary closed this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants