Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java
diff --git a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java
index d4a18a22ba612e88ab18ebabf6c79bdc23fc070f..08b2a76d925e07b7eb52599036a4b344a941f453 100644
--- a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java
+++ b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TestUtil.java
@@ -232,10 +232,12 @@ import protobuf_unittest.UnittestProto.TestOneof2;
import protobuf_unittest.UnittestProto.TestPackedExtensions;
import protobuf_unittest.UnittestProto.TestPackedTypes;
import protobuf_unittest.UnittestProto.TestUnpackedTypes;
+
+import junit.framework.Assert;
+
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
-import junit.framework.Assert;
/**
* Contains methods for setting all fields of {@code TestAllTypes} to
@@ -258,13 +260,6 @@ public final class TestUtil {
}
/**
- * Dirties the message by resetting the momoized serialized size.
- */
- public static void resetMemoizedSize(AbstractMessage message) {
- message.memoizedSize = -1;
- }
-
- /**
* Get a {@code TestAllTypes} with all fields set as they would be by
* {@link #setAllFields(TestAllTypes.Builder)}.
*/
@@ -3769,8 +3764,7 @@ public final class TestUtil {
private static File getTestDataDir() {
// Search each parent directory looking for "src/google/protobuf".
- File ancestor = new File(System.getProperty("protobuf.dir", "."));
- String initialPath = ancestor.getAbsolutePath();
+ File ancestor = new File(".");
try {
ancestor = ancestor.getCanonicalFile();
} catch (IOException e) {
@@ -3787,7 +3781,7 @@ public final class TestUtil {
throw new RuntimeException(
"Could not find golden files. This test must be run from within the " +
"protobuf source package so that it can read test data files from the " +
- "C++ source tree: " + initialPath);
+ "C++ source tree.");
}
/**

Powered by Google App Engine
This is Rietveld 408576698