mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #7378 from rcordovano/develop
7673 source code file reformatting
This commit is contained in:
commit
003fdda95b
@ -188,7 +188,7 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser {
|
||||
switch (xryKey) {
|
||||
case TEL:
|
||||
case NUMBER:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -206,14 +206,14 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser {
|
||||
// Although confusing, as these are also 'name spaces', it appears
|
||||
// later versions of XRY just made these standardized lines.
|
||||
case TO:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
calleeList.add(pair.getValue());
|
||||
break;
|
||||
case FROM:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -263,7 +263,6 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser {
|
||||
|
||||
// Make sure we have the required fields, otherwise the CommHelper will
|
||||
// complain about illegal arguments.
|
||||
|
||||
// These are all the invalid combinations.
|
||||
if (callerId == null && calleeList.isEmpty()
|
||||
|| direction == CommunicationDirection.INCOMING && callerId == null
|
||||
@ -307,7 +306,6 @@ final class XRYCallsFileParser extends AbstractSingleEntityParser {
|
||||
logger.log(Level.WARNING, String.format("Invalid account identifier %s", phone), ex);
|
||||
}
|
||||
|
||||
|
||||
otherAttributes.add(new BlackboardAttribute(
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER,
|
||||
PARSER_NAME, phone));
|
||||
|
@ -95,6 +95,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* Indicates if the display name of the XRY key is a recognized type.
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean contains(String name) {
|
||||
@ -114,6 +115,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* contains() before hand.
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static XryKey fromDisplayName(String name) {
|
||||
@ -149,6 +151,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* type.
|
||||
*
|
||||
* @param xryNamespace
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean contains(String xryNamespace) {
|
||||
@ -169,6 +172,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* contains() before hand.
|
||||
*
|
||||
* @param xryNamespace
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static XryNamespace fromDisplayName(String xryNamespace) {
|
||||
@ -206,6 +210,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* Indicates if the display name of the XRY key is a recognized type.
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean contains(String name) {
|
||||
@ -225,6 +230,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* contains() before hand.
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static XryMetaKey fromDisplayName(String name) {
|
||||
@ -255,7 +261,9 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* @param reader The XRYFileReader that reads XRY entities from the
|
||||
* Message-SMS report.
|
||||
* @param parent The parent Content to create artifacts from.
|
||||
* @throws IOException If an I/O error is encountered during report reading
|
||||
*
|
||||
* @throws IOException If an I/O error is encountered during report
|
||||
* reading
|
||||
* @throws TskCoreException If an error during artifact creation is
|
||||
* encountered.
|
||||
*/
|
||||
@ -287,7 +295,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
final String threadId = null;
|
||||
final Collection<BlackboardAttribute> otherAttributes = new ArrayList<>();
|
||||
|
||||
for(XRYKeyValuePair pair : pairs) {
|
||||
for (XRYKeyValuePair pair : pairs) {
|
||||
XryNamespace namespace = XryNamespace.NONE;
|
||||
if (XryNamespace.contains(pair.getNamespace())) {
|
||||
namespace = XryNamespace.fromDisplayName(pair.getNamespace());
|
||||
@ -298,14 +306,14 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
switch (key) {
|
||||
case TEL:
|
||||
case NUMBER:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Apply namespace or direction
|
||||
if(namespace == XryNamespace.FROM || direction == CommunicationDirection.INCOMING) {
|
||||
if (namespace == XryNamespace.FROM || direction == CommunicationDirection.INCOMING) {
|
||||
senderId = pair.getValue();
|
||||
} else if(namespace == XryNamespace.TO || direction == CommunicationDirection.OUTGOING) {
|
||||
} else if (namespace == XryNamespace.TO || direction == CommunicationDirection.OUTGOING) {
|
||||
recipientIdsList.add(pair.getValue());
|
||||
} else {
|
||||
try {
|
||||
@ -323,14 +331,14 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
// Although confusing, as these are also 'name spaces', it appears
|
||||
// later versions of XRY just made these standardized lines.
|
||||
case FROM:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
senderId = pair.getValue();
|
||||
break;
|
||||
case TO:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -406,7 +414,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
}
|
||||
break;
|
||||
case SERVICE_CENTER:
|
||||
if(!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
if (!XRYUtils.isPhoneValid(pair.getValue())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -437,8 +445,8 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts all pairs from the XRY Entity. This function
|
||||
* will unify any segmented text, if need be.
|
||||
* Extracts all pairs from the XRY Entity. This function will unify any
|
||||
* segmented text, if need be.
|
||||
*/
|
||||
private List<XRYKeyValuePair> getXRYKeyValuePairs(String xryEntity,
|
||||
XRYFileReader reader, Set<Integer> referenceValues) throws IOException {
|
||||
@ -509,9 +517,12 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
* single artifact.
|
||||
*
|
||||
* @param reader File reader that is producing XRY entities.
|
||||
* @param referenceNumbersSeen All known references numbers up until this point.
|
||||
* @param referenceNumbersSeen All known references numbers up until this
|
||||
* point.
|
||||
* @param xryEntity The source XRY entity.
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
private String getSegmentedText(String[] xryEntity, XRYFileReader reader,
|
||||
@ -605,6 +616,7 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
*
|
||||
* @param xryLines XRY entity to extract from.
|
||||
* @param metaKey The key type to extract.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Optional<Integer> getMetaKeyValue(String[] xryLines, XryMetaKey metaKey) {
|
||||
@ -629,10 +641,12 @@ final class XRYMessagesFileParser implements XRYFileParser {
|
||||
/**
|
||||
* Extracts the ith XRY Key Value pair in the XRY Entity.
|
||||
*
|
||||
* The total number of pairs can be determined via getCountOfKeyValuePairs().
|
||||
* The total number of pairs can be determined via
|
||||
* getCountOfKeyValuePairs().
|
||||
*
|
||||
* @param xryLines XRY entity.
|
||||
* @param index The requested Key Value pair.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Optional<XRYKeyValuePair> getKeyValuePairByIndex(String[] xryLines, int index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user