diff options
author | 2017-07-18 16:51:51 -0700 | |
---|---|---|
committer | 2017-07-18 17:02:27 -0700 | |
commit | a308a327884920cbb1e3e62964c4b5a01c29af8c (patch) | |
tree | 4bd09065c52f18685dc9e10d9eabdcdb29a51539 /runtime/class_loader_context_test.cc | |
parent | bacafb19fa654fb6c7ad610305bed45c2e4682e8 (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/class_loader_context_test.cc')
-rw-r--r-- | runtime/class_loader_context_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/class_loader_context_test.cc b/runtime/class_loader_context_test.cc index 1b46f67215..a87552d5dc 100644 --- a/runtime/class_loader_context_test.cc +++ b/runtime/class_loader_context_test.cc @@ -488,4 +488,12 @@ TEST_F(ClassLoaderContextTest, VerifyClassLoaderContextMatchAfterEncoding) { ASSERT_TRUE(context->VerifyClassLoaderContextMatch(context->EncodeContextForOatFile(""))); } +TEST_F(ClassLoaderContextTest, VerifyClassLoaderContextMatchAfterEncodingMultidex) { + jobject class_loader = LoadDexInPathClassLoader("MultiDex", nullptr); + + std::unique_ptr<ClassLoaderContext> context = CreateContextForClassLoader(class_loader); + + ASSERT_TRUE(context->VerifyClassLoaderContextMatch(context->EncodeContextForOatFile(""))); +} + } // namespace art |