aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/cgeo/geocaching/GPXImportActivity.java3
-rw-r--r--tests/src/cgeo/geocaching/test/RegExPerformanceTest.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/GPXImportActivity.java b/main/src/cgeo/geocaching/GPXImportActivity.java
index fcff87a..77cb8de 100644
--- a/main/src/cgeo/geocaching/GPXImportActivity.java
+++ b/main/src/cgeo/geocaching/GPXImportActivity.java
@@ -5,7 +5,6 @@ import cgeo.geocaching.files.GPXImporter;
import android.app.AlertDialog;
import android.content.DialogInterface;
-import android.net.Uri;
import android.os.Bundle;
public class GPXImportActivity extends AbstractActivity {
@@ -24,7 +23,7 @@ public class GPXImportActivity extends AbstractActivity {
.setCancelable(false)
.setPositiveButton(getString(android.R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
- (new GPXImporter(cgList.STANDARD_LIST_ID)).importGPX(GPXImportActivity.this, (Uri) getIntent().getData(), getContentResolver());
+ (new GPXImporter(cgList.STANDARD_LIST_ID)).importGPX(GPXImportActivity.this, getIntent().getData(), getContentResolver());
}
})
.setNegativeButton(getString(android.R.string.no), new DialogInterface.OnClickListener() {
diff --git a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
index 7b51f23..0e2619d 100644
--- a/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
+++ b/tests/src/cgeo/geocaching/test/RegExPerformanceTest.java
@@ -115,7 +115,7 @@ public class RegExPerformanceTest extends TestCase {
diff2 = parse(page, p2, iterations);
output.add("Time pattern 2:\t" + diff2 + " ms");
}
- Float reduction = new Float((float) diff2 * 100 / (float) diff1);
+ Float reduction = new Float((float) diff2 * 100 / diff1);
output.add("New runtime:\t" + String.format("%.1f", reduction) + "%\n");
}