Adobe Sonar cube issue: The class or interface com.google.zxing.common.BitMatrix has been deprecated and is not recommended to be used on AEM | Community
Skip to main content
Adobe Champion
April 6, 2022
Solved

Adobe Sonar cube issue: The class or interface com.google.zxing.common.BitMatrix has been deprecated and is not recommended to be used on AEM

  • April 6, 2022
  • 1 reply
  • 843 views

I am having a use case to create a QR code image based on a EventListener which gets triggered, when we save a content fragment after adding few properties.

I used com.google.zxing API to make this functional and it is all working fine and able to create QR code images.

During automatic code review from Adobe cloud manager, we got two observations from Sonar Cube as below.

The class or interface com.google.zxing.WriterException has been deprecated and is not recommended to be used on AEM. - Minor

The class or interface com.google.zxing.common.BitMatrix has been deprecated and is not recommended to be used on AEM. - Minor

 

Though these are flagged as minor , just wanted some advise on how we can fix this.

Please find below the piece of code I am using to create the QR code, which is actually the main code to create QR code.

I searched for many documentations and could not find any replacement for BitMatrix class used to create the actual QR image.

I am using the below classes from zxing API and only the highlighted ones were flagged in SonarCube and could not find any replacement which can be used to fix this issue.

Any leads would be appreciated.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kiran_Vedantam

Hi @p_v_nair 

 

Both documents do not show them as deprecated - but some methods are deprecated. Please check if you are using them, if not raise a query for Adobe on this.

 

https://zxing.github.io/zxing/apidocs/com/google/zxing/common/BitMatrix.html

https://zxing.github.io/zxing/apidocs/com/google/zxing/WriterException.html

 

Thanks,

Kiran Vedantam.

1 reply

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAccepted solution
Community Advisor
December 15, 2023

Hi @p_v_nair 

 

Both documents do not show them as deprecated - but some methods are deprecated. Please check if you are using them, if not raise a query for Adobe on this.

 

https://zxing.github.io/zxing/apidocs/com/google/zxing/common/BitMatrix.html

https://zxing.github.io/zxing/apidocs/com/google/zxing/WriterException.html

 

Thanks,

Kiran Vedantam.