Skip to content

Commit 5033c2b

Browse files
committed
polish
1 parent 700be64 commit 5033c2b

File tree

6 files changed

+36
-27
lines changed

6 files changed

+36
-27
lines changed

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,21 @@
166166
<plugins>
167167
<!-- Javadoc -->
168168
<plugin>
169+
<groupId>org.apache.maven.plugins</groupId>
169170
<artifactId>maven-javadoc-plugin</artifactId>
171+
<version>3.0.0</version>
170172
</plugin>
171173
<!-- Source code cross reference -->
172174
<plugin>
175+
<groupId>org.apache.maven.plugins</groupId>
173176
<artifactId>maven-jxr-plugin</artifactId>
177+
<version>2.5</version>
174178
</plugin>
175179
<!-- Test report -->
176180
<plugin>
181+
<groupId>org.apache.maven.plugins</groupId>
177182
<artifactId>maven-surefire-report-plugin</artifactId>
183+
<version>2.20.1</version>
178184
</plugin>
179185
<!-- Test coverage -->
180186
<plugin>
@@ -183,11 +189,14 @@
183189
</plugin>
184190
<!-- CheckStyle report -->
185191
<plugin>
192+
<groupId>org.apache.maven.plugins</groupId>
186193
<artifactId>maven-checkstyle-plugin</artifactId>
194+
<version>2.17</version>
187195
<configuration>
188196
<configLocation>src/main/config/checkstyle.xml</configLocation>
189197
<!-- Java source code generated from WSDL -->
190198
<excludes>**/com/aggregator/**/*</excludes>
199+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
191200
</configuration>
192201
</plugin>
193202
</plugins>

src/main/config/checkstyle.xml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
-->
1919

2020
<!DOCTYPE module PUBLIC
21-
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
22-
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
21+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
22+
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
2323

2424
<!--
2525
@@ -52,7 +52,9 @@
5252

5353
<!-- Checks that a package.html file exists for each package. -->
5454
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
55-
<module name="PackageHtml"/>
55+
<module name="JavadocPackage">
56+
<property name="allowLegacy" value="true" />
57+
</module>
5658

5759
<!-- Checks whether files end with a new line. -->
5860
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -62,6 +64,15 @@
6264
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
6365
<module name="Translation"/>
6466

67+
<!-- Checks for Size Violations. -->
68+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
69+
<module name="FileLength"/>
70+
<module name="FileTabCharacter"/>
71+
72+
<module name="RegexpSingleline">
73+
<property name="format" value="\s+$"/>
74+
<property name="message" value="Line has trailing spaces."/>
75+
</module>
6576

6677
<module name="TreeWalker">
6778

@@ -112,15 +123,14 @@
112123
<!-- Checks for imports -->
113124
<!-- See http://checkstyle.sf.net/config_import.html -->
114125
<module name="AvoidStarImport"/>
115-
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
126+
<module name="IllegalImport">
127+
<property name="illegalPkgs" value="sun.*, org.apache.commons.logging"/>
128+
</module>
129+
116130
<module name="RedundantImport"/>
117131
<module name="UnusedImports"/>
118132

119133

120-
<!-- Checks for Size Violations. -->
121-
<!-- See http://checkstyle.sf.net/config_sizes.html -->
122-
<module name="FileLength"/>
123-
124134
<module name="LineLength">
125135
<property name="max" value="120"/>
126136
</module>
@@ -146,7 +156,7 @@
146156

147157
<module name="WhitespaceAfter">
148158
<!-- Default tokens and additional GENERIC_END -->
149-
<property name="tokens" value="COMMA, SEMI, TYPECAST, GENERIC_END"/>
159+
<property name="tokens" value="COMMA, SEMI, TYPECAST"/>
150160
</module>
151161

152162
<module name="WhitespaceAround">
@@ -165,7 +175,6 @@
165175
<module name="OperatorWrap"/>
166176
<module name="ParenPad"/>
167177
<module name="TypecastParenPad"/>
168-
<module name="TabCharacter"/>
169178

170179

171180
<!-- Modifier Checks -->
@@ -185,14 +194,12 @@
185194

186195
<!-- Checks for common coding problems -->
187196
<!-- See http://checkstyle.sf.net/config_coding.html -->
188-
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
189197
<module name="EmptyStatement"/>
190198
<module name="EqualsHashCode"/>
191199
<module name="IllegalInstantiation"/>
192200
<module name="InnerAssignment"/>
193201
<module name="MagicNumber"/>
194202
<module name="MissingSwitchDefault"/>
195-
<module name="RedundantThrows"/>
196203
<module name="SimplifyBooleanExpression"/>
197204
<module name="SimplifyBooleanReturn"/>
198205

@@ -209,10 +216,7 @@
209216
<!-- See http://checkstyle.sf.net/config_misc.html -->
210217
<module name="ArrayTypeStyle"/>
211218
<module name="FinalParameters"/>
212-
<module name="GenericIllegalRegexp">
213-
<property name="format" value="\s+$"/>
214-
<property name="message" value="Line has trailing spaces."/>
215-
</module>
219+
216220
<module name="TodoComment"/>
217221
<module name="UpperEll"/>
218222

src/main/java/com/pathfinder/api/GraphTraversalService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.pathfinder.api;
22

33
import java.rmi.Remote;
4-
import java.rmi.RemoteException;
54
import java.util.List;
65
import java.util.Properties;
76

@@ -17,7 +16,7 @@ public interface GraphTraversalService extends Remote {
1716
* @param destination destination point
1817
* @param limitations restrictions on the path selection, as key-value according to some API specification
1918
* @return A list of transit paths
20-
* @throws RemoteException RMI problem
19+
* @throws java.rmi.RemoteException RMI problem
2120
*/
2221
List<TransitPath> findShortestPath(String origin,
2322
String destination,

src/main/java/se/citerus/dddsample/domain/model/cargo/Cargo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package se.citerus.dddsample.domain.model.cargo;
22

33
import org.apache.commons.lang.Validate;
4-
import se.citerus.dddsample.domain.model.handling.HandlingEvent;
4+
55
import se.citerus.dddsample.domain.model.handling.HandlingHistory;
66
import se.citerus.dddsample.domain.model.location.Location;
77
import se.citerus.dddsample.domain.shared.DomainObjectUtils;
@@ -140,7 +140,7 @@ public void assignToRoute(final Itinerary itinerary) {
140140
* {@link RouteSpecification} and {@link Itinerary} are both inside the Cargo
141141
* aggregate, so changes to them cause the status to be updated <b>synchronously</b>,
142142
* but changes to the delivery history (when a cargo is handled) cause the status update
143-
* to happen <b>asynchronously</b> since {@link HandlingEvent} is in a different aggregate.
143+
* to happen <b>asynchronously</b> since {@link se.citerus.dddsample.domain.model.handling.HandlingEvent} is in a different aggregate.
144144
*
145145
* @param handlingHistory handling history
146146
*/

src/main/java/se/citerus/dddsample/domain/model/cargo/CargoRepository.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package se.citerus.dddsample.domain.model.cargo;
22

3-
import org.springframework.transaction.annotation.Transactional;
4-
53
import java.util.List;
64

75
public interface CargoRepository {

src/main/java/se/citerus/dddsample/interfaces/booking/facade/BookingServiceFacade.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package se.citerus.dddsample.interfaces.booking.facade;
22

3-
import se.citerus.dddsample.interfaces.booking.facade.dto.CargoRoutingDTO;
4-
import se.citerus.dddsample.interfaces.booking.facade.dto.LocationDTO;
5-
import se.citerus.dddsample.interfaces.booking.facade.dto.RouteCandidateDTO;
6-
7-
import java.rmi.Remote;
83
import java.rmi.RemoteException;
94
import java.util.Date;
105
import java.util.List;
116

7+
import se.citerus.dddsample.interfaces.booking.facade.dto.CargoRoutingDTO;
8+
import se.citerus.dddsample.interfaces.booking.facade.dto.LocationDTO;
9+
import se.citerus.dddsample.interfaces.booking.facade.dto.RouteCandidateDTO;
10+
1211
/**
1312
* This facade shields the domain layer - model, services, repositories -
1413
* from concerns about such things as the user interface.

0 commit comments

Comments
 (0)