< prev index next >
jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 48,58 ****
/**
* No-arg Constructor.
*/
public ParameterList() {
! this.list = new HashMap<String, String>();
}
private ParameterList(HashMap<String, String> m) {
this.list = m;
}
--- 48,58 ----
/**
* No-arg Constructor.
*/
public ParameterList() {
! this.list = new HashMap<>();
}
private ParameterList(HashMap<String, String> m) {
this.list = m;
}
*** 71,81 ****
HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
HeaderTokenizer.Token tk;
int type;
String name;
! list = new HashMap<String, String>();
while (true) {
tk = h.next();
type = tk.getType();
if (type == HeaderTokenizer.Token.EOF) // done
--- 71,81 ----
HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
HeaderTokenizer.Token tk;
int type;
String name;
! list = new HashMap<>();
while (true) {
tk = h.next();
type = tk.getType();
if (type == HeaderTokenizer.Token.EOF) // done
*** 169,178 ****
--- 169,179 ----
* Convert this ParameterList into a MIME String. If this is
* an empty list, an empty string is returned.
*
* @return String
*/
+ @Override
public String toString() {
return toString(0);
}
/**
*** 230,237 ****
return "\"\"";
return MimeUtility.quote(value, HeaderTokenizer.MIME);
}
public ParameterList copy() {
! return new ParameterList((HashMap)list.clone());
}
}
--- 231,238 ----
return "\"\"";
return MimeUtility.quote(value, HeaderTokenizer.MIME);
}
public ParameterList copy() {
! return new ParameterList((HashMap<String, String>)list.clone());
}
}
< prev index next >