Polish
This commit is contained in:
@@ -74,8 +74,9 @@ public class MavenSettings {
|
||||
private final List<Profile> activeProfiles;
|
||||
|
||||
/**
|
||||
* @param settings
|
||||
* @param decryptedSettings
|
||||
* Create a new {@link MavenSettings} instance.
|
||||
* @param settings the source settings
|
||||
* @param decryptedSettings the decrypted settings
|
||||
*/
|
||||
public MavenSettings(Settings settings, SettingsDecryptionResult decryptedSettings) {
|
||||
this.offline = settings.isOffline();
|
||||
@@ -166,7 +167,8 @@ public class MavenSettings {
|
||||
org.apache.maven.model.Profile modelProfile = new org.apache.maven.model.Profile();
|
||||
modelProfile.setId(profile.getId());
|
||||
if (profile.getActivation() != null) {
|
||||
modelProfile.setActivation(createModelActivation(profile.getActivation()));
|
||||
modelProfile
|
||||
.setActivation(createModelActivation(profile.getActivation()));
|
||||
}
|
||||
modelProfiles.add(modelProfile);
|
||||
}
|
||||
|
||||
@@ -91,15 +91,16 @@ public class MavenSettingsReader {
|
||||
return settingsDecrypter;
|
||||
}
|
||||
|
||||
private void setField(Class<?> clazz, String fieldName, Object target, Object value) {
|
||||
private void setField(Class<?> sourceClass, String fieldName, Object target,
|
||||
Object value) {
|
||||
try {
|
||||
Field field = clazz.getDeclaredField(fieldName);
|
||||
Field field = sourceClass.getDeclaredField(fieldName);
|
||||
field.setAccessible(true);
|
||||
field.set(target, value);
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Exception ex) {
|
||||
throw new IllegalStateException("Failed to set field '" + fieldName
|
||||
+ "' on '" + target + "'", e);
|
||||
+ "' on '" + target + "'", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ public final class RepositoryConfigurationFactory {
|
||||
"spring-snapshot", URI.create("http://repo.spring.io/snapshot"), true);
|
||||
|
||||
private RepositoryConfigurationFactory() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user