Skip to content

Commit c141ba8

Browse files
shaileshmishrashaileshmishra
authored andcommitted
code improved
1 parent e31b187 commit c141ba8

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ private JSONObject findEntryByPath(JSONObject entryObj, String path) {
6767
* @param renderObject renderObjects
6868
*/
6969
public void render(JSONArray jsonArray, String[] keyPath, Options renderObject){
70-
jsonArray.forEach(jsonObj->{
71-
render((JSONObject) jsonObj, keyPath, renderObject);
72-
});
70+
jsonArray.forEach(jsonObj-> render((JSONObject) jsonObj, keyPath, renderObject));
7371
}
7472

7573

@@ -87,16 +85,11 @@ public static String renderContent(String rteStringify, JSONObject embedObject,
8785
getEmbeddedObjects(html, metadata -> {
8886

8987
Optional<JSONObject> filteredContent = Optional.empty();
90-
// Find the type of _embedded object
91-
//if (metadata.getItemType().equalsIgnoreCase("entry")) {
9288
boolean available = embedObject.has("_embedded_items");
9389
if (available) {
9490
JSONObject jsonArray = embedObject.optJSONObject("_embedded_items");
9591
filteredContent = findEmbeddedItems(jsonArray, metadata);
96-
logger.info("so,.");
9792
}
98-
// }
99-
// check if filteredContent is not null
10093
if (filteredContent.isPresent()) {
10194
JSONObject contentToPass = filteredContent.get();
10295
String stringOption = getStringOption(options, metadata, contentToPass);
@@ -122,7 +115,6 @@ public static JSONArray renderContents(JSONArray rteArray, JSONObject entryObjec
122115
String renderContent = renderContent(stringify, entryObject, options);
123116
jsonArrayRTEContent.put(renderContent);
124117
}
125-
logger.info(jsonArrayRTEContent.toString());
126118
return jsonArrayRTEContent;
127119
}
128120

0 commit comments

Comments
 (0)