コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.
解決済み

MIGRATE from org.apache.commons.lang to org.apache.commons.lang3.(Strlookup not in org.apache.commons.lang3 version and is depracated)

Avatar

Level 4

Hi All,

 

As part of cloud migration we are planning to migrate import from org.apache.commons.lang to org.apache.commons.lang3.(lang3).

 

And to send a mail we are using Day common Mail template (com.day.cq.commons.mail.MailTemplate).

And we are using below mailTemplate.getEmail method and in one of the parameters we are using StringLookup which is part of org.apache.commons.lang.text.StrLookup (version1) as below.

import org.apache.commons.lang.text.StrLookup;

Email email = mailTemplate.getEmail(StrLookup.mapLookup(params), mail); 

 

How do we migrate to version3 as org.apache.commons.lang3.text.StrLookup is deprecated .Do we need to rewrite in some other way.?Thanks in Advance.

1 受け入れられたソリューション

Avatar

正解者
Level 8

Upon checking the SDK documentation -https://developer.adobe.com/experience-manager/reference-materials/cloud-service/javadoc/com/day/cq/... , there are still using StrLookup from org.apache.commons.lang.

元の投稿で解決策を見る

3 返信

Avatar

Level 8

Avatar

正解者
Level 8

Upon checking the SDK documentation -https://developer.adobe.com/experience-manager/reference-materials/cloud-service/javadoc/com/day/cq/... , there are still using StrLookup from org.apache.commons.lang.

Avatar

Community Advisor

Hi @Sb2512 

There is no replacement yet for this, so you may still need to use the existing org.apache.commons.lang.text.StrLookup class.

 

Neither AEM 6.5 not the cloud service version don't have this updated yet:
- https://developer.adobe.com/experience-manager/reference-materials/cloud-service/javadoc/com/day/cq/...

- https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/commons/ma...

 

Based on Apache docs on the deprecated stuff (https://commons.apache.org/proper/commons-lang/apidocs/deprecated-list.html), the StringLookupFactory should be used instead of StrLookup (https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/lookup/S...), but this is something Adobe would need to update.