Skip to content

Commit dc01235

Browse files
removed comment from DefaultOption
1 parent fdc2e43 commit dc01235

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/contentstack/utils/AutomateCommon.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,9 @@ private AutomateCommon() {
3131
/**
3232
* Find dot separated keys
3333
*
34-
* @param entryObj
35-
* Json Object
36-
* @param path
37-
* keyPath
38-
* @param contentCallback
39-
* content callback
34+
* @param entryObj Json Object
35+
* @param path keyPath
36+
* @param contentCallback content callback
4037
*/
4138
protected static void findContent(JSONObject entryObj, String path, ContentCallback contentCallback) {
4239
String[] arrayString = path.split("\\.");
@@ -45,12 +42,9 @@ protected static void findContent(JSONObject entryObj, String path, ContentCallb
4542

4643

4744
/**
48-
* @param arrayString
49-
* list of keys available
50-
* @param entryObj
51-
* entry object
52-
* @param contentCallback
53-
* content callback
45+
* @param arrayString list of keys available
46+
* @param entryObj entry object
47+
* @param contentCallback content callback
5448
*/
5549
private static void getContent(String[] arrayString, JSONObject entryObj, ContentCallback contentCallback) {
5650
if (arrayString != null && arrayString.length != 0) {

src/main/java/com/contentstack/utils/render/DefaultOption.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ private String escapeInjectHtml(JSONObject nodeObj, String nodeType) {
7070
@Override
7171
public String renderNode(String nodeType, JSONObject nodeObject, NodeCallback callback) {
7272

73-
// Get attributes from the nodeObject and render/stringfy using for look by extracting the attributes using key-value pair
74-
// Like below
75-
// attributes = <type>
76-
// <type key="value" key="value"> </type>
77-
// <type key="value" key="value"> </type>
78-
// </type>
79-
80-
// output nodeObject = attributes
81-
8273
String strAttrs = strAttrs(nodeObject);
8374

8475

@@ -146,7 +137,7 @@ String strAttrs(JSONObject nodeObject) {
146137
StringBuilder result = new StringBuilder();
147138
if (nodeObject.has("attrs")) {
148139
JSONObject attrsObject = nodeObject.optJSONObject("attrs");
149-
if (attrsObject != null && attrsObject.length() > 0) {
140+
if (attrsObject != null && !attrsObject.isEmpty()) {
150141
for (String key : attrsObject.keySet()) {
151142
String value = attrsObject.getString(key);
152143
String[] ignoreKeys = {"href", "asset-link", "src", "url"};

0 commit comments

Comments
 (0)