@@ -57,12 +57,6 @@ public class NewCookie extends Cookie {
57
57
*/
58
58
public static final int DEFAULT_MAX_AGE = -1 ;
59
59
60
- private final String comment ;
61
- private final int maxAge ;
62
- private final Date expiry ;
63
- private final boolean secure ;
64
- private final boolean httpOnly ;
65
-
66
60
/**
67
61
* Create a new instance.
68
62
*
@@ -71,7 +65,7 @@ public class NewCookie extends Cookie {
71
65
* @throws IllegalArgumentException if name is {@code null}.
72
66
*/
73
67
public NewCookie (String name , String value ) {
74
- this ( name , value , null , null , DEFAULT_VERSION , null , DEFAULT_MAX_AGE , null , false , false );
68
+ super ( "" , "" );
75
69
}
76
70
77
71
/**
@@ -93,7 +87,7 @@ public NewCookie(String name,
93
87
String comment ,
94
88
int maxAge ,
95
89
boolean secure ) {
96
- this ( name , value , path , domain , DEFAULT_VERSION , comment , maxAge , null , secure , false );
90
+ super ( "" , "" );
97
91
}
98
92
99
93
/**
@@ -118,7 +112,7 @@ public NewCookie(String name,
118
112
int maxAge ,
119
113
boolean secure ,
120
114
boolean httpOnly ) {
121
- this ( name , value , path , domain , DEFAULT_VERSION , comment , maxAge , null , secure , httpOnly );
115
+ super ( "" , "" );
122
116
}
123
117
124
118
/**
@@ -142,7 +136,7 @@ public NewCookie(String name,
142
136
String comment ,
143
137
int maxAge ,
144
138
boolean secure ) {
145
- this ( name , value , path , domain , version , comment , maxAge , null , secure , false );
139
+ super ( "" , "" );
146
140
}
147
141
148
142
/**
@@ -171,12 +165,7 @@ public NewCookie(String name,
171
165
Date expiry ,
172
166
boolean secure ,
173
167
boolean httpOnly ) {
174
- super (name , value , path , domain , version );
175
- this .comment = comment ;
176
- this .maxAge = maxAge ;
177
- this .expiry = expiry ;
178
- this .secure = secure ;
179
- this .httpOnly = httpOnly ;
168
+ super ("" , "" );
180
169
}
181
170
182
171
/**
@@ -186,7 +175,7 @@ public NewCookie(String name,
186
175
* @throws IllegalArgumentException if cookie is {@code null}.
187
176
*/
188
177
public NewCookie (Cookie cookie ) {
189
- this ( cookie , null , DEFAULT_MAX_AGE , null , false , false );
178
+ super ( "" , "" );
190
179
}
191
180
192
181
/**
@@ -199,7 +188,7 @@ public NewCookie(Cookie cookie) {
199
188
* @throws IllegalArgumentException if cookie is {@code null}.
200
189
*/
201
190
public NewCookie (Cookie cookie , String comment , int maxAge , boolean secure ) {
202
- this ( cookie , comment , maxAge , null , secure , false );
191
+ super ( "" , "" );
203
192
}
204
193
205
194
/**
@@ -215,16 +204,7 @@ public NewCookie(Cookie cookie, String comment, int maxAge, boolean secure) {
215
204
* @since 2.0
216
205
*/
217
206
public NewCookie (Cookie cookie , String comment , int maxAge , Date expiry , boolean secure , boolean httpOnly ) {
218
- super (cookie == null ? null : cookie .getName (),
219
- cookie == null ? null : cookie .getValue (),
220
- cookie == null ? null : cookie .getPath (),
221
- cookie == null ? null : cookie .getDomain (),
222
- cookie == null ? Cookie .DEFAULT_VERSION : cookie .getVersion ());
223
- this .comment = comment ;
224
- this .maxAge = maxAge ;
225
- this .expiry = expiry ;
226
- this .secure = secure ;
227
- this .httpOnly = httpOnly ;
207
+ super ("" , "" );
228
208
}
229
209
230
210
/**
0 commit comments