Skip to content

Commit

Permalink
Refactor singularize
Browse files Browse the repository at this point in the history
  • Loading branch information
louietyj committed Nov 5, 2016
1 parent 08cf10b commit 64dd751
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ public static boolean[] parseIsTaskEvent(Map<String, String[]> parsedResult) thr
String eventType = null;
if (parsedResult.get("eventType") != null) {
eventType = parsedResult.get("eventType")[0];
// Singularize
eventType = eventType.equals("events") ? "event" : eventType;
eventType = eventType.equals("tasks") ? "task" : eventType;
}
boolean taskStatusPresent = parsedResult.get("taskStatus") == null;
boolean eventStatusPresent = parsedResult.get("eventStatus") == null;

// Singularize eventType
eventType = eventType != null && eventType.equals("events") ? "event" : eventType;
eventType = eventType != null && eventType.equals("tasks") ? "task" : eventType;

if (eventType == null) {
if (!taskStatusPresent && !eventStatusPresent) {
// Condition 1
Expand Down

0 comments on commit 64dd751

Please sign in to comment.