Mercurial > hg > truffle
comparison src/share/vm/oops/constantPoolOop.cpp @ 4862:f457154eee8b
7140882: Don't return booleans from methods returning pointers
Summary: Changed "return false" to "return NULL"
Reviewed-by: dholmes, rottenha
Contributed-by: dbhole@redhat.com
author | brutisso |
---|---|
date | Mon, 30 Jan 2012 12:36:49 +0100 |
parents | f08d439fab8c |
children | 33df1aeaebbf 1d7922586cf6 |
comparison
equal
deleted
inserted
replaced
4860:34e2e90e7182 | 4862:f457154eee8b |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
267 | 267 |
268 | 268 |
269 methodOop constantPoolOopDesc::method_at_if_loaded(constantPoolHandle cpool, | 269 methodOop constantPoolOopDesc::method_at_if_loaded(constantPoolHandle cpool, |
270 int which, Bytecodes::Code invoke_code) { | 270 int which, Bytecodes::Code invoke_code) { |
271 assert(!constantPoolCacheOopDesc::is_secondary_index(which), "no indy instruction here"); | 271 assert(!constantPoolCacheOopDesc::is_secondary_index(which), "no indy instruction here"); |
272 if (cpool->cache() == NULL) return false; // nothing to load yet | 272 if (cpool->cache() == NULL) return NULL; // nothing to load yet |
273 int cache_index = which - CPCACHE_INDEX_TAG; | 273 int cache_index = which - CPCACHE_INDEX_TAG; |
274 if (!(cache_index >= 0 && cache_index < cpool->cache()->length())) { | 274 if (!(cache_index >= 0 && cache_index < cpool->cache()->length())) { |
275 if (PrintMiscellaneous && (Verbose||WizardMode)) { | 275 if (PrintMiscellaneous && (Verbose||WizardMode)) { |
276 tty->print_cr("bad operand %d for %d in:", which, invoke_code); cpool->print(); | 276 tty->print_cr("bad operand %d for %d in:", which, invoke_code); cpool->print(); |
277 } | 277 } |