diff options
author | Sebastien Hertz <shertz@google.com> | 2015-01-13 10:10:40 +0100 |
---|---|---|
committer | Sebastien Hertz <shertz@google.com> | 2015-01-13 20:59:53 +0100 |
commit | e6c143fae8ec487704b3d0d28914cda3d6d19e88 (patch) | |
tree | 270a0f83996e2abc15ab9d6b643f112afc89587e /runtime/jdwp | |
parent | 8fccea249b1a6f1469eeea42c2b2cca06ce1c70d (diff) | |
download | art-e6c143fae8ec487704b3d0d28914cda3d6d19e88.tar.gz art-e6c143fae8ec487704b3d0d28914cda3d6d19e88.tar.bz2 art-e6c143fae8ec487704b3d0d28914cda3d6d19e88.zip |
Fix bootclasspath string initialization
When running the runtime with an image without explicitly specifying
the bootclasspath (with the -Xbootclasspath option), we construct it
from the location of DEX files loaded from the image.
This allows to fix the JDWP test ClassPathsTest#testClassPaths001 on
the host where the bootclasspath is not explicitly specified on the
command line.
Bug: 18812378
Change-Id: I726eafd8b9e59dc9513beeb7082cf086fe89c4b1
Diffstat (limited to 'runtime/jdwp')
-rw-r--r-- | runtime/jdwp/jdwp_handler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc index b294e480b8..a1d2a6c4bf 100644 --- a/runtime/jdwp/jdwp_handler.cc +++ b/runtime/jdwp/jdwp_handler.cc @@ -333,15 +333,15 @@ static JdwpError VM_ClassPaths(JdwpState*, Request*, ExpandBuf* pReply) std::vector<std::string> class_path; Split(Runtime::Current()->GetClassPathString(), ':', &class_path); expandBufAdd4BE(pReply, class_path.size()); - for (size_t i = 0; i < class_path.size(); ++i) { - expandBufAddUtf8String(pReply, class_path[i]); + for (const std::string& str : class_path) { + expandBufAddUtf8String(pReply, str); } std::vector<std::string> boot_class_path; Split(Runtime::Current()->GetBootClassPathString(), ':', &boot_class_path); expandBufAdd4BE(pReply, boot_class_path.size()); - for (size_t i = 0; i < boot_class_path.size(); ++i) { - expandBufAddUtf8String(pReply, boot_class_path[i]); + for (const std::string& str : boot_class_path) { + expandBufAddUtf8String(pReply, str); } return ERR_NONE; |