Skip to content

Commit 6ef840f

Browse files
anuragagarwal561994iluwatar
authored andcommitted
Resolves checkstyle errors for naked-objects null-object object-mother object-pool observer queue-load-leveling (iluwatar#1082)
* Reduces checkstyle errors in naked-objects * Reduces checkstyle errors in null-object * Reduces checkstyle errors in object-mother * Reduces checkstyle errors in object-pool * Reduces checkstyle errors in observer * Reduces checkstyle errors in queue-load-leveling
1 parent 1e76d91 commit 6ef840f

File tree

41 files changed

+242
-288
lines changed

Some content is hidden

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

41 files changed

+242
-288
lines changed

Diff for: naked-objects/dom/src/main/java/domainapp/dom/app/homepage/HomePageService.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
import org.apache.isis.applib.annotation.SemanticsOf;
3232

3333
/**
34-
* HomePage Domain Service
34+
* HomePage Domain Service.
35+
*
3536
* @see HomePageViewModel linked view to HomePage
3637
*/
3738
@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)

Diff for: naked-objects/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@
2323

2424
package domainapp.dom.app.homepage;
2525

26-
import java.util.List;
27-
28-
import org.apache.isis.applib.annotation.ViewModel;
29-
3026
import domainapp.dom.modules.simple.SimpleObject;
3127
import domainapp.dom.modules.simple.SimpleObjects;
28+
import java.util.List;
29+
import org.apache.isis.applib.annotation.ViewModel;
3230

3331
/**
34-
* Model linked to the HomePage
35-
* The underlying layout is specified by json
32+
* Model linked to the HomePage The underlying layout is specified by json.
33+
*
3634
* @see HomePageService - Service Linked to the HomePage
3735
*/
3836
@ViewModel

Diff for: naked-objects/dom/src/main/java/domainapp/dom/app/homepage/HomePageViewModel.layout.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
* limitations under the License.
1616
*/
1717
{
18-
"columns": [
19-
{
20-
"span": 0,
21-
"memberGroups": {}
22-
},
23-
{
24-
"span": 0,
25-
"memberGroups": {}
26-
},
27-
{
28-
"span": 0,
29-
"memberGroups": {}
30-
},
31-
{
32-
"span": 12,
33-
"collections": {
34-
"objects": {
35-
"collectionLayout": {
36-
"render": "EAGERLY"
37-
}
38-
}
39-
}
18+
"columns": [
19+
{
20+
"span": 0,
21+
"memberGroups": {}
22+
},
23+
{
24+
"span": 0,
25+
"memberGroups": {}
26+
},
27+
{
28+
"span": 0,
29+
"memberGroups": {}
30+
},
31+
{
32+
"span": 12,
33+
"collections": {
34+
"objects": {
35+
"collectionLayout": {
36+
"render": "EAGERLY"
37+
}
4038
}
41-
],
42-
"actions": {}
39+
}
40+
}
41+
],
42+
"actions": {}
4343
}

Diff for: naked-objects/dom/src/main/java/domainapp/dom/modules/simple/SimpleObject.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import javax.jdo.JDOHelper;
2727
import javax.jdo.annotations.IdentityType;
2828
import javax.jdo.annotations.VersionStrategy;
29-
3029
import org.apache.isis.applib.DomainObjectContainer;
3130
import org.apache.isis.applib.Identifier;
3231
import org.apache.isis.applib.annotation.Action;
@@ -43,7 +42,7 @@
4342
import org.apache.isis.applib.util.ObjectContracts;
4443

4544
/**
46-
* Definition of a Simple Object
45+
* Definition of a Simple Object.
4746
*/
4847
@javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "simple",
4948
table = "SimpleObject")
@@ -87,11 +86,11 @@ public void setName(final String name) {
8786
// region > updateName (action)
8887

8988
/**
90-
* Event used to update the Name in the Domain
89+
* Event used to update the Name in the Domain.
9190
*/
9291
public static class UpdateNameDomainEvent extends ActionDomainEvent<SimpleObject> {
9392
public UpdateNameDomainEvent(final SimpleObject source, final Identifier identifier,
94-
final Object... arguments) {
93+
final Object... arguments) {
9594
super(source, identifier, arguments);
9695
}
9796
}

Diff for: naked-objects/dom/src/main/java/domainapp/dom/modules/simple/SimpleObject.layout.json

+35-35
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,42 @@
1515
* limitations under the License.
1616
*/
1717
{
18-
"columns": [
19-
{
20-
"span": 6,
21-
"memberGroups": {
22-
"General": {
23-
"members": {
24-
"name": {
25-
"actions": {
26-
"updateName": {
27-
"actionLayout": {
28-
"position": "BOTTOM"
29-
}
30-
}
31-
}
32-
},
33-
"versionSequence": {
34-
"propertyLayout": {
35-
"name": "version"
36-
}
37-
}
38-
}
18+
"columns": [
19+
{
20+
"span": 6,
21+
"memberGroups": {
22+
"General": {
23+
"members": {
24+
"name": {
25+
"actions": {
26+
"updateName": {
27+
"actionLayout": {
28+
"position": "BOTTOM"
29+
}
3930
}
31+
}
32+
},
33+
"versionSequence": {
34+
"propertyLayout": {
35+
"name": "version"
36+
}
4037
}
41-
},
42-
{
43-
"span": 0,
44-
"memberGroups": {}
45-
},
46-
{
47-
"span": 0,
48-
"memberGroups": {}
49-
},
50-
{
51-
"span": 6,
52-
"collections": {}
38+
}
5339
}
54-
],
55-
"actions": {}
40+
}
41+
},
42+
{
43+
"span": 0,
44+
"memberGroups": {}
45+
},
46+
{
47+
"span": 0,
48+
"memberGroups": {}
49+
},
50+
{
51+
"span": 6,
52+
"collections": {}
53+
}
54+
],
55+
"actions": {}
5656
}

Diff for: naked-objects/dom/src/main/java/domainapp/dom/modules/simple/SimpleObjects.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
package domainapp.dom.modules.simple;
2525

2626
import java.util.List;
27-
2827
import org.apache.isis.applib.DomainObjectContainer;
2928
import org.apache.isis.applib.Identifier;
3029
import org.apache.isis.applib.annotation.Action;
@@ -40,7 +39,7 @@
4039
import org.apache.isis.applib.services.i18n.TranslatableString;
4140

4241
/**
43-
* Domain Service for Simple Objects
42+
* Domain Service for Simple Objects.
4443
*/
4544
@DomainService(repositoryFor = SimpleObject.class)
4645
@DomainServiceLayout(menuOrder = "10")
@@ -82,18 +81,18 @@ public List<SimpleObject> findByName(@ParameterLayout(named = "Name") final Stri
8281
// endregion
8382

8483
/**
85-
* Create Domain Event on SimpleObjects
84+
* Create Domain Event on SimpleObjects.
8685
*/
8786
// region > create (action)
8887
public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjects> {
8988
public CreateDomainEvent(final SimpleObjects source, final Identifier identifier,
90-
final Object... arguments) {
89+
final Object... arguments) {
9190
super(source, identifier, arguments);
9291
}
9392
}
9493

9594
/**
96-
* Create simple object
95+
* Create simple object.
9796
*/
9897
@Action(domainEvent = CreateDomainEvent.class)
9998
@MemberOrder(sequence = "3")

Diff for: naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesProvider.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323

2424
package domainapp.fixture;
2525

26+
import domainapp.fixture.scenarios.RecreateSimpleObjects;
2627
import org.apache.isis.applib.annotation.DomainService;
2728
import org.apache.isis.applib.annotation.NatureOfService;
2829
import org.apache.isis.applib.fixturescripts.FixtureScripts;
2930
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification;
3031
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider;
3132

32-
import domainapp.fixture.scenarios.RecreateSimpleObjects;
33-
3433
/**
3534
* Specifies where to find fixtures, and other settings.
3635
*/

Diff for: naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectCreate.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323

2424
package domainapp.fixture.modules.simple;
2525

26-
import org.apache.isis.applib.fixturescripts.FixtureScript;
27-
2826
import domainapp.dom.modules.simple.SimpleObject;
2927
import domainapp.dom.modules.simple.SimpleObjects;
28+
import org.apache.isis.applib.fixturescripts.FixtureScript;
3029

3130
/**
32-
* Fixture to create a simple object
31+
* Fixture to create a simple object.
3332
*/
3433
public class SimpleObjectCreate extends FixtureScript {
3534

@@ -46,7 +45,7 @@ public class SimpleObjectCreate extends FixtureScript {
4645
private String name;
4746

4847
/**
49-
* Name of the object (required)
48+
* Name of the object (required).
5049
*/
5150
public String getName() {
5251
return name;

Diff for: naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
2828

2929
/**
30-
* TearDown/Cleanup for SimpleObjects
30+
* TearDown/Cleanup for SimpleObjects.
3131
*/
3232
public class SimpleObjectsTearDown extends FixtureScript {
3333

Diff for: naked-objects/fixture/src/main/java/domainapp/fixture/scenarios/RecreateSimpleObjects.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@
2727
import domainapp.dom.modules.simple.SimpleObject;
2828
import domainapp.fixture.modules.simple.SimpleObjectCreate;
2929
import domainapp.fixture.modules.simple.SimpleObjectsTearDown;
30-
import org.apache.isis.applib.fixturescripts.FixtureScript;
31-
3230
import java.util.Collections;
3331
import java.util.List;
32+
import org.apache.isis.applib.fixturescripts.FixtureScript;
3433

3534

3635
/**
37-
* Create a bunch of simple Objects
36+
* Create a bunch of simple Objects.
3837
*/
3938
public class RecreateSimpleObjects extends FixtureScript {
4039

4140
public final List<String> names = Collections.unmodifiableList(List.of("Foo", "Bar", "Baz",
42-
"Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
41+
"Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
4342

4443
// region > number (optional input)
4544
private Integer number;

Diff for: naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java

+17-25
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,38 @@
2323

2424
package domainapp.webapp;
2525

26-
import java.io.IOException;
27-
import java.io.InputStream;
28-
import java.nio.charset.Charset;
29-
import java.util.List;
30-
31-
import javax.servlet.http.HttpServletRequest;
32-
3326
import com.google.common.base.Joiner;
3427
import com.google.common.io.Resources;
3528
import com.google.inject.AbstractModule;
3629
import com.google.inject.Module;
3730
import com.google.inject.name.Names;
3831
import com.google.inject.util.Modules;
3932
import com.google.inject.util.Providers;
40-
33+
import de.agilecoders.wicket.core.Bootstrap;
34+
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
35+
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme;
36+
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvider;
37+
import java.io.IOException;
38+
import java.io.InputStream;
39+
import java.nio.charset.Charset;
40+
import java.util.List;
41+
import javax.servlet.http.HttpServletRequest;
42+
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
43+
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
4144
import org.apache.wicket.Session;
4245
import org.apache.wicket.request.IRequestParameters;
4346
import org.apache.wicket.request.Request;
4447
import org.apache.wicket.request.Response;
4548
import org.apache.wicket.request.http.WebRequest;
46-
47-
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
48-
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
49-
50-
import de.agilecoders.wicket.core.Bootstrap;
51-
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
52-
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme;
53-
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvider;
5449
import org.slf4j.Logger;
5550
import org.slf4j.LoggerFactory;
5651

5752

5853
/**
5954
* As specified in <tt>web.xml</tt>.
60-
*
61-
* <p>
62-
* See:
63-
*
55+
*
56+
* <p>See:
57+
*
6458
* <pre>
6559
* &lt;filter&gt;
6660
* &lt;filter-name&gt;wicket&lt;/filter-name&gt;
@@ -71,7 +65,6 @@
7165
* &lt;/init-param&gt;
7266
* &lt;/filter&gt;
7367
* </pre>
74-
*
7568
*/
7669
public class SimpleApplication extends IsisWicketApplication {
7770

@@ -80,11 +73,10 @@ public class SimpleApplication extends IsisWicketApplication {
8073

8174
/**
8275
* uncomment for a (slightly hacky) way of allowing logins using query args, eg:
83-
*
76+
*
8477
* <tt>{@code ?user=sven&pass=pass}</tt>
85-
*
86-
* <p>
87-
* for demos only, obvious.
78+
*
79+
* <p>for demos only, obvious.
8880
*/
8981
private static final boolean DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS = false;
9082

0 commit comments

Comments
 (0)