Skip to content
Permalink
Browse files

Fixed JENKINS-24822

  • Loading branch information
MadsNielsen committed Nov 12, 2014
1 parent 28eef8b commit 7fcb755d02449173aa8695e6fa151915517e7d00
@@ -371,7 +371,7 @@
<artifactId>praqmajutils</artifactId>
<version>${praqmajutils.version}</version>
</dependency>

<dependency>
<groupId>net.praqma</groupId>
<artifactId>praqmajutils</artifactId>
@@ -37,7 +37,7 @@
*/
private boolean printDebug = false;

private static Logger logger = Logger.getLogger( ConfigurationRotator.class.getName() );
private static final Logger logger = Logger.getLogger( ConfigurationRotator.class.getName() );

public enum ResultType {
COMPATIBLE,
@@ -296,7 +296,7 @@ public String getDisplayName() {

@Override
public SCM newInstance( StaplerRequest req, JSONObject formData ) throws FormException {
ConfigurationRotator r = (ConfigurationRotator) super.newInstance( req, formData );
ConfigurationRotator r = (ConfigurationRotator) super.newInstance( req, formData );
ConfigurationRotatorSCMDescriptor<AbstractConfigurationRotatorSCM> d = (ConfigurationRotatorSCMDescriptor<AbstractConfigurationRotatorSCM>) r.getAcrs().getDescriptor();
r.acrs = d.newInstance( req, formData, r.acrs );
save();
@@ -27,8 +27,6 @@ public ConfigurationRotatorBuildAction( AbstractBuild<?, ?> build, Class<? exten
return clazz;
}



public void doReset( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
SCM scm = build.getProject().getScm();
if( scm instanceof ConfigurationRotator ) {
@@ -84,17 +84,17 @@ public boolean wasReconfigured( AbstractProject<?, ?> project ) {
}

List<ClearCaseUCMTarget> list = getCompareTargets(project);
List<ClearCaseUCMTarget> configTargets = getTargets();

/* Check if the sizes are equal */
if( targets.size() != list.size() ) {
if( configTargets.size() != list.size() ) {
logger.fine( "Size was not equal" );
return true;
}



for( int i = 0; i < targets.size(); ++i ) {
if( !targets.get( i ).equals( list.get( i ) ) ) {

for( int i = 0; i < configTargets.size(); ++i ) {
logger.fine(String.format( "Comparing (SCM Configuration Target) %s to (Previously Completed Build Target) %s", configTargets.get(i), list.get(i)) );
if( !configTargets.get( i ).equals( list.get( i ) ) ) {
return true;
}
}
@@ -324,7 +324,7 @@ public SnapshotView createView( TaskListener listener, AbstractBuild<?, ?> build
* @return A list of targets
*/
@Override
public List<ClearCaseUCMTarget> getTargets() {
public final List<ClearCaseUCMTarget> getTargets() {
if( projectConfiguration != null ) {
return getConfigurationAsTargets( (ClearCaseUCMConfiguration) projectConfiguration );
} else {
@@ -414,7 +414,6 @@ public AbstractConfigurationRotatorSCM newInstance( StaplerRequest req, JSONObje
}
}
instance.targets = targets;

save();
return instance;
}

0 comments on commit 7fcb755

Please sign in to comment.
You can’t perform that action at this time.