Skip to content

Commit e53ea92

Browse files
authored
Merge pull request #47 from tls-attacker/checkstyle
Checkstyle
2 parents db91c91 + d8dde94 commit e53ea92

File tree

102 files changed

+1190
-1070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1190
-1070
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ release.properties
77
dependency-reduced-pom.xml
88
buildNumber.properties
99
.mvn/timing.properties
10-
/nbproject/
10+
/nbproject/
11+
*.idea/
12+
ModifiableVariable.iml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Modifiable Variables
22

33
![licence](https://img.shields.io/badge/License-Apachev2-brightgreen.svg)
4-
[![travis](https://travis-ci.org/RUB-NDS/ModifiableVariable.svg?branch=master)](https://travis-ci.org/RUB-NDS/ModifiableVariable)
4+
[![jenkins](https://hydrogen.cloud.nds.rub.de/buildStatus/icon.svg?job=ModifiableVariable)](https://hydrogen.cloud.nds.rub.de/job/ModifiableVariable/)
55

66
Modifiable variable allows one to set modifications to basic types after or before their values are actually determined. When their actual values are determined and one tries to access the value via getters, the original value will be returned in a modified form accordingly.
77

@@ -41,8 +41,8 @@ If you want to use modifiable variables in your maven projects, you can include
4141
# Supported data types
4242
The following modifiable variables are provided in this package with their modifications:
4343
* ModifiableBigInteger: add, explicitValue, shiftLeft, shiftRight, subtract, xor
44-
* ModifiableBoolean: explicitValue, toogle
45-
* ModifiableByteArray: delete, duplicate, explicitValue, insert, suffle, xor
44+
* ModifiableBoolean: explicitValue, toggle
45+
* ModifiableByteArray: delete, duplicate, explicitValue, insert, shuffle, xor
4646
* ModifiableInteger: add, explicitValue, shiftLeft, shiftRight, subtract, xor
4747
* ModifiableLong: add, explicitValue, subtract, xor
4848
* ModifiableByte: add, explicitValue, subtract, xor
@@ -205,9 +205,9 @@ ModifiableLong and ModifiableBytes support the following operations: add, explic
205205
</booleanExplicitValueModification>
206206
```
207207

208-
- Toogle:
208+
- Toggle:
209209
```xml
210-
<booleanToogleModification/>
210+
<booleanToggleModification/>
211211
```
212212

213213
# String

checkstyle.xml

Lines changed: 333 additions & 167 deletions
Large diffs are not rendered by default.

maven-eclipse-codestyle.xml

Lines changed: 380 additions & 290 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,29 @@
9797
<artifactId>versions-maven-plugin</artifactId>
9898
<version>2.8.1</version>
9999
</plugin>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-checkstyle-plugin</artifactId>
103+
<version>3.1.1</version>
104+
<dependencies>
105+
<dependency>
106+
<groupId>com.puppycrawl.tools</groupId>
107+
<artifactId>checkstyle</artifactId>
108+
<version>8.37</version>
109+
</dependency>
110+
</dependencies>
111+
<configuration>
112+
<configLocation>checkstyle.xml</configLocation>
113+
<violationSeverity>info</violationSeverity>
114+
<failOnViolation>false</failOnViolation>
115+
</configuration>
116+
</plugin>
100117
<plugin>
101118
<groupId>net.revelc.code</groupId>
102119
<artifactId>formatter-maven-plugin</artifactId>
103120
<version>0.5.2</version>
104121
<configuration>
105122
<configFile>maven-eclipse-codestyle.xml</configFile>
106-
<lineEnding>LF</lineEnding>
107123
</configuration>
108124
<executions>
109125
<execution>
@@ -198,6 +214,7 @@
198214
<plugin>
199215
<groupId>org.apache.maven.plugins</groupId>
200216
<artifactId>maven-compiler-plugin</artifactId>
217+
<version>3.8.1</version>
201218
<configuration>
202219
<source>8</source>
203220
<target>8</target>
@@ -209,7 +226,7 @@
209226
<properties>
210227
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
211228
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
212-
<!-- We redefine the signature generation process, whic is enabled by default,
229+
<!-- We redefine the signature generation process, which is enabled by default,
213230
but cannot be performed by typical users. Enable it using -Dskip.signature=false -->
214231
<skip.signature>true</skip.signature>
215232
</properties>

src/main/java/de/rub/nds/modifiablevariable/FileConfigurationException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
public class FileConfigurationException extends RuntimeException {

src/main/java/de/rub/nds/modifiablevariable/HoldsModifiableVariable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import java.lang.annotation.ElementType;
@@ -14,8 +15,8 @@
1415
import java.lang.annotation.Target;
1516

1617
/**
17-
* Annotation interface for modifiable variables holders. A modifiable variable
18-
* holder is for example a TLS protocol message.
18+
* Annotation interface for modifiable variables holders. A modifiable variable holder is for example a TLS protocol
19+
* message.
1920
*
2021
*/
2122
@Target(ElementType.FIELD)

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariable.java

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import de.rub.nds.modifiablevariable.biginteger.BigIntegerAddModification;
@@ -51,9 +52,8 @@
5152
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
5253

5354
/**
54-
* The base abstract class for modifiable variables, including the getValue
55-
* function.The class needs to be defined transient to allow propOrder
56-
* definition in subclasses, see:
55+
* The base abstract class for modifiable variables, including the getValue function.The class needs to be defined
56+
* transient to allow propOrder definition in subclasses, see:
5757
* http://blog.bdoughan.com/2011/06/ignoring-inheritance-with-xmltransient.html
5858
*
5959
*
@@ -67,38 +67,37 @@ public abstract class ModifiableVariable<E> implements Serializable {
6767

6868
protected Boolean autoformat = null;
6969

70-
@XmlElements(value = {
71-
@XmlElement(type = BigIntegerXorModification.class, name = "BigIntegerXorModification"),
72-
@XmlElement(type = BigIntegerSubtractModification.class, name = "BigIntegerSubtractModification"),
73-
@XmlElement(type = BigIntegerShiftRightModification.class, name = "BigIntegerShiftRightModification"),
74-
@XmlElement(type = BigIntegerShiftLeftModification.class, name = "BigIntegerShiftLeftModification"),
75-
@XmlElement(type = BigIntegerExplicitValueModification.class, name = "BigIntegerExplicitValueModification"),
76-
@XmlElement(type = BigIntegerAddModification.class, name = "BigIntegerAddModification"),
77-
@XmlElement(type = BigIntegerInteractiveModification.class, name = "BigIntegerInteractiveModification"),
78-
@XmlElement(type = BooleanToggleModification.class, name = "BooleanToggleModification"),
79-
@XmlElement(type = BooleanExplicitValueModification.class, name = "BooleanExplicitValueModification"),
80-
@XmlElement(type = ByteArrayXorModification.class, name = "ByteArrayXorModification"),
81-
@XmlElement(type = ByteArrayShuffleModification.class, name = "ByteArrayShuffleModification"),
82-
@XmlElement(type = ByteArrayPayloadModification.class, name = "ByteArrayPayloadModification"),
83-
@XmlElement(type = ByteArrayInsertModification.class, name = "ByteArrayInsertModification"),
84-
@XmlElement(type = ByteArrayExplicitValueModification.class, name = "ByteArrayExplicitValueModification"),
85-
@XmlElement(type = ByteArrayDuplicateModification.class, name = "ByteArrayDuplicateModification"),
86-
@XmlElement(type = ByteArrayDeleteModification.class, name = "ByteArrayDeleteModification"),
87-
@XmlElement(type = IntegerXorModification.class, name = "IntegerXorModification"),
88-
@XmlElement(type = IntegerSubtractModification.class, name = "IntegerSubtractModification"),
89-
@XmlElement(type = IntegerShiftRightModification.class, name = "IntegerShiftRightModification"),
90-
@XmlElement(type = IntegerShiftLeftModification.class, name = "IntegerShiftLeftModification"),
91-
@XmlElement(type = IntegerExplicitValueModification.class, name = "IntegerExplicitValueModification"),
92-
@XmlElement(type = IntegerAddModification.class, name = "IntegerAddModification"),
93-
@XmlElement(type = LongXorModification.class, name = "LongXorModification"),
94-
@XmlElement(type = LongSubtractModification.class, name = "LongSubtractModification"),
95-
@XmlElement(type = LongExplicitValueModification.class, name = "LongExplicitValueModification"),
96-
@XmlElement(type = LongAddModification.class, name = "LongAddModification"),
97-
@XmlElement(type = ByteXorModification.class, name = "ByteXorModification"),
98-
@XmlElement(type = ByteSubtractModification.class, name = "ByteSubtractModification"),
99-
@XmlElement(type = ByteAddModification.class, name = "ByteAddModification"),
100-
@XmlElement(type = ByteExplicitValueModification.class, name = "ByteExplicitValueModification"),
101-
@XmlElement(type = StringExplicitValueModification.class, name = "StringExplicitValueModification") })
70+
@XmlElements(value = { @XmlElement(type = BigIntegerXorModification.class, name = "BigIntegerXorModification"),
71+
@XmlElement(type = BigIntegerSubtractModification.class, name = "BigIntegerSubtractModification"),
72+
@XmlElement(type = BigIntegerShiftRightModification.class, name = "BigIntegerShiftRightModification"),
73+
@XmlElement(type = BigIntegerShiftLeftModification.class, name = "BigIntegerShiftLeftModification"),
74+
@XmlElement(type = BigIntegerExplicitValueModification.class, name = "BigIntegerExplicitValueModification"),
75+
@XmlElement(type = BigIntegerAddModification.class, name = "BigIntegerAddModification"),
76+
@XmlElement(type = BigIntegerInteractiveModification.class, name = "BigIntegerInteractiveModification"),
77+
@XmlElement(type = BooleanToggleModification.class, name = "BooleanToggleModification"),
78+
@XmlElement(type = BooleanExplicitValueModification.class, name = "BooleanExplicitValueModification"),
79+
@XmlElement(type = ByteArrayXorModification.class, name = "ByteArrayXorModification"),
80+
@XmlElement(type = ByteArrayShuffleModification.class, name = "ByteArrayShuffleModification"),
81+
@XmlElement(type = ByteArrayPayloadModification.class, name = "ByteArrayPayloadModification"),
82+
@XmlElement(type = ByteArrayInsertModification.class, name = "ByteArrayInsertModification"),
83+
@XmlElement(type = ByteArrayExplicitValueModification.class, name = "ByteArrayExplicitValueModification"),
84+
@XmlElement(type = ByteArrayDuplicateModification.class, name = "ByteArrayDuplicateModification"),
85+
@XmlElement(type = ByteArrayDeleteModification.class, name = "ByteArrayDeleteModification"),
86+
@XmlElement(type = IntegerXorModification.class, name = "IntegerXorModification"),
87+
@XmlElement(type = IntegerSubtractModification.class, name = "IntegerSubtractModification"),
88+
@XmlElement(type = IntegerShiftRightModification.class, name = "IntegerShiftRightModification"),
89+
@XmlElement(type = IntegerShiftLeftModification.class, name = "IntegerShiftLeftModification"),
90+
@XmlElement(type = IntegerExplicitValueModification.class, name = "IntegerExplicitValueModification"),
91+
@XmlElement(type = IntegerAddModification.class, name = "IntegerAddModification"),
92+
@XmlElement(type = LongXorModification.class, name = "LongXorModification"),
93+
@XmlElement(type = LongSubtractModification.class, name = "LongSubtractModification"),
94+
@XmlElement(type = LongExplicitValueModification.class, name = "LongExplicitValueModification"),
95+
@XmlElement(type = LongAddModification.class, name = "LongAddModification"),
96+
@XmlElement(type = ByteXorModification.class, name = "ByteXorModification"),
97+
@XmlElement(type = ByteSubtractModification.class, name = "ByteSubtractModification"),
98+
@XmlElement(type = ByteAddModification.class, name = "ByteAddModification"),
99+
@XmlElement(type = ByteExplicitValueModification.class, name = "ByteExplicitValueModification"),
100+
@XmlElement(type = StringExplicitValueModification.class, name = "StringExplicitValueModification") })
102101
private VariableModification<E> modification = null;
103102

104103
private Boolean createRandomModification;

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariableFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import de.rub.nds.modifiablevariable.biginteger.ModifiableBigInteger;

src/main/java/de/rub/nds/modifiablevariable/ModifiableVariableProperty.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Licensed under Apache License 2.0
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*/
9+
910
package de.rub.nds.modifiablevariable;
1011

1112
import java.lang.annotation.ElementType;

0 commit comments

Comments
 (0)