Skip to content

Commit ed27018

Browse files
committed
Merge branch 'master' into jsf2
2 parents 3515941 + 2e23d8f commit ed27018

File tree

9 files changed

+23
-45
lines changed

9 files changed

+23
-45
lines changed

src/ru/mystamps/db/SuspiciousActivities.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import javax.sql.DataSource;
1111

1212
public class SuspiciousActivities {
13-
private DataSource ds = null;
13+
private DataSource ds;
1414

1515
private static final String logEventQuery =
1616
"INSERT INTO `suspicious_activities` " +
@@ -24,8 +24,7 @@ public class SuspiciousActivities {
2424
public SuspiciousActivities()
2525
throws NamingException {
2626

27-
Context env = null;
28-
env = (Context)new InitialContext().lookup("java:comp/env");
27+
Context env = (Context)new InitialContext().lookup("java:comp/env");
2928
ds = (DataSource)env.lookup("jdbc/mystamps");
3029
}
3130

src/ru/mystamps/db/Users.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import ru.mystamps.site.beans.UserBean;
1616

1717
public class Users {
18-
private Logger log = null;
19-
private DataSource ds = null;
18+
private Logger log = Logger.getRootLogger();
19+
private DataSource ds;
2020

2121
/**
2222
* @see add()
@@ -71,10 +71,7 @@ public class Users {
7171
public Users()
7272
throws NamingException {
7373

74-
log = Logger.getRootLogger();
75-
76-
Context env = null;
77-
env = (Context)new InitialContext().lookup("java:comp/env");
74+
Context env = (Context)new InitialContext().lookup("java:comp/env");
7875
ds = (DataSource)env.lookup("jdbc/mystamps");
7976
}
8077

src/ru/mystamps/db/UsersActivation.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import org.apache.log4j.Logger;
1414

1515
public class UsersActivation {
16-
private Logger log = null;
17-
private DataSource ds = null;
16+
private Logger log = Logger.getRootLogger();
17+
private DataSource ds;
1818

1919
/**
2020
* @see add()
@@ -44,10 +44,7 @@ public class UsersActivation {
4444
public UsersActivation()
4545
throws NamingException {
4646

47-
log = Logger.getRootLogger();
48-
49-
Context env = null;
50-
env = (Context)new InitialContext().lookup("java:comp/env");
47+
Context env = (Context)new InitialContext().lookup("java:comp/env");
5148
ds = (DataSource)env.lookup("jdbc/mystamps");
5249
}
5350

src/ru/mystamps/site/beans/ActivateBean.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public class ActivateBean {
3131
@ManagedProperty(value="#{param.key}")
3232
private String actKey;
3333

34-
private Logger log = null;
35-
36-
public ActivateBean() {
37-
log = Logger.getRootLogger();
38-
}
34+
private Logger log = Logger.getRootLogger();
3935

4036
public void setLoginInput(UIInput loginInput) {
4137
this.loginInput = loginInput;

src/ru/mystamps/site/beans/SuspiciousEventBean.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@
1010

1111
public class SuspiciousEventBean {
1212

13-
private String type = null;
14-
private String page = null;
15-
private String ip = null;
16-
private String refererPage = null;
17-
private String userAgent = null;
13+
private String type;
14+
private String page;
15+
private String ip;
16+
private String refererPage;
17+
private String userAgent;
1818

19-
private Logger log = null;
20-
private SuspiciousActivities act = null;
19+
private Logger log = Logger.getRootLogger();
20+
private SuspiciousActivities act;
2121

2222
/**
2323
* @throws NamingException
2424
**/
2525
public SuspiciousEventBean()
2626
throws NamingException {
27-
log = Logger.getRootLogger();
2827
act = new SuspiciousActivities();
2928
}
3029

src/ru/mystamps/site/beans/UserBean.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
@ManagedBean(name="user")
77
@SessionScoped
88
public class UserBean {
9-
private Long uid = - 1L;
10-
private String name = null;
11-
private String login = null;
9+
private Long uid = - 1L;
10+
private String name;
11+
private String login;
1212

1313
public void setUid(Long uid) {
1414
this.uid = uid;

src/ru/mystamps/site/filters/MaintenanceFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
public class MaintenanceFilter implements Filter {
1616

17-
private FilterConfig config = null;
18-
private Logger log = null;
17+
private FilterConfig config;
18+
private Logger log;
1919
private static final String MAINTENANCE_PAGE_URL = "/maintenance.jsf";
2020

2121
@Override

src/ru/mystamps/site/validators/ActivationKeyExistsValidator.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020
@FacesValidator(value="ActivationKeyExists")
2121
public class ActivationKeyExistsValidator implements Validator {
2222

23-
private Logger log = null;
24-
25-
public ActivationKeyExistsValidator() {
26-
log = Logger.getRootLogger();
27-
}
28-
23+
private Logger log = Logger.getRootLogger();
2924

3025
/**
3126
* Check that activation key exists in database.

src/ru/mystamps/site/validators/LoginNotExistsValidator.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020
@FacesValidator(value="LoginNotExists")
2121
public class LoginNotExistsValidator implements Validator {
2222

23-
private Logger log = null;
24-
25-
public LoginNotExistsValidator() {
26-
log = Logger.getRootLogger();
27-
}
28-
23+
private Logger log = Logger.getRootLogger();
2924

3025
/**
3126
* Check that login does not exists in database.

0 commit comments

Comments
 (0)