File tree Expand file tree Collapse file tree 9 files changed +23
-45
lines changed Expand file tree Collapse file tree 9 files changed +23
-45
lines changed Original file line number Diff line number Diff line change 10
10
import javax .sql .DataSource ;
11
11
12
12
public class SuspiciousActivities {
13
- private DataSource ds = null ;
13
+ private DataSource ds ;
14
14
15
15
private static final String logEventQuery =
16
16
"INSERT INTO `suspicious_activities` " +
@@ -24,8 +24,7 @@ public class SuspiciousActivities {
24
24
public SuspiciousActivities ()
25
25
throws NamingException {
26
26
27
- Context env = null ;
28
- env = (Context )new InitialContext ().lookup ("java:comp/env" );
27
+ Context env = (Context )new InitialContext ().lookup ("java:comp/env" );
29
28
ds = (DataSource )env .lookup ("jdbc/mystamps" );
30
29
}
31
30
Original file line number Diff line number Diff line change 15
15
import ru .mystamps .site .beans .UserBean ;
16
16
17
17
public class Users {
18
- private Logger log = null ;
19
- private DataSource ds = null ;
18
+ private Logger log = Logger . getRootLogger () ;
19
+ private DataSource ds ;
20
20
21
21
/**
22
22
* @see add()
@@ -71,10 +71,7 @@ public class Users {
71
71
public Users ()
72
72
throws NamingException {
73
73
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" );
78
75
ds = (DataSource )env .lookup ("jdbc/mystamps" );
79
76
}
80
77
Original file line number Diff line number Diff line change 13
13
import org .apache .log4j .Logger ;
14
14
15
15
public class UsersActivation {
16
- private Logger log = null ;
17
- private DataSource ds = null ;
16
+ private Logger log = Logger . getRootLogger () ;
17
+ private DataSource ds ;
18
18
19
19
/**
20
20
* @see add()
@@ -44,10 +44,7 @@ public class UsersActivation {
44
44
public UsersActivation ()
45
45
throws NamingException {
46
46
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" );
51
48
ds = (DataSource )env .lookup ("jdbc/mystamps" );
52
49
}
53
50
Original file line number Diff line number Diff line change @@ -31,11 +31,7 @@ public class ActivateBean {
31
31
@ ManagedProperty (value ="#{param.key}" )
32
32
private String actKey ;
33
33
34
- private Logger log = null ;
35
-
36
- public ActivateBean () {
37
- log = Logger .getRootLogger ();
38
- }
34
+ private Logger log = Logger .getRootLogger ();
39
35
40
36
public void setLoginInput (UIInput loginInput ) {
41
37
this .loginInput = loginInput ;
Original file line number Diff line number Diff line change 10
10
11
11
public class SuspiciousEventBean {
12
12
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 ;
18
18
19
- private Logger log = null ;
20
- private SuspiciousActivities act = null ;
19
+ private Logger log = Logger . getRootLogger () ;
20
+ private SuspiciousActivities act ;
21
21
22
22
/**
23
23
* @throws NamingException
24
24
**/
25
25
public SuspiciousEventBean ()
26
26
throws NamingException {
27
- log = Logger .getRootLogger ();
28
27
act = new SuspiciousActivities ();
29
28
}
30
29
Original file line number Diff line number Diff line change 6
6
@ ManagedBean (name ="user" )
7
7
@ SessionScoped
8
8
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 ;
12
12
13
13
public void setUid (Long uid ) {
14
14
this .uid = uid ;
Original file line number Diff line number Diff line change 14
14
15
15
public class MaintenanceFilter implements Filter {
16
16
17
- private FilterConfig config = null ;
18
- private Logger log = null ;
17
+ private FilterConfig config ;
18
+ private Logger log ;
19
19
private static final String MAINTENANCE_PAGE_URL = "/maintenance.jsf" ;
20
20
21
21
@ Override
Original file line number Diff line number Diff line change 20
20
@ FacesValidator (value ="ActivationKeyExists" )
21
21
public class ActivationKeyExistsValidator implements Validator {
22
22
23
- private Logger log = null ;
24
-
25
- public ActivationKeyExistsValidator () {
26
- log = Logger .getRootLogger ();
27
- }
28
-
23
+ private Logger log = Logger .getRootLogger ();
29
24
30
25
/**
31
26
* Check that activation key exists in database.
Original file line number Diff line number Diff line change 20
20
@ FacesValidator (value ="LoginNotExists" )
21
21
public class LoginNotExistsValidator implements Validator {
22
22
23
- private Logger log = null ;
24
-
25
- public LoginNotExistsValidator () {
26
- log = Logger .getRootLogger ();
27
- }
28
-
23
+ private Logger log = Logger .getRootLogger ();
29
24
30
25
/**
31
26
* Check that login does not exists in database.
You can’t perform that action at this time.
0 commit comments