summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2023-01-18 12:59:23 +0000
committer Paul Duffin <paulduffin@google.com> 2023-01-18 12:59:23 +0000
commit0f386bc12bc11ab76fc151ef06d00dd91478d4bb (patch)
tree6456d03b25ff9b5104e3e3ee837622c8a242ee41
parentee37e8e8ed84cfd495b76348c7ed7e210d0df60f (diff)
Allow obfuscated classes on bootclasspath
Previously, the signature_trie python library would reject classes which started with a lower case character which in turn caused the verify_overlaps tool to fail. That meant that it was impossible to add obfuscated classes (which commonly used lower case characters for their name) from being used on the bootclasspath. This change removes that restriction and the accompanying test. Bug: 265833521 Test: TH and partner testing Change-Id: I70710484e427f64d79fb30301f3413f3b67b27e7
-rw-r--r--scripts/hiddenapi/signature_trie.py4
-rwxr-xr-xscripts/hiddenapi/signature_trie_test.py8
2 files changed, 0 insertions, 12 deletions
diff --git a/scripts/hiddenapi/signature_trie.py b/scripts/hiddenapi/signature_trie.py
index 3650fa159..2ff0c5f24 100644
--- a/scripts/hiddenapi/signature_trie.py
+++ b/scripts/hiddenapi/signature_trie.py
@@ -150,10 +150,6 @@ class InteriorNode(Node):
f"wildcard '{last_element}' and "
f"member signature '{member[0]}'")
wildcard = [last_element]
- elif last_element.islower():
- raise Exception(f"Invalid signature '{signature}': last element "
- f"'{last_element}' is lower case but should be an "
- f"upper case class name or wildcard")
else:
packages = elements[0:-1]
# Split the class name into outer / inner classes
diff --git a/scripts/hiddenapi/signature_trie_test.py b/scripts/hiddenapi/signature_trie_test.py
index 6d4e660e3..bd4a9a8de 100755
--- a/scripts/hiddenapi/signature_trie_test.py
+++ b/scripts/hiddenapi/signature_trie_test.py
@@ -117,14 +117,6 @@ class TestSignatureToElements(unittest.TestCase):
self.assertEqual(elements, self.signature_to_elements(signature))
self.assertEqual(signature, self.elements_to_signature(elements))
- def test_invalid_no_class_or_wildcard(self):
- signature = "java/lang"
- with self.assertRaises(Exception) as context:
- self.signature_to_elements(signature)
- self.assertIn(
- "last element 'lang' is lower case but should be an "
- "upper case class name or wildcard", str(context.exception))
-
def test_non_standard_class_name(self):
elements = [
("package", "javax"),