-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from Open-MBEE/release/5.0.1
Release/5.0.1
- Loading branch information
Showing
10 changed files
with
101 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/main/java/gov/nasa/jpl/mbee/mdk/json/TempFileJsonFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package gov.nasa.jpl.mbee.mdk.json; | ||
|
||
import com.fasterxml.jackson.core.JsonFactory; | ||
import com.fasterxml.jackson.core.JsonParser; | ||
import com.fasterxml.jackson.core.util.JsonParserDelegate; | ||
import com.fasterxml.jackson.databind.MappingJsonFactory; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import gov.nasa.jpl.mbee.mdk.json.JacksonUtils; | ||
import gov.nasa.jpl.mbee.mdk.options.MDKOptionsGroup; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Objects; | ||
|
||
class TempFileJsonFactory extends MappingJsonFactory { | ||
|
||
public TempFileJsonFactory() { | ||
super(); | ||
} | ||
|
||
public TempFileJsonFactory(ObjectMapper mapper) { | ||
super(mapper); | ||
} | ||
|
||
public TempFileJsonFactory(JsonFactory src, ObjectMapper mapper) { | ||
super(src, mapper); | ||
} | ||
|
||
@Override | ||
public JsonParser createParser(File file) throws IOException { | ||
return new TempFileJsonParser(super.createParser(file), file); | ||
} | ||
|
||
private static class TempFileJsonParser extends JsonParserDelegate { | ||
|
||
private final File file; | ||
|
||
public TempFileJsonParser(JsonParser d, File file) { | ||
super(d); | ||
this.file = file; | ||
} | ||
|
||
@Override | ||
public void close() throws IOException { | ||
if (file != null && (MDKOptionsGroup.getMDKOptions().isLogJson() || !file.delete())) { | ||
file.deleteOnExit(); | ||
} | ||
super.close(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 0 additions & 85 deletions
85
src/main/java/gov/nasa/jpl/mbee/mdk/mms/actions/ValidateElementDepthAction.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters