Remove unreachable code in DexLocationToOdexFilename.
Test: test-art-host
Change-Id: I855a58e18fba66555576cc663f4c0631b9dc4ac6
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 3396ce0..db6f8ee 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -640,15 +640,8 @@
std::string dir = location.substr(0, pos+1);
dir += "oat/" + std::string(GetInstructionSetString(isa));
- // Find the file portion of the dex location.
- std::string file;
- if (pos == std::string::npos) {
- file = location;
- } else {
- file = location.substr(pos+1);
- }
-
// Get the base part of the file without the extension.
+ std::string file = location.substr(pos+1);
pos = file.rfind('.');
if (pos == std::string::npos) {
*error_msg = "Dex location " + location + " has no extension.";