8350051: [JMH] Several tests fails NPE

Reviewed-by: erikj, redestad
This commit is contained in:
SendaoYan 2025-02-20 02:51:24 +00:00
parent 0131c1bfd8
commit 00d4e4a971
2 changed files with 14 additions and 5 deletions

View File

@ -122,9 +122,20 @@ $(JMH_UNPACKED_JARS_DONE): $(JMH_RUNTIME_JARS)
$(RM) $(JMH_UNPACKED_DIR)/*.xml
$(TOUCH) $@
# Copy dependency files for inclusion in the benchmark JARs
$(eval $(call SetupCopyFiles, COPY_JAXP_TEST_XML, \
SRC := $(TOPDIR)/test/jaxp/javax/xml/jaxp/unittest, \
DEST := $(MICROBENCHMARK_CLASSES)/org/openjdk/bench/javax/xml, \
FILES := \
stream/XMLStreamWriterTest/message_12.xml \
validation/tck/reZ003vExc23082309.xml \
transform/msgAttach.xml, \
FLATTEN := true, \
))
# Create benchmarks JAR file with benchmarks for both the old and new JDK
$(eval $(call SetupJarArchive, BUILD_JDK_JAR, \
DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE), \
DEPENDENCIES := $(BUILD_JDK_MICROBENCHMARK) $(JMH_UNPACKED_JARS_DONE) $(COPY_JAXP_TEST_XML), \
SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \
BIN := $(MICROBENCHMARK_JAR_BIN), \
SUFFIXES := .*, \

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,15 +38,13 @@ import java.util.concurrent.ConcurrentHashMap;
@State(Scope.Benchmark)
public abstract class AbstractXMLMicro {
public static final String BUILDIMPL = "build-impl.xml";
public static final String LOGCOMP = "log_comp.xml";
public static final String MESSAGE12 = "message_12.xml";
public static final String MSGATTACH = "msgAttach.xml";
public static final String REZ = "reZ003vExc23082309.xml";
protected static final ConcurrentHashMap<String, byte[]> byteCache = new ConcurrentHashMap<>();
@Param({BUILDIMPL,LOGCOMP,MESSAGE12,MSGATTACH,REZ})
@Param({MESSAGE12,MSGATTACH,REZ})
protected String doc;
/**