Skip to content

Apache Lucene open-source search software

add missing space, fix typo in exc message

Michael McCandless2769a62f44fc
diff --git a/lucene/core/src/java/org/apache/lucene/util/NamedSPILoader.java b/lucene/core/src/java/org/apache/lucene/util/NamedSPILoader.java
index d41cfeb6597..33f5bb950be 100644
--- a/lucene/core/src/java/org/apache/lucene/util/NamedSPILoader.java
+++ b/lucene/core/src/java/org/apache/lucene/util/NamedSPILoader.java
@@ -106,9 +106,9 @@ public final class NamedSPILoader<S extends NamedSPILoader.NamedSPI> implements
public S lookup(String name) {
final S service = services.get(name);
if (service != null) return service;
- throw new IllegalArgumentException("A SPI class of type "+clazz.getName()+" with name '"+name+"' does not exist. "+
- "You need to add the corresponding JAR file supporting this SPI to your classpath."+
- "The current classpath supports the following names: "+availableServices());
+ throw new IllegalArgumentException("An SPI class of type "+clazz.getName()+" with name '"+name+"' does not exist."+
+ " You need to add the corresponding JAR file supporting this SPI to your classpath."+
+ " The current classpath supports the following names: "+availableServices());
}
public Set<String> availableServices() {
diff --git a/lucene/core/src/java/org/apache/lucene/util/SPIClassIterator.java b/lucene/core/src/java/org/apache/lucene/util/SPIClassIterator.java
index de057c3fd4f..e30a9ee7b63 100644
--- a/lucene/core/src/java/org/apache/lucene/util/SPIClassIterator.java
+++ b/lucene/core/src/java/org/apache/lucene/util/SPIClassIterator.java
@@ -140,7 +140,7 @@ public final class SPIClassIterator<S> implements Iterator<Class<? extends S>> {
// don't initialize the class (pass false as 2nd parameter):
return Class.forName(c, false, loader).asSubclass(clazz);
} catch (ClassNotFoundException cnfe) {
- throw new ServiceConfigurationError(String.format(Locale.ROOT, "A SPI class of type %s with classname %s does not exist, "+
+ throw new ServiceConfigurationError(String.format(Locale.ROOT, "An SPI class of type %s with classname %s does not exist, "+
"please fix the file '%s%1$s' in your classpath.", clazz.getName(), c, META_INF_SERVICES));
}
}