diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 00953141b51e1..399af5bade3c0 100644 --- a/plugins/discovery-azure-classic/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -60,7 +60,7 @@ dependencies { api "com.sun.jersey:jersey-core:${versions.jersey}" api "com.sun.jersey:jersey-json:${versions.jersey}" api "org.codehaus.jettison:jettison:${versions.jettison}" - api 'com.sun.xml.bind:jaxb-impl:2.2.3-1' + api 'com.sun.xml.bind:jaxb-impl:4.0.3' // HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here, // and allowlist this hack in JarHell diff --git a/server/src/main/java/org/opensearch/index/mapper/ContentPath.java b/server/src/main/java/org/opensearch/index/mapper/ContentPath.java index 468551aeed287..8b0d5e24056d3 100644 --- a/server/src/main/java/org/opensearch/index/mapper/ContentPath.java +++ b/server/src/main/java/org/opensearch/index/mapper/ContentPath.java @@ -84,6 +84,9 @@ public void remove() { } public String pathAsText(String name) { + if (offset == index) { + return name; + } sb.setLength(0); for (int i = offset; i < index; i++) { sb.append(path[i]).append(DELIMITER);