< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java

Print this page

        

@@ -1,8 +1,8 @@
 /*
  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.

@@ -468,11 +468,11 @@
 
     int tok;
 
     try
     {
-      Integer itok = (Integer) Keywords.getKeyWord(key);
+      Integer itok = Keywords.getKeyWord(key);
 
       tok = (null != itok) ? itok.intValue() : 0;
     }
     catch (NullPointerException npe)
     {

@@ -585,12 +585,11 @@
             &&!prefix.equals("xmlns"))
     {
       try
       {
         if (prefix.length() > 0)
-          uName = ((PrefixResolver) m_namespaceContext).getNamespaceForPrefix(
-            prefix);
+          uName = m_namespaceContext.getNamespaceForPrefix(prefix);
         else
         {
 
           // Assume last was wildcard. This is not legal according
           // to the draft. Set the below to true to make namespace

@@ -606,13 +605,11 @@
 
             return -1;
           }
           else
           {
-            uName =
-              ((PrefixResolver) m_namespaceContext).getNamespaceForPrefix(
-                prefix);
+            uName = m_namespaceContext.getNamespaceForPrefix(prefix);
           }
         }
       }
       catch (ClassCastException cce)
       {
< prev index next >