ContentTypeUtil: Add singleton scope
Before this change, migrating repositories like [1], which has a lot of
refs, to Gerrit caused a timeout and the push wasn't successful. Classes
injecting ContentTypeUtil, InvalidLineEndingValidator,
ContentTypeValidator and BlockedKeywordValidator were trying to
intialize the ContentTypeValidator class a lot of time causing an
infinite loop. This loop is probably trying to load the cache
consentatly
This change adds the singleton scope to initialize the class one time
only preventing the infinite loop.
[1] https://github.com/angular/angular.git
Bug: Issue 14784
Change-Id: Ic5bb8eaebf72a7346ebe2514fb01e62118368c23
1 file changed