summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-04-21 16:50:40 -0700
committerMathieu Chartier <mathieuc@google.com>2015-04-22 12:44:27 -0700
commit2cebb24bfc3247d3e9be138a3350106737455918 (patch)
treed04d27d21b3c7733d784e303f01f873bb99e7770 /runtime/entrypoints/entrypoint_utils.cc
parent1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff)
downloadandroid_art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz
android_art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2
android_art-2cebb24bfc3247d3e9be138a3350106737455918.zip
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 768f5052d4..ce5673923f 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -44,9 +44,9 @@ static inline mirror::Class* CheckFilledNewArrayAlloc(uint32_t type_idx,
return nullptr; // Failure
}
mirror::Class* klass = referrer->GetDexCacheResolvedType<false>(type_idx);
- if (UNLIKELY(klass == NULL)) { // Not in dex cache so try to resolve
+ if (UNLIKELY(klass == nullptr)) { // Not in dex cache so try to resolve
klass = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, referrer);
- if (klass == NULL) { // Error
+ if (klass == nullptr) { // Error
DCHECK(self->IsExceptionPending());
return nullptr; // Failure
}
@@ -231,13 +231,13 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons
// Build argument array possibly triggering GC.
soa.Self()->AssertThreadSuspensionIsAllowable();
- jobjectArray args_jobj = NULL;
+ jobjectArray args_jobj = nullptr;
const JValue zero;
int32_t target_sdk_version = Runtime::Current()->GetTargetSdkVersion();
// Do not create empty arrays unless needed to maintain Dalvik bug compatibility.
if (args.size() > 0 || (target_sdk_version > 0 && target_sdk_version <= 21)) {
- args_jobj = soa.Env()->NewObjectArray(args.size(), WellKnownClasses::java_lang_Object, NULL);
- if (args_jobj == NULL) {
+ args_jobj = soa.Env()->NewObjectArray(args.size(), WellKnownClasses::java_lang_Object, nullptr);
+ if (args_jobj == nullptr) {
CHECK(soa.Self()->IsExceptionPending());
return zero;
}
@@ -249,7 +249,7 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons
JValue jv;
jv.SetJ(args.at(i).j);
mirror::Object* val = BoxPrimitive(Primitive::GetType(shorty[i + 1]), jv);
- if (val == NULL) {
+ if (val == nullptr) {
CHECK(soa.Self()->IsExceptionPending());
return zero;
}
@@ -270,7 +270,7 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons
// Unbox result and handle error conditions.
if (LIKELY(!soa.Self()->IsExceptionPending())) {
- if (shorty[0] == 'V' || (shorty[0] == 'L' && result == NULL)) {
+ if (shorty[0] == 'V' || (shorty[0] == 'L' && result == nullptr)) {
// Do nothing.
return zero;
} else {
@@ -315,7 +315,7 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons
}
if (!declares_exception) {
soa.Self()->ThrowNewWrappedException("Ljava/lang/reflect/UndeclaredThrowableException;",
- NULL);
+ nullptr);
}
}
return zero;