SalesforceLabs / survey-force

86 stars 62 forks source link

Bug: Change "UserInfo" reference in Apex to "System.UserInfo" #141

Closed jrattanpal closed 2 years ago

jrattanpal commented 2 years ago

This came up as a review on AppEx. listing: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000003I2gDEAS&revId=a6H3u000000gBqVEAU

The class name seems to be conflicting with the System.UserInfo.

dschach commented 2 years ago

This isn't a bug or an issue on our end. The customer wrote a class called UserInfo. I don't see what we could do differently to avoid this happening.

claico commented 2 years ago

Sounds like a Salesforce problem. Should not allow a custom class to have the same name as a standard class.

On Thu, May 12, 2022 at 9:34 PM David Schach @.***> wrote:

This isn't a bug or an issue on our end. The customer wrote a class called UserInfo. I don't see what we could do differently to avoid this happening.

— Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/141#issuecomment-1125598758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECDCXVIEBTAT463EBFENODVJW5VFANCNFSM5VSE36WQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- David Claiborne | Principal | (504) 655-0000 | www.claico.com

jrattanpal commented 2 years ago

It's not a bug. This is how it works. To fix it, I can add System namespace ("System.UserInfo"). That should take care of that class name not conflicting with the local one.

dschach commented 2 years ago

@jrattanpal I believe you can close this issue while relating it to pull request #142

dschach commented 2 years ago

But for now, let's close this issue.

jrattanpal commented 2 years ago

@dschach

Sounds good. I think there were 2 instances left over, I have fixed those in the main branch. We are good toclose