Skip to content

Commit 09585c3

Browse files
committed
Removed AvoidStarImport Rule
Added JavaDocType Rule
1 parent 175e9f5 commit 09585c3

File tree

105 files changed

+575
-282
lines changed

Some content is hidden

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

105 files changed

+575
-282
lines changed

abstract-factory/src/test/java/com/iluwatar/abstractfactory/AbstractFactoryTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
import org.junit.Before;
2929
import org.junit.Test;
3030

31+
/**
32+
* Test for abstract factory
33+
*/
3134
public class AbstractFactoryTest {
3235

3336
private App app = new App();

aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/App.java

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
import org.springframework.boot.SpringApplication;
2626
import org.springframework.boot.autoconfigure.SpringBootApplication;
2727

28+
/**
29+
* Spring Boot EntryPoint Class
30+
*/
2831
@SpringBootApplication
2932
public class App {
3033

aggregator-microservices/aggregator-service/src/test/java/com/iluwatar/aggregator/microservices/AggregatorTest.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@
2222
*/
2323
package com.iluwatar.aggregator.microservices;
2424

25+
import static org.junit.Assert.assertEquals;
26+
import static org.mockito.Mockito.when;
27+
2528
import org.junit.Before;
2629
import org.junit.Test;
2730
import org.mockito.InjectMocks;
2831
import org.mockito.Mock;
2932
import org.mockito.MockitoAnnotations;
3033

31-
import static org.junit.Assert.assertEquals;
32-
import static org.mockito.Mockito.when;
33-
34+
/**
35+
* Test Aggregation of domain objects
36+
*/
3437
public class AggregatorTest {
3538

3639
@InjectMocks
@@ -64,4 +67,4 @@ public void testGetProduct() {
6467
assertEquals(inventories, testProduct.getProductInventories());
6568
}
6669

67-
}
70+
}

aggregator-microservices/information-microservice/src/main/java/com/iluwatar/information/microservice/InformationController.java

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
import org.springframework.web.bind.annotation.RequestMethod;
2727
import org.springframework.web.bind.annotation.RestController;
2828

29+
/**
30+
* Controller providing endpoints to retrieve information about products
31+
*/
2932
@RestController
3033
public class InformationController {
3134

aggregator-microservices/information-microservice/src/test/java/com/iluwatar/information/microservice/InformationControllerTest.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
import org.junit.Assert;
2626
import org.junit.Test;
2727

28+
/**
29+
* Test for Information Rest Controller
30+
*/
2831
public class InformationControllerTest {
2932

3033
@Test
@@ -36,4 +39,4 @@ public void shouldGetProductTitle() {
3639
Assert.assertEquals("The Product Title.", title);
3740
}
3841

39-
}
42+
}

aggregator-microservices/inventory-microservice/src/main/java/com/iluwatar/inventory/microservice/InventoryController.java

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
import org.springframework.web.bind.annotation.RequestMethod;
2727
import org.springframework.web.bind.annotation.RestController;
2828

29+
/**
30+
* Controller providing endpoints to retrieve product inventories
31+
*/
2932
@RestController
3033
public class InventoryController {
3134

aggregator-microservices/inventory-microservice/src/test/java/com/iluwatar/inventory/microservice/InventoryControllerTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
import org.junit.Assert;
2626
import org.junit.Test;
2727

28+
/**
29+
* Test Inventory Rest Controller
30+
*/
2831
public class InventoryControllerTest {
29-
3032
@Test
3133
public void testGetProductInventories() throws Exception {
3234
InventoryController inventoryController = new InventoryController();
@@ -35,4 +37,4 @@ public void testGetProductInventories() throws Exception {
3537

3638
Assert.assertEquals(5, numberOfInventories);
3739
}
38-
}
40+
}

api-gateway/api-gateway-service/src/main/java/com/iluwatar/api/gateway/ImageClientImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* An adapter to communicate with the Image microservice
3636
*/
3737
@Component
38-
public class ImageClientImpl implements ImageClient{
38+
public class ImageClientImpl implements ImageClient {
3939
/**
4040
* Makes a simple HTTP Get request to the Image microservice
4141
* @return The path to the image

api-gateway/api-gateway-service/src/main/java/com/iluwatar/api/gateway/PriceClientImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* An adapter to communicate with the Price microservice
3636
*/
3737
@Component
38-
public class PriceClientImpl implements PriceClient{
38+
public class PriceClientImpl implements PriceClient {
3939
/**
4040
* Makes a simple HTTP Get request to the Price microservice
4141
* @return The price of the product

api-gateway/api-gateway-service/src/test/java/com/iluwatar/api/gateway/ApiGatewayTest.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@
2222
*/
2323
package com.iluwatar.api.gateway;
2424

25+
import static org.junit.Assert.assertEquals;
26+
import static org.mockito.Mockito.when;
27+
2528
import org.junit.Before;
2629
import org.junit.Test;
2730
import org.mockito.InjectMocks;
2831
import org.mockito.Mock;
2932
import org.mockito.MockitoAnnotations;
3033

31-
import static org.junit.Assert.assertEquals;
32-
import static org.mockito.Mockito.when;
33-
34+
/**
35+
* Test API Gateway Pattern
36+
*/
3437
public class ApiGatewayTest {
3538

3639
@InjectMocks

api-gateway/image-microservice/src/test/java/com/iluwatar/image/microservice/ImageControllerTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
import org.junit.Assert;
2626
import org.junit.Test;
2727

28+
/**
29+
* Test for Image Rest Controller
30+
*/
2831
public class ImageControllerTest {
2932
@Test
3033
public void testGetImagePath() {

api-gateway/price-microservice/src/test/java/com/iluwatar/price/microservice/PriceControllerTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
import org.junit.Assert;
2626
import org.junit.Test;
2727

28+
29+
/**
30+
* Test for Price Rest Controller
31+
*/
2832
public class PriceControllerTest {
2933
@Test
3034
public void testgetPrice() {

async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/AsyncResult.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import java.util.concurrent.ExecutionException;
2626

2727
/**
28-
*
2928
* AsyncResult interface
29+
* @param <T> parameter returned when getValue is invoked
3030
*/
3131
public interface AsyncResult<T> {
3232

checkstyle.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
Source = https://github.com/checkstyle/checkstyle/tree/master/src/main/resources
3333
3434
Checkstyle configurartion that checks the Google coding conventions from:
35-
35+
3636
- Google Java Style
3737
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
38-
38+
3939
Checkstyle is very configurable. Be sure to read the documentation at
4040
http://checkstyle.sf.net (or in your downloaded distribution).
4141
@@ -44,12 +44,12 @@
4444
To completely disable a check, just comment it out or delete it from the file.
4545
4646
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
47-
47+
4848
-->
4949

5050
<module name="Checker">
5151
<property name="charset" value="UTF-8"/>
52-
52+
5353
<property name="fileExtensions" value="java, xml, properties"/>
5454

5555
<property name="severity" value="error"/>
@@ -77,7 +77,6 @@
7777
<property name="max" value="120"/>
7878
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
7979
</module>
80-
<module name="AvoidStarImport"/>
8180
<module name="OneTopLevelClass"/>
8281
<module name="NoLineWrap"/>
8382
<module name="EmptyBlock">
@@ -120,7 +119,7 @@
120119
<property name="tokens" value="COMMA"/>
121120
<property name="option" value="EOL"/>
122121
</module>
123-
122+
124123
<!-- Checks for Naming Conventions. -->
125124
<!-- See http://checkstyle.sf.net/config_naming.html -->
126125
<module name="ConstantName"/>
@@ -185,6 +184,10 @@
185184
<property name="allowedAnnotations" value="Override, Test, Before, After, Parameters, Given, When, BeforeClass, AfterClass, Parameterized"/>
186185
<property name="allowThrowsTagsForSubclasses" value="true"/>
187186
</module>
187+
<module name="JavadocType">
188+
<property name="scope" value="public"/>
189+
<property name="allowUnknownTags" value="true"/>
190+
</module>
188191
<module name="MethodName">
189192
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
190193
<message key="name.invalidPattern"

dao/src/main/java/com/iluwatar/dao/CustomerSchemaSql.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@
2222
*/
2323
package com.iluwatar.dao;
2424

25+
/**
26+
* Customer Schema SQL Class
27+
*/
2528
public final class CustomerSchemaSql {
2629

2730
private CustomerSchemaSql() {}
2831

29-
public static final String CREATE_SCHEMA_SQL = "CREATE TABLE CUSTOMERS (ID NUMBER, FNAME VARCHAR(100), "
32+
public static final String CREATE_SCHEMA_SQL = "CREATE TABLE CUSTOMERS (ID NUMBER, FNAME VARCHAR(100), "
3033
+ "LNAME VARCHAR(100))";
31-
34+
3235
public static final String DELETE_SCHEMA_SQL = "DROP TABLE CUSTOMERS";
33-
36+
3437
}

dao/src/test/java/com/iluwatar/dao/CustomerTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
import org.junit.Before;
3030
import org.junit.Test;
3131

32+
/**
33+
* Tests {@link Customer}.
34+
*/
3235
public class CustomerTest {
3336

3437
private Customer customer;

data-mapper/src/main/java/com/iluwatar/datamapper/Student.java

+13-10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222
import java.io.Serializable;
2323

24+
/**
25+
* Class defining Student
26+
*/
2427
public final class Student implements Serializable {
2528

2629
private static final long serialVersionUID = 1L;
@@ -32,7 +35,7 @@ public final class Student implements Serializable {
3235

3336
/**
3437
* Use this constructor to create a Student with all details
35-
*
38+
*
3639
* @param studentId as unique student id
3740
* @param name as student name
3841
* @param grade as respective grade of student
@@ -46,55 +49,55 @@ public Student(final int studentId, final String name, final char grade) {
4649
}
4750

4851
/**
49-
*
52+
*
5053
* @return the student id
5154
*/
5255
public int getStudentId() {
5356
return studentId;
5457
}
5558

5659
/**
57-
*
60+
*
5861
* @param studentId as unique student id
5962
*/
6063
public void setStudentId(final int studentId) {
6164
this.studentId = studentId;
6265
}
6366

6467
/**
65-
*
68+
*
6669
* @return name of student
6770
*/
6871
public String getName() {
6972
return name;
7073
}
7174

7275
/**
73-
*
76+
*
7477
* @param name as 'name' of student
7578
*/
7679
public void setName(final String name) {
7780
this.name = name;
7881
}
7982

8083
/**
81-
*
84+
*
8285
* @return grade of student
8386
*/
8487
public char getGrade() {
8588
return grade;
8689
}
8790

8891
/**
89-
*
92+
*
9093
* @param grade as 'grade of student'
9194
*/
9295
public void setGrade(final char grade) {
9396
this.grade = grade;
9497
}
9598

9699
/**
97-
*
100+
*
98101
*/
99102
@Override
100103
public boolean equals(final Object inputObject) {
@@ -120,7 +123,7 @@ public boolean equals(final Object inputObject) {
120123
}
121124

122125
/**
123-
*
126+
*
124127
*/
125128
@Override
126129
public int hashCode() {
@@ -130,7 +133,7 @@ public int hashCode() {
130133
}
131134

132135
/**
133-
*
136+
*
134137
*/
135138
@Override
136139
public String toString() {

data-mapper/src/main/java/com/iluwatar/datamapper/StudentDataMapper.java

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
import java.util.Optional;
2222

23+
/**
24+
* Interface lists out the possible behaviour for all possible student mappers
25+
*/
2326
public interface StudentDataMapper {
2427

2528
Optional<Student> find(int studentId);

data-mapper/src/main/java/com/iluwatar/datamapper/StudentDataMapperImpl.java

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
import java.util.List;
2323
import java.util.Optional;
2424

25+
/**
26+
* Implementation of Actions on Students Data
27+
*/
2528
public final class StudentDataMapperImpl implements StudentDataMapper {
2629

2730
/* Note: Normally this would be in the form of an actual database */

0 commit comments

Comments
 (0)