GitLab4J - Unable to find existing files

Hi All,

I’m using the Gitlab4J API to trigger a build.
There is a push event hook triggering my application whenever someone commits any change.

The Application is getting triggered, but is not able to find the files in repo.
I’m using the getOptionalFileInfo() method to check for a file’s existence.

The method is always returning null. I have verified that the inputs are all correct. The path when put in browser is returning the file.

What can I be doing wrong here.
Any help is appreciated.