mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-28 00:38:56 +00:00
cleaning up comments
This commit is contained in:
parent
1c5bf6a48c
commit
d43db09c44
@ -101,15 +101,31 @@ public final class JsonUtils {
|
|||||||
|
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for the JSON Object that is associated with the elementName value
|
||||||
|
* mapped in the associated JSON file.
|
||||||
|
* Default {@link java.nio.charset.Charset} is UTF 8
|
||||||
|
*
|
||||||
|
* @param jsonFilename the object holding the name of the file in classpath to parse.
|
||||||
|
* @param elementName the specific object to pull from the file
|
||||||
|
* @return a JSON object
|
||||||
|
*/
|
||||||
public static JsonObject getSpecificJsonObject(final String jsonFilename, final String elementName) {
|
public static JsonObject getSpecificJsonObject(final String jsonFilename, final String elementName) {
|
||||||
// find the file and load it
|
// find the file and load it
|
||||||
return getSpecificJsonObject(jsonFilename, elementName, StandardCharsets.UTF_8);
|
return getSpecificJsonObject(jsonFilename, elementName, StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for the JSON Object that is associated with the elementName value
|
||||||
|
* mapped in the associated JSON file.
|
||||||
|
* Default {@link java.nio.charset.Charset} is UTF 8
|
||||||
|
*
|
||||||
|
* @param jsonFilename the object holding the name of the file in classpath to parse.
|
||||||
|
* @param elementName the specific object to pull from the file
|
||||||
|
* @param charset the character set to use
|
||||||
|
* @return a JSON object
|
||||||
|
*/
|
||||||
public static JsonObject getSpecificJsonObject(final String jsonFilename,
|
public static JsonObject getSpecificJsonObject(final String jsonFilename,
|
||||||
final String elementName,
|
final String elementName,
|
||||||
final Charset charset) {
|
final Charset charset) {
|
||||||
@ -123,10 +139,24 @@ public final class JsonUtils {
|
|||||||
return new JsonObject();
|
return new JsonObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for the JSON Object that is mapped in the associated JSON file.
|
||||||
|
* Default {@link java.nio.charset.Charset} is UTF 8
|
||||||
|
*
|
||||||
|
* @param jsonFilename the object holding the name of the file in classpath to parse.
|
||||||
|
* @return a JSON object
|
||||||
|
*/
|
||||||
public static JsonObject getJsonObject(final String jsonFilename) {
|
public static JsonObject getJsonObject(final String jsonFilename) {
|
||||||
return getJsonObject(jsonFilename, StandardCharsets.UTF_8);
|
return getJsonObject(jsonFilename, StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter for the JSON Object that is mapped in the associated JSON file.
|
||||||
|
*
|
||||||
|
* @param jsonFilename the object holding the name of the file in classpath to parse.
|
||||||
|
* @param charset the character set to use
|
||||||
|
* @return a JSON object
|
||||||
|
*/
|
||||||
public static JsonObject getJsonObject(final String jsonFilename, final Charset charset) {
|
public static JsonObject getJsonObject(final String jsonFilename, final Charset charset) {
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
|
|
||||||
|
@ -88,8 +88,7 @@ public class UefiGuid {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// could not access vendor-table.json from filesystem, so attempt to access from code
|
// could not access vendor-table.json from filesystem, so attempt to access from code
|
||||||
uefiVendorRef = JsonUtils.getSpecificJsonObject(JSON_FILENAME, "VendorTable",
|
uefiVendorRef = JsonUtils.getSpecificJsonObject(JSON_FILENAME, "VendorTable");
|
||||||
StandardCharsets.UTF_8);
|
|
||||||
if(!isVendorTableReferenceHandleEmpty()) {
|
if(!isVendorTableReferenceHandleEmpty()) {
|
||||||
vendorTableFileStatus = FILESTATUS_FROM_CODE;
|
vendorTableFileStatus = FILESTATUS_FROM_CODE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user