< 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 +1,7 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * 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,11 +48,11 @@
/**
* No-arg Constructor.
*/
public ParameterList() {
- this.list = new HashMap<String, String>();
+ this.list = new HashMap<>();
}
private ParameterList(HashMap<String, String> m) {
this.list = m;
}
@@ -71,11 +71,11 @@
HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
HeaderTokenizer.Token tk;
int type;
String name;
- list = new HashMap<String, String>();
+ list = new HashMap<>();
while (true) {
tk = h.next();
type = tk.getType();
if (type == HeaderTokenizer.Token.EOF) // done
@@ -169,10 +169,11 @@
* 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,8 +231,8 @@
return "\"\"";
return MimeUtility.quote(value, HeaderTokenizer.MIME);
}
public ParameterList copy() {
- return new ParameterList((HashMap)list.clone());
+ return new ParameterList((HashMap<String, String>)list.clone());
}
}
< prev index next >