Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/src/main/java/com/retrozinndev/jsonutils/JSONBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ protected File makeEmptyJSON(File jsonFile) {
* @return
* A JSON representation of the wrote file containing the data.
*/
public JSON makeJSON() {
public File makeJSON() {
if(!jsonFile.exists()) { makeEmptyJSON(jsonFile); }
boolean hasModifications = queuedJSONChanges.size() > 0;
if(hasModifications)
writeJSON(jsonFile);
else
Message.send(Type.Alert, "No modifications were found for the json object. Skipping write.");

return null;
return jsonFile;
}

public JSONBuilder newVariable(String keyString, boolean value) {
Expand Down