src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 49269 26c24703e547
equal deleted inserted replaced
47358:d07d5f7cab35 47359:e1a6c0168741
     1 /*
     1 /*
     2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     3  *
     3  *
     4  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     4  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
     5  *
     5  *
     6  * The contents of this file are subject to the terms of either the GNU
     6  * The contents of this file are subject to the terms of either the GNU
     7  * General Public License Version 2 only ("GPL") or the Common Development
     7  * General Public License Version 2 only ("GPL") or the Common Development
     8  * and Distribution License("CDDL") (collectively, the "License").  You
     8  * and Distribution License("CDDL") (collectively, the "License").  You
     9  * may not use this file except in compliance with the License.  You can
     9  * may not use this file except in compliance with the License.  You can
    91     private final int[] totalValue;
    91     private final int[] totalValue;
    92 
    92 
    93     /**
    93     /**
    94      * Maintain values of the top 10 elements in the process of parsing
    94      * Maintain values of the top 10 elements in the process of parsing
    95      */
    95      */
    96     private final Map[] caches;
    96     private final Map<String, Integer>[] caches;
    97 
    97 
    98     private String entityStart, entityEnd;
    98     private String entityStart, entityEnd;
    99     /**
    99     /**
   100      * Default constructor. Establishes default values for known security
   100      * Default constructor. Establishes default values for known security
   101      * vulnerabilities.
   101      * vulnerabilities.
   102      */
   102      */
       
   103     @SuppressWarnings({"rawtypes", "unchecked"})
   103     public XMLLimitAnalyzer() {
   104     public XMLLimitAnalyzer() {
   104         values = new int[Limit.values().length];
   105         values = new int[Limit.values().length];
   105         totalValue = new int[Limit.values().length];
   106         totalValue = new int[Limit.values().length];
   106         names = new String[Limit.values().length];
   107         names = new String[Limit.values().length];
   107         caches = new Map[Limit.values().length];
   108         caches = new Map[Limit.values().length];