File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/org/apache/commons/jxpath/xml Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,14 @@ public class DocumentContainer extends XMLParser2 implements Container {
3838 /** JDOM constant */
3939 public static final String MODEL_JDOM = "JDOM" ;
4040 private static final long serialVersionUID = -8713290334113427066L ;
41- private static HashMap parserClasses = new HashMap ();
41+ private static HashMap <String , String > parserClasses = new HashMap <>();
42+
4243 static {
4344 parserClasses .put (MODEL_DOM , "org.apache.commons.jxpath.xml.DOMParser" );
4445 parserClasses .put (MODEL_JDOM , "org.apache.commons.jxpath.xml.JDOMParser" );
4546 }
46- private static HashMap parsers = new HashMap ();
47+
48+ private static HashMap <String , XMLParser > parsers = new HashMap <>();
4749
4850 /**
4951 * Maps a model type to a parser.
@@ -58,7 +60,7 @@ private static XMLParser getParser(final String model) {
5860 throw new JXPathException ("Unsupported XML model: " + model );
5961 }
6062 try {
61- final Class clazz = ClassLoaderUtil .getClass (className , true );
63+ final Class < XMLParser > clazz = ClassLoaderUtil .getClass (className , true );
6264 return (XMLParser ) clazz .getConstructor ().newInstance ();
6365 } catch (final Exception ex ) {
6466 throw new JXPathException ("Cannot allocate XMLParser: " + className , ex );
You can’t perform that action at this time.
0 commit comments