Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [transformer-dev] Question about package rename scope
  • From: BJ Hargrave <hargrave@xxxxxxxxxx>
  • Date: Thu, 11 Apr 2024 13:34:50 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AV6UsUIA+R1ONdasTtoCw0clQFnt+8tkvBJEZVgJJvU=; b=Fw6Q9xQW6y6YUwHYwvuFQwLAn/UanHSpnDVU4mOIOoBE5MbflLL82CCHbdnWB2PVNkCwDh72xbNc6Leo1JZaQS9tj2mrn/3MnSgbiIRZ8xBc8xjY3yyNWK8ibCrggXKDQ0T0rmLXTvfsj4E7Ju7pDMw/7g3qhaHSEZuqPXFrR7XF6B/ugRyjf+WFKL7kUDPMlcD/ImZlkW8O6HDzpWPlMQi/+SRCoz45gWfBBaxICSABT5VgJ+uLWRK8NPzqpt05TL5v5Y323evkecaPiUPwCXg8kUIHTPs9NGaRN2QAZsWiaksuwtPqB0L3uq0EuxwkP/SupUek+p31BwAkD9lt7Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=ZqlKIdx4gFwKdJT3OIJi4r4a4/gRElgPWBXKWP4DAEQhM9WjdXMonGcjAIthp6+/ZzK40s2iymWaxemAX8clFon5KOExgGtojCFGACI0ONiGL4ezeBEPQJ6XVAhSnv02xF7NNFceWyAPsaORmVp1UKXM8MswEz/xq2Yk7gmmd1bHs5VFdSTfF5CDsU2GfTx9OHctgQJHijw+RjnjKPq9WvfhAIQ2MvRsD0udeaTLSglHPHPpghC37Q2cmZWPacgTlJiJTxItmixZcgdDybCBmA7ppuJ62KX9BMYKkJufUhdtMfW7XregxVX2FSj5+ZhFt25/pFRg+yrjdd4xd4quxA==
  • Delivered-to: transformer-dev@xxxxxxxxxxx
  • List-archive: <>
  • List-help: <>
  • List-subscribe: <>, <>
  • List-unsubscribe: <>, <>
  • Thread-index: AQHai/qFylmJd7V1VUqcWEW2pDVoXLFjEXIZ
  • Thread-topic: [EXTERNAL] [transformer-dev] Question about package rename scope

Transformer does not need the old or new packages on the classpath to transform. It uses the information in the transformation rules to determine the mapping from old package names to new package names and processes the class files in the artifact being transformed. This is primarily done by mutating the constant pool in the class file to use the new names instead of the old names.



BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
Open Source Development // mobile: +1 386 848 3788




From: transformer-dev <transformer-dev-bounces@xxxxxxxxxxx> on behalf of jan luehe via transformer-dev <transformer-dev@xxxxxxxxxxx>
Date: Thursday, April 11, 2024 at 06:25
To: transformer-dev@xxxxxxxxxxx <transformer-dev@xxxxxxxxxxx>
Cc: jan luehe <janluehe@xxxxxxxxx>
Subject: [EXTERNAL] [transformer-dev] Question about package rename scope

Is my assumption correct that in order for the transformer to be able to apply the package rename rules at,


This Message Is From an External Sender

This message came from outside your organization.



Is my assumption correct that in order for the transformer to be able to apply the package rename rules at, the target packages of the renames ("newPackageName", e.g., jakarta.servlet), must already exist on the class path of the hosting app, so that the renamed references can be correctly resolved? 


For example, if the hosting app still has jakarta.servlet-api-4.0.4.jar (which provides the "old" javax.servlet) on its class path, then the rename rule from javax.servlet to jakarta.servlet will fail. 


In other words, only class references to "currentPackageName" will be renamed (e.g, "Foo implements javax.servlet.Servlet"), but not the class definitions themselves ("package javax.servlet; public interface Servlet { ... }").


Could you please confirm? Thank you!

Back to the top