mirror of
				https://github.com/scm-manager/scm-manager.git
				synced 2025-10-31 10:35:56 +01:00 
			
		
		
		
	Fix class loader for creation of vcs version string
Use UberClassLoader in AbstractSimpleRepositoryHandler#getStringFromResource Therefore pass through plugin loader
This commit is contained in:
		| @@ -53,9 +53,9 @@ import sonia.scm.io.INIConfigurationWriter; | ||||
| import sonia.scm.io.INISection; | ||||
| import sonia.scm.logging.SVNKitLogger; | ||||
| import sonia.scm.plugin.Extension; | ||||
| import sonia.scm.plugin.PluginLoader; | ||||
| import sonia.scm.repository.spi.HookEventFacade; | ||||
| import sonia.scm.repository.spi.SvnRepositoryServiceProvider; | ||||
| import sonia.scm.store.ConfigurationStore; | ||||
| import sonia.scm.store.ConfigurationStoreFactory; | ||||
| import sonia.scm.util.Util; | ||||
|  | ||||
| @@ -97,9 +97,10 @@ public class SvnRepositoryHandler | ||||
|   @Inject | ||||
|   public SvnRepositoryHandler(ConfigurationStoreFactory storeFactory, | ||||
|                               HookEventFacade eventFacade, | ||||
|                               RepositoryLocationResolver repositoryLocationResolver) | ||||
|                               RepositoryLocationResolver repositoryLocationResolver, | ||||
|                               PluginLoader pluginLoader) | ||||
|   { | ||||
|     super(storeFactory, repositoryLocationResolver); | ||||
|     super(storeFactory, repositoryLocationResolver, pluginLoader); | ||||
|  | ||||
|     // register logger | ||||
|     SVNDebugLog.setDefaultLog(new SVNKitLogger()); | ||||
|   | ||||
| @@ -32,14 +32,10 @@ | ||||
| package sonia.scm.repository; | ||||
|  | ||||
|  | ||||
| import org.junit.Before; | ||||
| import org.junit.Test; | ||||
| import org.junit.runner.RunWith; | ||||
| import org.mockito.Mock; | ||||
| import org.mockito.junit.MockitoJUnitRunner; | ||||
| import sonia.scm.repository.api.HookContextFactory; | ||||
| import sonia.scm.repository.spi.HookEventFacade; | ||||
| import sonia.scm.store.ConfigurationStore; | ||||
| import sonia.scm.store.ConfigurationStoreFactory; | ||||
|  | ||||
| import java.io.File; | ||||
| @@ -93,7 +89,7 @@ public class SvnRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase { | ||||
|   protected RepositoryHandler createRepositoryHandler(ConfigurationStoreFactory factory, | ||||
|                                                       RepositoryLocationResolver locationResolver, | ||||
|                                                       File directory)  { | ||||
|     SvnRepositoryHandler handler = new SvnRepositoryHandler(factory, null, locationResolver); | ||||
|     SvnRepositoryHandler handler = new SvnRepositoryHandler(factory, null, locationResolver, null); | ||||
|  | ||||
|     handler.init(contextProvider); | ||||
|  | ||||
| @@ -109,7 +105,7 @@ public class SvnRepositoryHandlerTest extends SimpleRepositoryHandlerTestBase { | ||||
|   public void getDirectory() { | ||||
|     when(factory.withType(any())).thenCallRealMethod(); | ||||
|     SvnRepositoryHandler repositoryHandler = new SvnRepositoryHandler(factory, | ||||
|       facade, locationResolver); | ||||
|       facade, locationResolver, null); | ||||
|  | ||||
|     SvnConfig svnConfig = new SvnConfig(); | ||||
|     repositoryHandler.setConfig(svnConfig); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user