Mentorship-android: Built project with 2.8.3 and PreferenceManager.kt has a compile error

Created on 5 Oct 2020  Â·  12Comments  Â·  Source: anitab-org/mentorship-android

I have built the project with 2.8.3 sdk and it fails with a compilation build warning.
mentorship-android/app/src/main/java/org/systers/mentorship/utils/PreferenceManager.kt: (33, 17): Type mismatch: inferred type is String? but String was expected

To Reproduce
Steps to reproduce the behavior:
Buld the project with the sdk 2.8.3 build and it has warnings as described above.
Expected behavior
Expect a clean build with no warnings.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [MacOS]
  • Browser [N/A]
  • Version [N/A]

Smartphone (please complete the following information):

  • Device: [Pixel]
  • OS: [N/A]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
The fix is to change this line of code from ln: 32
val authToken: String
get() = sharedPreferences.getString(AUTH_TOKEN, "")
to
val authToken: String
get() = sharedPreferences.getString(AUTH_TOKEN, "")!!

Bug

All 12 comments

Hi, willing to make the code change if assigned. thanks, Asha

Hi, willing to make the code change if assigned. thanks, Asha

I think it's fine if you want to fix the warning however I don't think a warning can cause a failed build

agree, it was a build failure.

@somayaj before creating a PR , please make sure the particular issue is assigned to you next time onwards.
@aditmehta9 thanks for assigning!

I think it's fine if you want to fix the warning however I don't think a warning can cause a failed build

@HaripriyaB can you please validate this issue , thanks!

Absolutely! Thanks.

On Tue, Oct 20, 2020 at 2:15 PM Vaishnavi Joshi notifications@github.com
wrote:

I think it's fine if you want to fix the warning however I don't think a
warning can cause a failed build

@HaripriyaB https://github.com/HaripriyaB can you please validate this
issue , thanks!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/anitab-org/mentorship-android/issues/1014#issuecomment-713081516,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIRAZGKHJG4Z23EYGAEOIPDSLXOVZANCNFSM4SEDQ36A
.

I think it's fine if you want to fix the warning however I don't think a warning can cause a failed build

@HaripriyaB can you please validate this issue , thanks!

It's a very minor bug. Probably, It can be considered valid.

@somayaj any updates?

none, the code changes are complete;

On Sat, Nov 14, 2020 at 11:29 AM Vaishnavi Joshi notifications@github.com
wrote:

@somayaj https://github.com/somayaj any updates?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/anitab-org/mentorship-android/issues/1014#issuecomment-727239247,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIRAZGKJDPIF6LKJWONEGRDSP25AFANCNFSM4SEDQ36A
.

@somayaj can you please link this issue in the fixes part of the PR you created then ? Thanks!

sure, can do

On Tue, Nov 17, 2020 at 9:30 AM Vaishnavi Joshi notifications@github.com
wrote:

@somayaj https://github.com/somayaj can you please link this issue in
the fixes part of the PR you created then ? Thanks!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/anitab-org/mentorship-android/issues/1014#issuecomment-729005023,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIRAZGNRSKUVGSHCUIH5RR3SQKJKFANCNFSM4SEDQ36A
.

I think we can close this issue. Cannot replicate it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garimasingh128 picture garimasingh128  Â·  3Comments

isabelcosta picture isabelcosta  Â·  4Comments

isabelcosta picture isabelcosta  Â·  4Comments

annabauza picture annabauza  Â·  7Comments

iofall picture iofall  Â·  3Comments