Closed vaisakhkannan closed 6 days ago
@aparnamichael , When I compared the implementation of the old deprecated method (resolveMavenHomeDirectory)
, I noticed it uses a staticOrBundled
method. What this method actually does is..
StaticResolvedMavenHomeType
.StaticResolvedMavenHomeType
), it returns 'BundledMaven3
'.
Using the same approach, I modified the code to return the default 'BundledMaven3.INSTANCE'
If we use null
as the default return value, we will get an IllegalArgumentException
if the casting fails in the future, as shown in the image. I encountered this issue during testing because I commented out the relevant code below.
I believe this solution is better now. Please review my changes.
I believe this solution is better now. Please review my changes.
Thanks for digging deeper to align the behaviour of the new API usage with the old one.
Fixes #823 Updated
getMavenHome()
method togetMavenHomeType()
method and UpdatedresolveMavenHomeDirectory()
method togetMavenHomeFile()
method