ART: Ignore repeated field indexes when loading a class.

This provides a deterministic behavior for classes with
duplicate field indexes in class_data_item and avoids
failures when verifying the field ordering in debug build.

Regression test not feasible without hand-edited dex file.
(Smali deduplicates field definitions.)

Bug: 21868015
Change-Id: I4f97ba005e063686f8f44248ed7f1286d987888a
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index c1c7123..d30fac4 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -1113,9 +1113,8 @@
 void ClassDataItemIterator::ReadClassDataField() {
   field_.field_idx_delta_ = DecodeUnsignedLeb128(&ptr_pos_);
   field_.access_flags_ = DecodeUnsignedLeb128(&ptr_pos_);
-  if (last_idx_ != 0 && field_.field_idx_delta_ == 0) {
-    LOG(WARNING) << "Duplicate field in " << dex_file_.GetLocation();
-  }
+  // The user of the iterator is responsible for checking if there
+  // are unordered or duplicate indexes.
 }
 
 void ClassDataItemIterator::ReadClassDataMethod() {