View | Details | Raw Unified | Return to bug 50017
Collapse All | Expand All

(-)java/javax/servlet/AsyncEvent.java (-4 / +10 lines)
Lines 21-33 Link Here
21
 * @since Servlet 3.0
21
 * @since Servlet 3.0
22
 */
22
 */
23
public class AsyncEvent {
23
public class AsyncEvent {
24
    private AsyncContext context;
24
    private final AsyncContext context;
25
    private ServletRequest request;
25
    private final ServletRequest request;
26
    private ServletResponse response;
26
    private final ServletResponse response;
27
    private Throwable throwable;
27
    private final Throwable throwable;
28
    
28
    
29
    public AsyncEvent(AsyncContext context) {
29
    public AsyncEvent(AsyncContext context) {
30
        this.context = context;
30
        this.context = context;
31
        this.request = null;
32
        this.response = null;
33
        this.throwable = null;
31
    }
34
    }
32
35
33
    public AsyncEvent(AsyncContext context, ServletRequest request,
36
    public AsyncEvent(AsyncContext context, ServletRequest request,
Lines 35-45 Link Here
35
        this.context = context;
38
        this.context = context;
36
        this.request = request;
39
        this.request = request;
37
        this.response = response;
40
        this.response = response;
41
        this.throwable = null;
38
    }
42
    }
39
    
43
    
40
    public AsyncEvent(AsyncContext context, Throwable throwable) {
44
    public AsyncEvent(AsyncContext context, Throwable throwable) {
41
        this.context = context;
45
        this.context = context;
42
        this.throwable = throwable;
46
        this.throwable = throwable;
47
        this.request = null;
48
        this.response = null;
43
    }
49
    }
44
50
45
    public AsyncEvent(AsyncContext context, ServletRequest request,
51
    public AsyncEvent(AsyncContext context, ServletRequest request,
(-)java/javax/servlet/HttpConstraintElement.java (-3 / +9 lines)
Lines 31-45 Link Here
31
    private static final ResourceBundle lStrings =
31
    private static final ResourceBundle lStrings =
32
        ResourceBundle.getBundle(LSTRING_FILE);
32
        ResourceBundle.getBundle(LSTRING_FILE);
33
33
34
    private EmptyRoleSemantic emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
34
    private final EmptyRoleSemantic emptyRoleSemantic;// = EmptyRoleSemantic.PERMIT;
35
    private TransportGuarantee transportGuarantee = TransportGuarantee.NONE;
35
    private final TransportGuarantee transportGuarantee;// = TransportGuarantee.NONE;
36
    private String[] rolesAllowed = new String[0];
36
    private final String[] rolesAllowed;// = new String[0];
37
    
37
    
38
    /**
38
    /**
39
     * Default constraint is permit with no transport guarantee.
39
     * Default constraint is permit with no transport guarantee.
40
     */
40
     */
41
    public HttpConstraintElement() {
41
    public HttpConstraintElement() {
42
        // Default constructor
42
        // Default constructor
43
        this.emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
44
        this.transportGuarantee = TransportGuarantee.NONE;
45
        this.rolesAllowed = new String[0];
43
    }
46
    }
44
    
47
    
45
    /**
48
    /**
Lines 48-53 Link Here
48
     */
51
     */
49
    public HttpConstraintElement(EmptyRoleSemantic emptyRoleSemantic) {
52
    public HttpConstraintElement(EmptyRoleSemantic emptyRoleSemantic) {
50
        this.emptyRoleSemantic = emptyRoleSemantic;
53
        this.emptyRoleSemantic = emptyRoleSemantic;
54
        this.transportGuarantee = TransportGuarantee.NONE;
55
        this.rolesAllowed = new String[0];
51
    }
56
    }
52
    
57
    
53
    /**
58
    /**
Lines 55-60 Link Here
55
     */
60
     */
56
    public HttpConstraintElement(TransportGuarantee transportGuarantee,
61
    public HttpConstraintElement(TransportGuarantee transportGuarantee,
57
            String... rolesAllowed) {
62
            String... rolesAllowed) {
63
        this.emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
58
        this.transportGuarantee = transportGuarantee;
64
        this.transportGuarantee = transportGuarantee;
59
        this.rolesAllowed = rolesAllowed;
65
        this.rolesAllowed = rolesAllowed;
60
    }
66
    }
(-)java/javax/servlet/HttpMethodConstraintElement.java (-1 / +1 lines)
Lines 29-35 Link Here
29
    private static final ResourceBundle lStrings =
29
    private static final ResourceBundle lStrings =
30
        ResourceBundle.getBundle(LSTRING_FILE);
30
        ResourceBundle.getBundle(LSTRING_FILE);
31
31
32
    private String methodName;
32
    private final String methodName;
33
33
34
    public HttpMethodConstraintElement(String methodName) {
34
    public HttpMethodConstraintElement(String methodName) {
35
        if (methodName == null || methodName.length() == 0) {
35
        if (methodName == null || methodName.length() == 0) {
(-)java/javax/servlet/MultipartConfigElement.java (-4 / +11 lines)
Lines 24-39 Link Here
24
 */
24
 */
25
public class MultipartConfigElement {
25
public class MultipartConfigElement {
26
    
26
    
27
    private String location = "";
27
    private final String location;// = "";
28
    private long maxFileSize = -1;
28
    private final long maxFileSize;// = -1;
29
    private long maxRequestSize = -1;
29
    private final long maxRequestSize;// = -1;
30
    private int fileSizeThreshold = 0;
30
    private final int fileSizeThreshold;// = 0;
31
    
31
    
32
    public MultipartConfigElement(String location) {
32
    public MultipartConfigElement(String location) {
33
        // Keep empty string default if location is null
33
        // Keep empty string default if location is null
34
        if (location != null) {
34
        if (location != null) {
35
            this.location = location;
35
            this.location = location;
36
        } else {
37
            this.location = "";
36
        }
38
        }
39
        this.maxFileSize = -1;
40
        this.maxRequestSize = -1;
41
        this.fileSizeThreshold = 0;
37
    }
42
    }
38
    
43
    
39
    public MultipartConfigElement(String location, long maxFileSize,
44
    public MultipartConfigElement(String location, long maxFileSize,
Lines 41-46 Link Here
41
        // Keep empty string default if location is null
46
        // Keep empty string default if location is null
42
        if (location != null) {
47
        if (location != null) {
43
            this.location = location;
48
            this.location = location;
49
        } else {
50
            this.location = "";
44
        }
51
        }
45
        this.maxFileSize = maxFileSize;
52
        this.maxFileSize = maxFileSize;
46
        this.maxRequestSize = maxRequestSize;
53
        this.maxRequestSize = maxRequestSize;
(-)java/javax/servlet/ServletContextAttributeEvent.java (-2 / +2 lines)
Lines 24-31 Link Here
24
 * @since v 2.3
24
 * @since v 2.3
25
 */
25
 */
26
public class ServletContextAttributeEvent extends ServletContextEvent {
26
public class ServletContextAttributeEvent extends ServletContextEvent {
27
    private String name;
27
    private final String name;
28
    private Object value;
28
    private final Object value;
29
29
30
    /**
30
    /**
31
     * Construct a ServletContextAttributeEvent from the given context for the
31
     * Construct a ServletContextAttributeEvent from the given context for the
(-)java/javax/servlet/ServletRequestAttributeEvent.java (-2 / +2 lines)
Lines 24-31 Link Here
24
 * @since Servlet 2.4
24
 * @since Servlet 2.4
25
 */
25
 */
26
public class ServletRequestAttributeEvent extends ServletRequestEvent {
26
public class ServletRequestAttributeEvent extends ServletRequestEvent {
27
    private String name;
27
    private final String name;
28
    private Object value;
28
    private final Object value;
29
29
30
    /**
30
    /**
31
     * Construct a ServletRequestAttributeEvent giving the servlet context of
31
     * Construct a ServletRequestAttributeEvent giving the servlet context of
(-)java/javax/servlet/ServletRequestEvent.java (-1 / +1 lines)
Lines 24-30 Link Here
24
 * @since Servlet 2.4
24
 * @since Servlet 2.4
25
 */
25
 */
26
public class ServletRequestEvent extends java.util.EventObject {
26
public class ServletRequestEvent extends java.util.EventObject {
27
    private ServletRequest request;
27
    private final ServletRequest request;
28
28
29
    /**
29
    /**
30
     * Construct a ServletRequestEvent for the given ServletContext and
30
     * Construct a ServletRequestEvent for the given ServletContext and
(-)java/javax/servlet/ServletSecurityElement.java (-1 / +1 lines)
Lines 32-38 Link Here
32
 */
32
 */
33
public class ServletSecurityElement extends HttpConstraintElement {
33
public class ServletSecurityElement extends HttpConstraintElement {
34
    
34
    
35
    private Map<String,HttpMethodConstraintElement> methodConstraints =
35
    private final Map<String,HttpMethodConstraintElement> methodConstraints =
36
        new HashMap<String,HttpMethodConstraintElement>();
36
        new HashMap<String,HttpMethodConstraintElement>();
37
37
38
    /**
38
    /**
(-)java/javax/servlet/UnavailableException.java (-5 / +7 lines)
Lines 44-52 Link Here
44
 */
44
 */
45
public class UnavailableException extends ServletException {
45
public class UnavailableException extends ServletException {
46
46
47
    private Servlet servlet; // what's unavailable
47
    private final Servlet servlet; // what's unavailable
48
    private boolean permanent; // needs admin action?
48
    private final boolean permanent; // needs admin action?
49
    private int seconds; // unavailability estimate
49
    private final int seconds; // unavailability estimate
50
50
51
    /**
51
    /**
52
     * @param servlet
52
     * @param servlet
Lines 62-67 Link Here
62
        super(msg);
62
        super(msg);
63
        this.servlet = servlet;
63
        this.servlet = servlet;
64
        permanent = true;
64
        permanent = true;
65
        this.seconds = 0;
65
    }
66
    }
66
67
67
    /**
68
    /**
Lines 98-104 Link Here
98
     */
99
     */
99
    public UnavailableException(String msg) {
100
    public UnavailableException(String msg) {
100
        super(msg);
101
        super(msg);
101
102
        seconds = 0;
103
        servlet = null;
102
        permanent = true;
104
        permanent = true;
103
    }
105
    }
104
106
Lines 128-134 Link Here
128
            this.seconds = -1;
130
            this.seconds = -1;
129
        else
131
        else
130
            this.seconds = seconds;
132
            this.seconds = seconds;
131
133
        servlet = null;
132
        permanent = false;
134
        permanent = false;
133
    }
135
    }
134
136
(-)java/javax/servlet/http/HttpSessionBindingEvent.java (-2 / +3 lines)
Lines 38-48 Link Here
38
38
39
    /* The name to which the object is being bound or unbound */
39
    /* The name to which the object is being bound or unbound */
40
40
41
    private String name;
41
    private final String name;
42
42
43
    /* The object is being bound or unbound */
43
    /* The object is being bound or unbound */
44
44
45
    private Object value;
45
    private final Object value;
46
46
47
    /**
47
    /**
48
     * Constructs an event that notifies an object that it has been bound to or
48
     * Constructs an event that notifies an object that it has been bound to or
Lines 59-64 Link Here
59
    public HttpSessionBindingEvent(HttpSession session, String name) {
59
    public HttpSessionBindingEvent(HttpSession session, String name) {
60
        super(session);
60
        super(session);
61
        this.name = name;
61
        this.name = name;
62
        this.value = null;
62
    }
63
    }
63
64
64
    /**
65
    /**
(-)java/javax/servlet/jsp/ErrorData.java (-4 / +4 lines)
Lines 27-36 Link Here
27
 */
27
 */
28
public final class ErrorData {
28
public final class ErrorData {
29
29
30
    private Throwable throwable;
30
    private final Throwable throwable;
31
    private int statusCode;
31
    private final int statusCode;
32
    private String uri;
32
    private final String uri;
33
    private String servletName;
33
    private final String servletName;
34
34
35
    /**
35
    /**
36
     * Creates a new ErrorData object.
36
     * Creates a new ErrorData object.
(-)java/javax/servlet/jsp/tagext/BodyContent.java (-1 / +1 lines)
Lines 121-125 Link Here
121
121
122
    // private fields
122
    // private fields
123
123
124
    private JspWriter enclosingWriter;
124
    private final JspWriter enclosingWriter;
125
}
125
}
(-)java/javax/servlet/jsp/tagext/FunctionInfo.java (-3 / +3 lines)
Lines 73-79 Link Here
73
    /*
73
    /*
74
     * fields
74
     * fields
75
     */
75
     */
76
    private String name;
76
    private final String name;
77
    private String functionClass;
77
    private final String functionClass;
78
    private String functionSignature;
78
    private final String functionSignature;
79
}
79
}
(-)java/javax/servlet/jsp/tagext/TagAttributeInfo.java (-17 / +17 lines)
Lines 51-60 Link Here
51
51
52
    public TagAttributeInfo(String name, boolean required, String type,
52
    public TagAttributeInfo(String name, boolean required, String type,
53
            boolean reqTime) {
53
            boolean reqTime) {
54
        this.name = name;
54
        this(name, required, type, reqTime, false);
55
        this.required = required;
56
        this.type = type;
57
        this.reqTime = reqTime;
58
    }
55
    }
59
56
60
    /**
57
    /**
Lines 78-85 Link Here
78
75
79
    public TagAttributeInfo(String name, boolean required, String type,
76
    public TagAttributeInfo(String name, boolean required, String type,
80
            boolean reqTime, boolean fragment) {
77
            boolean reqTime, boolean fragment) {
81
        this(name, required, type, reqTime);
78
        this(name, required, type, reqTime, fragment, null, false, false, null, null);
82
        this.fragment = fragment;
83
    }
79
    }
84
80
85
    /**
81
    /**
Lines 89-95 Link Here
89
            boolean reqTime, boolean fragment, String description,
85
            boolean reqTime, boolean fragment, String description,
90
            boolean deferredValue, boolean deferredMethod,
86
            boolean deferredValue, boolean deferredMethod,
91
            String expectedTypeName, String methodSignature) {
87
            String expectedTypeName, String methodSignature) {
92
        this(name, required, type, reqTime, fragment);
88
        this.name = name;
89
        this.required = required;
90
        this.type = type;
91
        this.reqTime = reqTime;
92
        this.fragment = fragment;
93
        this.description = description;
93
        this.description = description;
94
        this.deferredValue = deferredValue;
94
        this.deferredValue = deferredValue;
95
        this.deferredMethod = deferredMethod;
95
        this.deferredMethod = deferredMethod;
Lines 188-218 Link Here
188
    /*
188
    /*
189
     * private fields
189
     * private fields
190
     */
190
     */
191
    private String name;
191
    private final String name;
192
192
193
    private String type;
193
    private final String type;
194
194
195
    private boolean reqTime;
195
    private final boolean reqTime;
196
196
197
    private boolean required;
197
    private final boolean required;
198
198
199
    /*
199
    /*
200
     * private fields for JSP 2.0
200
     * private fields for JSP 2.0
201
     */
201
     */
202
    private boolean fragment;
202
    private final boolean fragment;
203
203
204
    /*
204
    /*
205
     * private fields for JSP 2.1
205
     * private fields for JSP 2.1
206
     */
206
     */
207
    private String description;
207
    private final String description;
208
208
209
    private boolean deferredValue;
209
    private final boolean deferredValue;
210
210
211
    private boolean deferredMethod;
211
    private final boolean deferredMethod;
212
212
213
    private String expectedTypeName;
213
    private final String expectedTypeName;
214
214
215
    private String methodSignature;
215
    private final String methodSignature;
216
216
217
    public boolean isDeferredMethod() {
217
    public boolean isDeferredMethod() {
218
        return deferredMethod;
218
        return deferredMethod;
(-)java/javax/servlet/jsp/tagext/TagData.java (-1 / +1 lines)
Lines 149-153 Link Here
149
149
150
    // private data
150
    // private data
151
151
152
    private Hashtable<String, Object> attributes;        // the tagname/value map
152
    private final Hashtable<String, Object> attributes;        // the tagname/value map
153
}
153
}
(-)java/javax/servlet/jsp/tagext/TagExtraInfo.java (-1 / +1 lines)
Lines 137-143 Link Here
137
    }
137
    }
138
    
138
    
139
    // private data
139
    // private data
140
    private TagInfo tagInfo;
140
    private  TagInfo tagInfo;
141
141
142
    // zero length VariableInfo array
142
    // zero length VariableInfo array
143
    private static final VariableInfo[] ZERO_VARIABLE_INFO = { };
143
    private static final VariableInfo[] ZERO_VARIABLE_INFO = { };
(-)java/javax/servlet/jsp/tagext/TagFileInfo.java (-3 / +3 lines)
Lines 80-86 Link Here
80
    }
80
    }
81
81
82
    // private fields for 2.0 info
82
    // private fields for 2.0 info
83
    private String name;
83
    private final String name;
84
    private String path;
84
    private final String path;
85
    private TagInfo tagInfo;
85
    private final TagInfo tagInfo;
86
}
86
}
(-)java/javax/servlet/jsp/tagext/TagVariableInfo.java (-5 / +5 lines)
Lines 101-109 Link Here
101
    /*
101
    /*
102
     * private fields
102
     * private fields
103
     */
103
     */
104
    private String nameGiven; // <name-given>
104
    private final String nameGiven; // <name-given>
105
    private String nameFromAttribute; // <name-from-attribute>
105
    private final String nameFromAttribute; // <name-from-attribute>
106
    private String className; // <class>
106
    private final String className; // <class>
107
    private boolean declare; // <declare>
107
    private final boolean declare; // <declare>
108
    private int scope; // <scope>
108
    private final int scope; // <scope>
109
}
109
}
(-)java/javax/servlet/jsp/tagext/ValidationMessage.java (-2 / +2 lines)
Lines 72-77 Link Here
72
    }
72
    }
73
73
74
    // Private data
74
    // Private data
75
    private String id;
75
    private final String id;
76
    private String message;
76
    private final String message;
77
}
77
}
(-)java/javax/servlet/jsp/tagext/VariableInfo.java (-4 / +4 lines)
Lines 250-257 Link Here
250
    }
250
    }
251
251
252
    // == private data
252
    // == private data
253
    private String varName;
253
    private final String varName;
254
    private String className;
254
    private final String className;
255
    private boolean declare;
255
    private final boolean declare;
256
    private int scope;
256
    private final int scope;
257
}
257
}

Return to bug 50017