Skip to content

Commit 899b35b

Browse files
committed
WW-5440 Fix inconsistent indenting
1 parent d8f8907 commit 899b35b

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

apps/showcase/src/main/java/org/apache/struts2/showcase/action/AbstractCRUDAction.java

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,62 +34,62 @@
3434

3535
public abstract class AbstractCRUDAction extends ActionSupport {
3636

37-
private static final Logger log = LogManager.getLogger(AbstractCRUDAction.class);
37+
private static final Logger log = LogManager.getLogger(AbstractCRUDAction.class);
3838

39-
private Collection availableItems;
40-
private String[] toDelete;
39+
private Collection availableItems;
40+
private String[] toDelete;
4141

42-
protected abstract Dao getDao();
42+
protected abstract Dao getDao();
4343

44-
public Collection getAvailableItems() {
45-
return availableItems;
46-
}
44+
public Collection getAvailableItems() {
45+
return availableItems;
46+
}
4747

48-
public String[] getToDelete() {
49-
return toDelete;
50-
}
48+
public String[] getToDelete() {
49+
return toDelete;
50+
}
5151

52-
@StrutsParameter
53-
public void setToDelete(String[] toDelete) {
54-
this.toDelete = toDelete;
55-
}
52+
@StrutsParameter
53+
public void setToDelete(String[] toDelete) {
54+
this.toDelete = toDelete;
55+
}
5656

57-
public String list() throws Exception {
58-
this.availableItems = getDao().findAll();
59-
if (log.isDebugEnabled()) {
60-
log.debug("AbstractCRUDAction - [list]: " + (availableItems != null ? "" + availableItems.size() : "no") + " items found");
61-
}
62-
return execute();
63-
}
57+
public String list() throws Exception {
58+
this.availableItems = getDao().findAll();
59+
if (log.isDebugEnabled()) {
60+
log.debug("AbstractCRUDAction - [list]: " + (availableItems != null ? "" + availableItems.size() : "no") + " items found");
61+
}
62+
return execute();
63+
}
6464

65-
public String delete() throws Exception {
66-
if (toDelete != null) {
67-
int count = 0;
65+
public String delete() throws Exception {
66+
if (toDelete != null) {
67+
int count = 0;
6868
for (String s : toDelete) {
6969
count = count + getDao().delete(s);
7070
}
71-
if (log.isDebugEnabled()) {
71+
if (log.isDebugEnabled()) {
7272
log.debug("AbstractCRUDAction - [delete]: {} items deleted.", count);
73-
}
74-
}
75-
return SUCCESS;
76-
}
73+
}
74+
}
75+
return SUCCESS;
76+
}
7777

78-
/**
79-
* Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle.
80-
*
81-
* @param tryId The id to try to get persistent object for
82-
* @param tryObject The object, induced by first params invocation, possibly containing id to try to get persistent
83-
* object for
84-
* @return The persistent object, if found. <tt>null</tt> otherwise.
85-
*/
86-
protected IdEntity fetch(Serializable tryId, IdEntity tryObject) {
87-
IdEntity result = null;
88-
if (tryId != null) {
89-
result = getDao().get(tryId);
90-
} else if (tryObject != null) {
91-
result = getDao().get(tryObject.getId());
92-
}
93-
return result;
94-
}
78+
/**
79+
* Utility method for fetching already persistent object from storage for usage in params-prepare-params cycle.
80+
*
81+
* @param tryId The id to try to get persistent object for
82+
* @param tryObject The object, induced by first params invocation, possibly containing id to try to get persistent
83+
* object for
84+
* @return The persistent object, if found. <tt>null</tt> otherwise.
85+
*/
86+
protected IdEntity fetch(Serializable tryId, IdEntity tryObject) {
87+
IdEntity result = null;
88+
if (tryId != null) {
89+
result = getDao().get(tryId);
90+
} else if (tryObject != null) {
91+
result = getDao().get(tryObject.getId());
92+
}
93+
return result;
94+
}
9595
}

0 commit comments

Comments
 (0)