Make methods and fields accessible by default in art.

This also fixes a corner-case bug where calling Field.setBoolean()
on a non-boolean field would crash the runtime.

Change-Id: I2f6693e3c3fe3bf23b4761335300506b3fbd3008
diff --git a/src/java_lang_reflect_Field.cc b/src/java_lang_reflect_Field.cc
index b23a29e..7e66dd9 100644
--- a/src/java_lang_reflect_Field.cc
+++ b/src/java_lang_reflect_Field.cc
@@ -194,6 +194,11 @@
   if (!CheckReceiver(env, javaObj, javaDeclaringClass, f, o)) {
     return;
   }
+  if (f->GetPrimitiveType() == Primitive::kPrimNot) {
+    Thread::Current()->ThrowNewExceptionF("Ljava/lang/IllegalArgumentException;",
+        "Not a primitive field: %s", PrettyField(f).c_str());
+    return;
+  }
 
   // Widen the value if necessary (and possible).
   JValue wide_value;