From 60b149e3017fe1b56b9f73ae0ea61d3f1bfba905 Mon Sep 17 00:00:00 2001 From: f43nd1r Date: Thu, 25 Jan 2018 02:44:02 +0100 Subject: [PATCH] fix bug equality --- src/main/java/com/faendir/acra/sql/model/App.java | 1 + src/main/java/com/faendir/acra/ui/view/tabs/PropertiesTab.java | 2 +- src/main/java/com/faendir/acra/util/Utils.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/faendir/acra/sql/model/App.java b/src/main/java/com/faendir/acra/sql/model/App.java index a3518ae..124fcd5 100644 --- a/src/main/java/com/faendir/acra/sql/model/App.java +++ b/src/main/java/com/faendir/acra/sql/model/App.java @@ -36,6 +36,7 @@ public class App { public App(@NonNull String name, @NonNull User reporter) { this.name = name; this.reporter = reporter; + this.configuration = new Configuration(); } public int getId() { diff --git a/src/main/java/com/faendir/acra/ui/view/tabs/PropertiesTab.java b/src/main/java/com/faendir/acra/ui/view/tabs/PropertiesTab.java index 995d312..092a605 100644 --- a/src/main/java/com/faendir/acra/ui/view/tabs/PropertiesTab.java +++ b/src/main/java/com/faendir/acra/ui/view/tabs/PropertiesTab.java @@ -110,7 +110,7 @@ public class PropertiesTab implements MyTabSheet.Tab { if (stacktrace.equals(report.getBug().getStacktrace())) { bug = report.getBug(); } else { - bug = new Bug(app, stacktrace, report.getVersionCode(), report.getDate()); + bug = bugRepository.save(new Bug(app, stacktrace, report.getVersionCode(), report.getDate())); } } report.setBug(bug); diff --git a/src/main/java/com/faendir/acra/util/Utils.java b/src/main/java/com/faendir/acra/util/Utils.java index a779bdc..3641c8c 100644 --- a/src/main/java/com/faendir/acra/util/Utils.java +++ b/src/main/java/com/faendir/acra/util/Utils.java @@ -60,7 +60,7 @@ public final class Utils { StringBuilder output = new StringBuilder(); Pattern headLinePattern = Pattern.compile("^([\\w.]+)(:(.*))?$"); Pattern tracePattern = Pattern.compile("^\\s*at\\s+([\\w.$_]+)\\.([\\w$_]+)\\((.*)\\)$"); - Pattern sourcePattern = Pattern.compile("^(android\\..*:)(\\d+)$"); + Pattern sourcePattern = Pattern.compile("^((android|java)\\..*:)(\\d+)$"); Pattern instancePattern = Pattern.compile("(([a-z_$][a-z0-9_$]*\\.)+[a-zA-Z_$][a-zA-Z0-9_$]*@)([a-fA-F0-9]+)"); while (lines.size() > 0) { String line;