Skip to content

Commit ba85d0b

Browse files
committed
Merge pull request #41 from DevFactory/release/members-of-an-interface-in-order-fix-1
Fixing squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order
2 parents 97ac433 + 5d26060 commit ba85d0b

File tree

12 files changed

+88
-84
lines changed

12 files changed

+88
-84
lines changed

src/main/java/org/audit4j/core/AuditManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
*/
3636
public final class AuditManager implements IAuditManager {
3737

38+
/** The audit manager. */
39+
private static volatile IAuditManager auditManager;
40+
3841
/**
3942
* Instantiates a new audit manager.
4043
*/
4144
private AuditManager() {
4245
}
4346

44-
/** The audit manager. */
45-
private static volatile IAuditManager auditManager;
46-
4747
/**
4848
* Audit.
4949
*

src/main/java/org/audit4j/core/Configuration.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ public class Configuration implements Serializable {
6464
/** The jmx configurations. */
6565
private JMXConfig jmx;
6666

67-
/**
68-
* Instantiates a new configuration.
69-
*/
70-
public Configuration() {
71-
72-
}
73-
7467
/** Return new static instance.
7568
*
7669
* @since 2.3.1
@@ -83,6 +76,13 @@ public Configuration() {
8376
* */
8477
public static Configuration DEFAULT = getDefault();
8578

79+
/**
80+
* Instantiates a new configuration.
81+
*/
82+
public Configuration() {
83+
84+
}
85+
8686
/**
8787
* Gets the default.
8888
*

src/main/java/org/audit4j/core/Context.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ public final class Context {
9494

9595
private static AnnotationTransformer annotationTransformer;
9696

97+
/**
98+
* Private singalton.
99+
*/
100+
private Context() {
101+
// Nothing here. Private Constructor
102+
}
103+
97104
/**
98105
* Initialize the Audit4j instance. This will ensure the single audit4j
99106
* instance and single Configuration repository load in to the memory.
@@ -459,10 +466,4 @@ public static RunStatus getStatus() {
459466
return lifeCycle.getStatus();
460467
}
461468

462-
/**
463-
* Private singalton.
464-
*/
465-
private Context() {
466-
// Nothing here. Private Constructor
467-
}
468469
}

src/main/java/org/audit4j/core/LifeCycleContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ public final class LifeCycleContext {
1818
/** The instance. */
1919
private static LifeCycleContext instance;
2020

21+
/**
22+
* Instantiates a new context life cycle.
23+
*/
24+
private LifeCycleContext() {
25+
}
26+
2127
/**
2228
* Gets the status.
2329
*
@@ -67,12 +73,6 @@ void setStatus(RunStatus status) {
6773
this.status = status;
6874
}
6975

70-
/**
71-
* Instantiates a new context life cycle.
72-
*/
73-
private LifeCycleContext() {
74-
}
75-
7676
/**
7777
* Gets the single instance of ContextLifeCycle.
7878
*

src/main/java/org/audit4j/core/PreConfigurationContext.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ public final class PreConfigurationContext {
5151
/** The Constant preAnnotationFilters. */
5252
private static final List<AuditAnnotationFilter> preAnnotationFilters = new ArrayList<AuditAnnotationFilter>();
5353

54+
/**
55+
* Instantiates a new registry.
56+
*/
57+
private PreConfigurationContext() {
58+
// Private Constructor
59+
}
60+
5461
static {
5562
ScanAnnotatedCommand scanAnnotated = new ScanAnnotatedCommand();
5663
availableCommands.add(scanAnnotated.getCommand());
@@ -132,11 +139,4 @@ public static List<AuditAnnotationFilter> getPreannotationfilters() {
132139
return preAnnotationFilters;
133140
}
134141

135-
/**
136-
* Instantiates a new registry.
137-
*/
138-
private PreConfigurationContext() {
139-
// Private Constructor
140-
}
141-
142142
}

src/main/java/org/audit4j/core/command/CommandProcessor.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ public final class CommandProcessor {
3939

4040
/** The instance. */
4141
private static CommandProcessor instance;
42-
42+
43+
/**
44+
* Instantiates a new command processor.
45+
*/
46+
private CommandProcessor(){
47+
//Private Constructor.
48+
}
49+
4350
/**
4451
* Process.
4552
*
@@ -82,13 +89,6 @@ public void process(String commandText) {
8289
process(commands);
8390
}
8491

85-
/**
86-
* Instantiates a new command processor.
87-
*/
88-
private CommandProcessor(){
89-
//Private Constructor.
90-
}
91-
9292
/**
9393
* Gets the single instance of CommandProcessor.
9494
*

src/main/java/org/audit4j/core/handler/file/archive/ArchiveType.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ public enum ArchiveType {
1414
/** The name. */
1515
private String name;
1616

17-
/**
18-
* Gets the name.
19-
*
20-
* @return the name
21-
*/
22-
public String getName() {
23-
return name;
24-
}
25-
2617
/**
2718
* Instantiates a new archive type.
2819
*
@@ -32,4 +23,14 @@ public String getName() {
3223
private ArchiveType(String name) {
3324
this.name = name;
3425
}
26+
27+
/**
28+
* Gets the name.
29+
*
30+
* @return the name
31+
*/
32+
public String getName() {
33+
return name;
34+
}
35+
3536
}

src/main/java/org/audit4j/core/handler/file/archive/Compression.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ public enum Compression {
1414
private String extention;
1515

1616
/**
17-
* Gets the extention.
17+
* Instantiates a new compression type.
1818
*
19-
* @return the extention
19+
* @param extention the extention
2020
*/
21-
public String getExtention() {
22-
return extention;
21+
Compression(String extention) {
22+
this.extention = extention;
2323
}
2424

2525
/**
26-
* Instantiates a new compression type.
26+
* Gets the extention.
2727
*
28-
* @param extention the extention
28+
* @return the extention
2929
*/
30-
Compression(String extention) {
31-
this.extention = extention;
30+
public String getExtention() {
31+
return extention;
3232
}
33+
3334
}

src/main/java/org/audit4j/core/schedule/TaskUtils.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717
*/
1818
public abstract class TaskUtils {
1919

20-
/**
21-
* private constructor to avoid instantiation of this class
22-
*/
23-
private TaskUtils(){
24-
25-
}
26-
2720
/**
2821
* An ErrorHandler strategy that will log the Exception but perform no
2922
* further handling. This will suppress the error so that subsequent
@@ -37,6 +30,13 @@ private TaskUtils(){
3730
*/
3831
public static final ErrorHandler LOG_AND_PROPAGATE_ERROR_HANDLER = new PropagatingErrorHandler();
3932

33+
/**
34+
* private constructor to avoid instantiation of this class
35+
*/
36+
private TaskUtils(){
37+
38+
}
39+
4040
/**
4141
* Decorate the task for error handling. If the provided
4242
*

src/main/java/org/audit4j/core/util/Base64Coder.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727
*/
2828
public class Base64Coder {
2929

30-
/**
31-
* Instantiates a new base64 coder.
32-
*/
33-
private Base64Coder() {
34-
35-
}
36-
3730
/** Holds The Constant LINE_SEPARATOR Value. */
3831
public static final String LINE_SEPARATOR = "line.separator";
3932

@@ -101,6 +94,13 @@ private Base64Coder() {
10194
}
10295
}
10396

97+
/**
98+
* Instantiates a new base64 coder.
99+
*/
100+
private Base64Coder() {
101+
102+
}
103+
104104
/**
105105
* Encode string.
106106
*

0 commit comments

Comments
 (0)