Skip to content

Commit

Permalink
Merge branch 'main' into release/4.0.x
Browse files Browse the repository at this point in the history
* main:
  No issue: Unrequire status checks
  Issue #368: select(AnnotationBaseFs-type).count() seems to return MAX_LONG
  Issue #348: Varargs for description class setters
  Issue #348: Varargs for description class setters
  • Loading branch information
reckart committed Aug 19, 2024
2 parents 14a236e + f79fdcc commit e4b5bdb
Show file tree
Hide file tree
Showing 143 changed files with 813 additions and 2,293 deletions.
8 changes: 4 additions & 4 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ github:
main:
required_status_checks:
strict: true
contexts:
- continuous-integration/jenkins/pr-merge
# contexts:
# - continuous-integration/jenkins/pr-merge
main-v2:
required_status_checks:
strict: true
contexts:
- continuous-integration/jenkins/pr-merge
# contexts:
# - continuous-integration/jenkins/pr-merge
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
*
* @deprecated As of v2.0, {@link AnalysisEngine} should be used instead. This interface no longer
* defines any additional methods beyond those in AnalysisEngine.
* @forRemoval 4.0.0
*/
@Deprecated
@Deprecated(since = "2.0.0")
public interface TextAnalysisEngine extends AnalysisEngine {
// As of 2.0, no longer defines any additional methods beyond those in AnalysisEngineDescription
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
* This interface is maintained only for backwards compatibility with annotators developed in UIMA
* SDK v1.x. New code should use {@link UimaContext} instead.
*
* @deprecated As of release 2.3.0, use UimaContext instead
* @deprecated As of release 2.3.0, use {link UimaContext} instead
* @forRemoval 4.0.0
*/
@Deprecated
@Deprecated(since = "2.3.0")
public interface AnnotatorContext {
/**
* Retrieves the value for a configuration parameter that is not defined in any group or is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
/**
* An <code>AnnotatorContextException</code> is thrown by an {@link AnnotatorContext} if it cannot
* complete the invoked operation due to a failure in the underlying implementation.
*
* @deprecated Use {link UimaContext} instead
* @forRemoval 4.0.0
*/
@Deprecated(since = "3.6.0")
public class AnnotatorContextException extends UIMAException {

private static final long serialVersionUID = 5021704382907111514L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
* {@link org.apache.uima.analysis_component.JCasAnnotator_ImplBase}.
*
* @deprecated As of release 2.3.0, use CasAnnotator_ImplBase or JCasAnnotator_ImplBase instead
* @forRemoval 4.0.0
*/
@Deprecated
@Deprecated(since = "2.3.0")
public abstract class Annotator_ImplBase implements BaseAnnotator {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public interface BaseAnnotator {
* if the annotator cannot initialize itself.
* @throws AnnotatorConfigurationException
* if the configuration specified for this annotator is invalid.
* @forRemoval 4.0.0
*/
@Deprecated(since = "3.6.0")
void initialize(AnnotatorContext aContext)
throws AnnotatorInitializationException, AnnotatorConfigurationException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public class FlowControllerContainer extends ConfigurableResource_ImplBase {
private static final String LOG_RESOURCE_BUNDLE = "org.apache.uima.impl.log_messages";

/*
* (non-Javadoc)
*
* @see org.apache.uima.resource.Resource_ImplBase#initialize(org.apache.uima.resource.
* ResourceSpecifier, java.util.Map)
*
* UIMA-5043 Set & restore the UimaContextHolder around calls to user code so it can be used to
* access the External Settings
*/
Expand Down Expand Up @@ -155,11 +150,7 @@ public boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> aAdd
}
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#finalize()
*/
@Deprecated(since = "3.6.0")
@Override
protected void finalize() throws Throwable {
// unregister MBean from MBeanServer when GC occurs
Expand All @@ -174,11 +165,6 @@ private FlowControllerContext getFlowControllerContext() {
return (FlowControllerContext) getUimaContext();
}

/*
* (non-Javadoc)
*
* @see org.apache.uima.resource.ConfigurableResource_ImplBase#reconfigure()
*/
@Override
public void reconfigure() throws ResourceConfigurationException {
UimaContext prevContext = setContextHolder(); // for use by POJOs
Expand All @@ -191,11 +177,6 @@ public void reconfigure() throws ResourceConfigurationException {
}
}

/*
* (non-Javadoc)
*
* @see org.apache.uima.resource.Resource_ImplBase#destroy()
*/
@Override
public void destroy() {
withContextHolder(() -> mFlowController.destroy());
Expand Down Expand Up @@ -225,8 +206,7 @@ public FlowContainer computeFlow(final CAS aCAS) throws AnalysisEngineProcessExc
// now get the right interface(e.g. CAS or JCAS)
Class<? extends AbstractCas> requiredInterface = mFlowController.getRequiredCasInterface();
AbstractCas casToPass = getCasManager().getCasInterface(view, requiredInterface);
((CASImpl) view)
.switchClassLoaderLockCasCL(getResourceManager().getExtensionClassLoader());
((CASImpl) view).switchClassLoaderLockCasCL(getResourceManager().getExtensionClassLoader());
Flow flow = mFlowController.computeFlow(casToPass);
if (flow instanceof CasFlow_ImplBase) {
((CasFlow_ImplBase) flow).setCas(view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> aAdd
super.initialize(aSpecifier, aAdditionalParams);
AnalysisEngineMetaData md = mDescription.getAnalysisEngineMetaData();

// Get logger for this class ... NOT the user's one in the UimaContext
// Get logger for this class - NOT the user's one in the UimaContext
Logger logger = getLogger();
logger.logrb(Level.CONFIG, CLASS_NAME.getName(), "initialize", LOG_RESOURCE_BUNDLE,
"UIMA_analysis_engine_init_begin__CONFIG", md.getName());
Expand Down Expand Up @@ -315,8 +315,7 @@ public void batchProcessComplete() throws AnalysisEngineProcessException {
enterBatchProcessComplete();
try {
// pass call down to components, which might be (or contain) CAS Consumers
Iterator<AnalysisEngine> iter = _getASB().getComponentAnalysisEngines().values()
.iterator();
Iterator<AnalysisEngine> iter = _getASB().getComponentAnalysisEngines().values().iterator();
while (iter.hasNext()) {
iter.next().batchProcessComplete();
}
Expand Down Expand Up @@ -415,9 +414,9 @@ protected void initASB(AnalysisEngineDescription aAnalysisEngineDescription,
// add this analysis engine's name to the parameters sent to the ASB
Map<String, Object> asbParams = new HashMap<>(aAdditionalParams);
asbParams.put(ASB.PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME, getMetaData().getName()); // not
// used
// 9/2013
// scan
// used
// 9/2013
// scan
asbParams.put(Resource.PARAM_RESOURCE_MANAGER, getResourceManager());

// Pass sofa mappings defined in this aggregate as additional ASB parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
public class AnalysisEngineDescription_impl extends ResourceCreationSpecifier_impl
implements AnalysisEngineDescription {

static final private Method getterForAEwImports;
private static final Method getterForAEwImports;
static {
try {
getterForAEwImports = AnalysisEngineDescription_impl.class
Expand All @@ -98,18 +98,18 @@ public class AnalysisEngineDescription_impl extends ResourceCreationSpecifier_im
/**
* Name of the "delegateAnalysisEngineSpecifiers" property. Change this if interface changes.
*/
final protected String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS = "delegateAnalysisEngineSpecifiers";
protected final String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS = "delegateAnalysisEngineSpecifiers";

/**
* Name of the "delegateAnalysisEngineSpecifiersWithImports" property. Change this if interface
* changes.
*/
final protected String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS = "delegateAnalysisEngineSpecifiersWithImports";
protected final String PROP_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS_WITH_IMPORTS = "delegateAnalysisEngineSpecifiersWithImports";

/**
* Name of the "delegateAnalysisEngineSpecifiers" XML Element. Change this if schema changes.
*/
final protected String ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS = "delegateAnalysisEngineSpecifiers";
protected final String ELEM_DELEGATE_ANALYSIS_ENGINE_SPECIFIERS = "delegateAnalysisEngineSpecifiers";

private String mFrameworkImplementation;

Expand Down Expand Up @@ -401,7 +401,7 @@ protected void checkForInvalidParameterOverrides(ConfigurationParameter[] aParam
ResourceInitializationException.PARAM_OVERRIDE_IN_PRIMITIVE, new Object[] {
aParams[i].getName(), getMetaData().getName(), getSourceUrlString() });
} else if (overrides.length == 0 && !isPrimitive()) {
// Were deprecated for many years ... now no longer supported.
// Were deprecated for many years - now no longer supported.
throw new ResourceInitializationException(
ResourceInitializationException.INVALID_PARAM_OVERRIDE_NO_OVERRIDES, new Object[] {
aParams[i].getName(), getMetaData().getName(), getSourceUrlString() });
Expand Down Expand Up @@ -1051,7 +1051,7 @@ protected static XmlizationInfo getXmlizationInfoForClass() {
return XMLIZATION_INFO;
}

static final private XmlizationInfo XMLIZATION_INFO = new XmlizationInfo(
private static final XmlizationInfo XMLIZATION_INFO = new XmlizationInfo(
"analysisEngineDescription",
new PropertyXmlInfo[] { new PropertyXmlInfo("frameworkImplementation"),
new PropertyXmlInfo("primitive"), new PropertyXmlInfo("annotatorImplementationName"),
Expand Down
Loading

0 comments on commit e4b5bdb

Please sign in to comment.