summaryrefslogtreecommitdiff
path: root/runtime/dex_file.h
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2017-07-18 16:51:51 -0700
committer Calin Juravle <calin@google.com> 2017-07-18 17:02:27 -0700
commita308a327884920cbb1e3e62964c4b5a01c29af8c (patch)
tree4bd09065c52f18685dc9e10d9eabdcdb29a51539 /runtime/dex_file.h
parentbacafb19fa654fb6c7ad610305bed45c2e4682e8 (diff)
Change kMultiDexSeparator from ':' to '!'
The ':' separator is commonly used to separate class path elements. That means that we cannot easily encode multidex location in a classpath without complicating the parsing logic unnecessarily (e.g. when encoding classpaths in the oat file). For easy parsing and understanding kMultiDexSeparator and kClassPathSeparator should have different values. ':' is a wide spread classpath separator so this CL changes the value of kMultiDexSeparator to '!' which is also commonly used to denote an object inside a given container. Test: m test-art-host Bug: 38138251 Change-Id: I30995c553d9131478c6c071b27327df6d2de06a7
Diffstat (limited to 'runtime/dex_file.h')
-rw-r--r--runtime/dex_file.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index eb3b210cd1..990ab118e7 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -62,11 +62,11 @@ class DexFile {
static const uint16_t kDexNoIndex16 = 0xFFFF;
// The separator character in MultiDex locations.
- static constexpr char kMultiDexSeparator = ':';
+ static constexpr char kMultiDexSeparator = '!';
// A string version of the previous. This is a define so that we can merge string literals in the
// preprocessor.
- #define kMultiDexSeparatorString ":"
+ #define kMultiDexSeparatorString "!"
// Raw header_item.
struct Header {
@@ -499,7 +499,7 @@ class DexFile {
return GetBaseLocation(location.c_str());
}
- // Returns the ':classes*.dex' part of the dex location. Returns an empty
+ // Returns the '!classes*.dex' part of the dex location. Returns an empty
// string if there is no multidex suffix for the given location.
// The kMultiDexSeparator is included in the returned suffix.
static std::string GetMultiDexSuffix(const std::string& location) {