Skip to content

Commit

Permalink
'#2294: Code formatting and test code removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Oct 8, 2024
1 parent b6fdd23 commit 3c560f1
Showing 1 changed file with 4 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public WAAccount(String id) {
}

public String getTitle() {
return "WhatsApp Account: " + getName(); //$NON-NLS-1$
return "WhatsApp Account: " + getName();
}

public static WAAccount getFromAndroidXml(InputStream is) throws SAXException, IOException {
Expand All @@ -44,7 +44,8 @@ public static WAAccount getFromAndroidXml(InputStream is) throws SAXException, I

XPath xpath = XPathFactory.newInstance().newXPath();

XPathExpression expr = xpath.compile("/map/string[@name=\"com.whatsapp.registration.RegisterPhone.phone_number\"]");
XPathExpression expr = xpath
.compile("/map/string[@name=\"com.whatsapp.registration.RegisterPhone.phone_number\"]");
String value = (String) expr.evaluate(doc, XPathConstants.STRING);
if (StringUtils.isNotBlank(value)) {
String phoneNumber = value;
Expand Down Expand Up @@ -113,7 +114,7 @@ public static WAAccount getFromIOSPlist(InputStream is) throws SAXException, IOE
account.setStatus(value.toString());

return account;
} catch ( PropertyListFormatException | ParseException | ParserConfigurationException e) {
} catch (PropertyListFormatException | ParseException | ParserConfigurationException e) {
throw new RuntimeException(e);
}
}
Expand All @@ -125,24 +126,4 @@ public boolean isUnknown() {
public void setUnknown(boolean isUnknown) {
this.isUnknown = isUnknown;
}

/*
public static void main(String[] args) throws SAXException {
try (FileInputStream fis = new FileInputStream(
"c:/users/nassif/downloads/group.net.whatsapp.WhatsApp.shared.plist")) {
WAAccount a = getFromIOSPlist(fis);
System.out.println(a.getId());
System.out.println(a.getWaName());
System.out.println(a.getStatus());
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
*/


}

0 comments on commit 3c560f1

Please sign in to comment.