Skip to content

Commit ad3a0f0

Browse files
committed
Fix warnings
1 parent d6050cb commit ad3a0f0

19 files changed

Lines changed: 65 additions & 59 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
language: java
22
sudo: false
3-
script: mvn clean compile -Dmaven.test.skip=true
3+
script: mvn clean verify -Dmaven.test.skip=true

devops-framework-core/src/main/groovy/org/devops/framework/core/ComponentManifest.groovy

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ class ComponentManifest implements Serializable {
1010

1111
private static final long serialVersionUID = 1L;
1212

13-
private class ManifestFile implements Serializable {
14-
def version
15-
def status
16-
def commitUTCDate
17-
def committer
18-
def commitComment
19-
Map<String,CompList> compList
20-
}
21-
2213
private ManifestFile manifest = null
2314
private File repoFile = null
2415

devops-framework-core/src/main/groovy/org/devops/framework/core/Container.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ package org.devops.framework.core;
55

66
import hudson.Launcher
77
import hudson.FilePath
8+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
89

10+
@SuppressFBWarnings(value="SE_NO_SERIALVERSIONID")
911
class Container implements Serializable {
1012

1113
private static final long serialVersionUID = 1L;
@@ -63,7 +65,7 @@ class Container implements Serializable {
6365
cmdStr += it.value
6466
}
6567
}
66-
}
68+
}
6769
cmdStr += " -d -p "+portNo+":"+portNo
6870
cmdStr += " --restart=always --name "
6971
cmdStr += " "+registryName+" "+imageName
@@ -397,7 +399,7 @@ class Container implements Serializable {
397399
cmdStr += it.value
398400
}
399401
}
400-
}
402+
}
401403
if (force) {
402404
cmdStr += " -f "
403405
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Component list manifest class for use with the framework
3+
*/
4+
package org.devops.framework.core;
5+
6+
class ManifestFile implements Serializable {
7+
def version
8+
def status
9+
def commitUTCDate
10+
def committer
11+
def commitComment
12+
Map<String,CompList> compList
13+
14+
private static final long serialVersionUID = 1L;
15+
16+
}

devops-framework-core/src/main/groovy/org/devops/framework/core/Notifications.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import javax.mail.PasswordAuthentication
1515
import java.util.logging.Logger
1616
import java.util.logging.Level
1717

18+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
19+
20+
@SuppressFBWarnings(value="SE_NO_SERIALVERSIONID")
1821
class Notifications implements Serializable {
1922

2023
private static final Logger LOGGER = Logger.getLogger( Notifications.class.getName() )
@@ -170,7 +173,7 @@ class Notifications implements Serializable {
170173
try {
171174
// Create a default MimeMessage object.
172175
new MimeMessage(session).with { message ->
173-
176+
@SuppressWarnings("serial")
174177
// Add From, Subject and Content
175178
from = new InternetAddress( fromEmailAddress )
176179
subject = subjectTxt

devops-framework-core/src/main/groovy/org/devops/framework/core/Utilities.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ import jenkins.model.Jenkins
4646
import java.util.logging.Logger
4747
import java.util.logging.Level
4848

49+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
50+
51+
@SuppressFBWarnings(value="SE_NO_SERIALVERSIONID")
4952
class Utilities implements Serializable {
5053

5154
private static final Logger LOGGER = Logger.getLogger( Utilities.class.getName() )
@@ -487,7 +490,9 @@ class Utilities implements Serializable {
487490
props.each {
488491
mapProp.put(it.key,it.value)
489492
}
490-
mapProp = mapProp.sort { a, b -> a.key <=> b.key }
493+
mapProp = mapProp.sort {
494+
a, b -> a.key <=> b.key
495+
}
491496
return mapProp
492497
}
493498

devops-framework-pipeline/src/main/groovy/org/devops/framework/pipeline/BaseCoordinator.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import java.util.logging.Level
1111
class BaseCoordinator implements Serializable {
1212

1313
private static final Logger LOGGER = Logger.getLogger( BaseCoordinator.class.getName() )
14+
private static final long serialVersionUID = 1L;
1415

1516
protected steps = null
1617
protected config = null

devops-framework-pipeline/src/main/groovy/org/devops/framework/pipeline/Build.groovy

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import java.util.logging.Level
99
class Build extends BaseCoordinator implements Serializable {
1010

1111
private static final Logger LOGGER = Logger.getLogger( Build.class.getName() )
12+
private static final long serialVersionUID = 1L;
1213

1314
/**
1415
* Default Constructor
@@ -46,14 +47,6 @@ class Build extends BaseCoordinator implements Serializable {
4647
return super.convertCalloutsToJSON()
4748
}
4849

49-
/**
50-
* Method to convert callouts to txt
51-
* @return String
52-
*/
53-
final String convertCalloutsToTxT() {
54-
return super.convertCalloutsToTxT()
55-
}
56-
5750
/**
5851
* Method to run the pipeline
5952
*/

devops-framework-pipeline/src/main/groovy/org/devops/framework/pipeline/CDFramework.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import java.util.logging.Level
99
class CDFramework implements Serializable {
1010

1111
private static final Logger LOGGER = Logger.getLogger( CDFramework.class.getName() )
12+
private static final long serialVersionUID = 1L;
1213

1314
// Process objects
1415
private Integration intProcess = null

devops-framework-pipeline/src/main/groovy/org/devops/framework/pipeline/CIFramework.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import java.util.logging.Level
99
class CIFramework implements Serializable {
1010

1111
private static final Logger LOGGER = Logger.getLogger( CIFramework.class.getName() )
12+
private static final long serialVersionUID = 1L;
1213

1314
// Process objects
1415
private Build buildProcess = null

0 commit comments

Comments
 (0)