Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk15u-dev Public archive

Commit

Permalink
8282761: XPathFactoryImpl remove setProperty and getProperty methods
Browse files Browse the repository at this point in the history
Reviewed-by: goetz
  • Loading branch information
Yuri Nesterenko committed Mar 18, 2022
1 parent bfe6f7c commit 5ef77de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,36 +305,4 @@ public void setXPathVariableResolver(XPathVariableResolver resolver) {

xPathVariableResolver = resolver;
}

public void setProperty(String name, String value) {
// property name cannot be null
if (name == null) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_PROPERTY_NAME_NULL,
new Object[] {CLASS_NAME, value} );
throw new NullPointerException(fmsg);
}

// property name not recognized
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_PROPERTY_UNKNOWN,
new Object[] {name, CLASS_NAME, value} );
throw new IllegalArgumentException(fmsg);
}

public String getProperty(String name) {
// property name cannot be null
if (name == null) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_GETTING_NULL_PROPERTY,
new Object[] {CLASS_NAME} );
throw new NullPointerException(fmsg);
}

// unknown property
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_GETTING_UNKNOWN_PROPERTY,
new Object[] {name, CLASS_NAME} );
throw new IllegalArgumentException(fmsg);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Expand Down Expand Up @@ -31,7 +31,7 @@
* Also you need to update the count of messages(MAX_CODE)or
* the count of warnings(MAX_WARNING) [ Information purpose only]
* @xsl.usage advanced
* @LastModified: Nov 2021
* @LastModified: May 2019
*/
public class XPATHErrorResources extends ListResourceBundle
{
Expand Down Expand Up @@ -322,10 +322,6 @@ public class XPATHErrorResources extends ListResourceBundle
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
public static final String ER_PROPERTY_NAME_NULL = "ER_PROPERTY_NAME_NULL";
public static final String ER_PROPERTY_UNKNOWN = "ER_PROPERTY_UNKNOWN";
public static final String ER_GETTING_NULL_PROPERTY = "ER_GETTING_NULL_PROPERTY";
public static final String ER_GETTING_UNKNOWN_PROPERTY = "ER_GETTING_UNKNOWN_PROPERTY";
//END: Keys needed for exception messages of JAXP 1.3 XPath API implementation

public static final String WG_LOCALE_NAME_NOT_HANDLED =
Expand Down Expand Up @@ -840,26 +836,6 @@ public class XPATHErrorResources extends ListResourceBundle
{ ER_NULL_XPATH_VARIABLE_RESOLVER,
"Attempting to set a null XPathVariableResolver:{0}#setXPathVariableResolver(null)"},

/** Field ER_PROPERTY_NAME_NULL */

{ ER_PROPERTY_NAME_NULL,
"Trying to set a property with a null name: {0}#setProperty( null, {1})"},

/** Field ER_PROPERTY_UNKNOWN */

{ ER_PROPERTY_UNKNOWN,
"Trying to set the unknown property \"{0}\":{1}#setProperty({0},{2})"},

/** Field ER_GETTING_NULL_PROPERTY */

{ ER_GETTING_NULL_PROPERTY,
"Trying to get a property with a null name: {0}#getProperty(null)"},

/** Field ER_GETTING_NULL_PROPERTY */

{ ER_GETTING_UNKNOWN_PROPERTY,
"Trying to get the unknown property \"{0}\":{1}#getProperty({0})"},

//END: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation

// Warnings...
Expand Down

1 comment on commit 5ef77de

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.