Remove System.out.print's. Replace with Logs where appropriate.
Some were removed and left removed if they were run during tests, because the tests are supposed to be automated and the noise they added would not have helped diagnose a failure. Also removed the dead code around "uses-feature" which will never get implemented, especially as it is in the XML index.
This commit is contained in:
parent
de149cf589
commit
f7d9be9cd5
@ -6,6 +6,7 @@ import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import android.util.Log;
|
||||
|
||||
import org.fdroid.fdroid.AssetUtils;
|
||||
import org.fdroid.fdroid.data.SanitizedFile;
|
||||
@ -30,6 +31,8 @@ import static org.junit.Assume.assumeTrue;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class FileCompatTest {
|
||||
|
||||
private static final String TAG = "FileCompatTest";
|
||||
|
||||
private SanitizedFile sourceFile;
|
||||
private SanitizedFile destFile;
|
||||
|
||||
@ -47,11 +50,11 @@ public class FileCompatTest {
|
||||
@After
|
||||
public void tearDown() {
|
||||
if (!sourceFile.delete()) {
|
||||
System.out.println("Can't delete " + sourceFile.getAbsolutePath() + ".");
|
||||
Log.w(TAG, "Can't delete " + sourceFile.getAbsolutePath() + ".");
|
||||
}
|
||||
|
||||
if (!destFile.delete()) {
|
||||
System.out.println("Can't delete " + destFile.getAbsolutePath() + ".");
|
||||
Log.w(TAG, "Can't delete " + destFile.getAbsolutePath() + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,16 +46,12 @@ public class HttpDownloaderTest {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
String urlString = "https://f-droid.org/repo/index.jar";
|
||||
receivedProgress = false;
|
||||
System.out.println("downloadUninterruptedTestWithProgress: " + urlString);
|
||||
receivedProgress = false;
|
||||
URL url = new URL(urlString);
|
||||
File destFile = File.createTempFile("dl-", "");
|
||||
final HttpDownloader httpDownloader = new HttpDownloader(url, destFile);
|
||||
httpDownloader.setListener(new ProgressListener() {
|
||||
@Override
|
||||
public void onProgress(URL sourceUrl, int bytesRead, int totalBytes) {
|
||||
System.out.println("DownloaderProgressListener.sendProgress "
|
||||
+ sourceUrl + " " + bytesRead + " / " + totalBytes);
|
||||
receivedProgress = true;
|
||||
}
|
||||
});
|
||||
@ -118,7 +114,6 @@ public class HttpDownloaderTest {
|
||||
httpDownloader.setListener(new ProgressListener() {
|
||||
@Override
|
||||
public void onProgress(URL sourceUrl, int bytesRead, int totalBytes) {
|
||||
System.out.println("DownloaderProgressListener.sendProgress " + bytesRead + " / " + totalBytes);
|
||||
receivedProgress = true;
|
||||
latch.countDown();
|
||||
}
|
||||
|
@ -379,9 +379,6 @@ public class RepoXMLHandler extends DefaultHandler {
|
||||
} else {
|
||||
removeRequestedPermission(attributes.getValue("name"));
|
||||
}
|
||||
} else if ("uses-feature".equals(localName) && curapk != null) {
|
||||
System.out.println("TODO startElement " + uri + " " + localName + " " + qName);
|
||||
// TODO
|
||||
}
|
||||
curchars.setLength(0);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.fdroid.fdroid.updater;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
@ -177,7 +178,6 @@ public class IndexV1UpdaterTest extends FDroidProviderTest {
|
||||
Repo.PUSH_REQUEST_ACCEPT_ALWAYS);
|
||||
indexV0Details.apps.size();
|
||||
|
||||
System.out.println("total apps: " + apps.length + " " + indexV0Details.apps.size());
|
||||
assertEquals(indexV0Details.apps.size(), apps.length);
|
||||
assertEquals(apps.length, packages.size());
|
||||
|
||||
@ -336,13 +336,10 @@ public class IndexV1UpdaterTest extends FDroidProviderTest {
|
||||
fields.remove(field);
|
||||
}
|
||||
if (fields.size() > 0) {
|
||||
System.out.print(instance.getClass() + " has fields not setup for Jackson: ");
|
||||
for (String field : fields) {
|
||||
System.out.print("\"" + field + "\", ");
|
||||
}
|
||||
System.out.println("\nRead class javadoc for more info.");
|
||||
String sb = String.valueOf(instance.getClass()) + " has fields not setup for Jackson: " +
|
||||
TextUtils.join(", ", fields) + "\nRead class javadoc for more info.";
|
||||
fail(sb);
|
||||
}
|
||||
assertEquals(0, fields.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -408,7 +405,6 @@ public class IndexV1UpdaterTest extends FDroidProviderTest {
|
||||
}
|
||||
|
||||
private Repo parseRepo(ObjectMapper mapper, JsonParser parser) throws IOException {
|
||||
System.out.println("parseRepo ");
|
||||
parser.nextToken();
|
||||
parser.nextToken();
|
||||
ObjectReader repoReader = mapper.readerFor(Repo.class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user