@@ -57,12 +57,6 @@ public class NewCookie extends Cookie {
5757 */
5858 public static final int DEFAULT_MAX_AGE = -1 ;
5959
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-
6660 /**
6761 * Create a new instance.
6862 *
@@ -71,7 +65,7 @@ public class NewCookie extends Cookie {
7165 * @throws IllegalArgumentException if name is {@code null}.
7266 */
7367 public NewCookie (String name , String value ) {
74- this ( name , value , null , null , DEFAULT_VERSION , null , DEFAULT_MAX_AGE , null , false , false );
68+ super ( "" , "" );
7569 }
7670
7771 /**
@@ -93,7 +87,7 @@ public NewCookie(String name,
9387 String comment ,
9488 int maxAge ,
9589 boolean secure ) {
96- this ( name , value , path , domain , DEFAULT_VERSION , comment , maxAge , null , secure , false );
90+ super ( "" , "" );
9791 }
9892
9993 /**
@@ -118,7 +112,7 @@ public NewCookie(String name,
118112 int maxAge ,
119113 boolean secure ,
120114 boolean httpOnly ) {
121- this ( name , value , path , domain , DEFAULT_VERSION , comment , maxAge , null , secure , httpOnly );
115+ super ( "" , "" );
122116 }
123117
124118 /**
@@ -142,7 +136,7 @@ public NewCookie(String name,
142136 String comment ,
143137 int maxAge ,
144138 boolean secure ) {
145- this ( name , value , path , domain , version , comment , maxAge , null , secure , false );
139+ super ( "" , "" );
146140 }
147141
148142 /**
@@ -171,12 +165,7 @@ public NewCookie(String name,
171165 Date expiry ,
172166 boolean secure ,
173167 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 ("" , "" );
180169 }
181170
182171 /**
@@ -186,7 +175,7 @@ public NewCookie(String name,
186175 * @throws IllegalArgumentException if cookie is {@code null}.
187176 */
188177 public NewCookie (Cookie cookie ) {
189- this ( cookie , null , DEFAULT_MAX_AGE , null , false , false );
178+ super ( "" , "" );
190179 }
191180
192181 /**
@@ -199,7 +188,7 @@ public NewCookie(Cookie cookie) {
199188 * @throws IllegalArgumentException if cookie is {@code null}.
200189 */
201190 public NewCookie (Cookie cookie , String comment , int maxAge , boolean secure ) {
202- this ( cookie , comment , maxAge , null , secure , false );
191+ super ( "" , "" );
203192 }
204193
205194 /**
@@ -215,16 +204,7 @@ public NewCookie(Cookie cookie, String comment, int maxAge, boolean secure) {
215204 * @since 2.0
216205 */
217206 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 ("" , "" );
228208 }
229209
230210 /**
0 commit comments