Skip to content

Commit c1bf8d8

Browse files
authored
Merge pull request #9 from retrozinndev/devel
💥 fix: return a File instead of null
2 parents e685f91 + e61cc61 commit c1bf8d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/main/java/com/retrozinndev/jsonutils/JSONBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ protected File makeEmptyJSON(File jsonFile) {
157157
* @return
158158
* A JSON representation of the wrote file containing the data.
159159
*/
160-
public JSON makeJSON() {
160+
public File makeJSON() {
161161
if(!jsonFile.exists()) { makeEmptyJSON(jsonFile); }
162162
boolean hasModifications = queuedJSONChanges.size() > 0;
163163
if(hasModifications)
164164
writeJSON(jsonFile);
165165
else
166166
Message.send(Type.Alert, "No modifications were found for the json object. Skipping write.");
167167

168-
return null;
168+
return jsonFile;
169169
}
170170

171171
public JSONBuilder newVariable(String keyString, boolean value) {

0 commit comments

Comments
 (0)