Skip to content

Commit

Permalink
Handle quality checks
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>
  • Loading branch information
Rob Stryker committed Jun 13, 2024
1 parent 2bd145a commit 67b41dd
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class CompilationUnitResolverDiscovery {
private static boolean ERROR_LOGGED = false;


@SuppressWarnings("unchecked")
static ICompilationUnitResolver getInstance() {
String compilationUnitResolverId = System.getProperty(ICompilationUnitResolver.class.getSimpleName());
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, COMPILATION_UNIT_RESOLVER_EXTPOINT_ID);
Expand All @@ -32,20 +31,20 @@ static ICompilationUnitResolver getInstance() {
for (IExtension ext : extensions) {
IConfigurationElement[] configElements = ext.getConfigurationElements();
for (final IConfigurationElement configElement : configElements) {
String elementId = configElement.getAttribute("id");
String elementId = configElement.getAttribute("id"); //$NON-NLS-1$
if( compilationUnitResolverId.equals(elementId)) {
String elementName =configElement.getName();
if (!("resolver".equals(elementName))) { //$NON-NLS-1$
continue;
}
try {
Object executableExtension = configElement.createExecutableExtension("class");
Object executableExtension = configElement.createExecutableExtension("class"); //$NON-NLS-1$
if( executableExtension instanceof ICompilationUnitResolver icur) {
return icur;
}
} catch (CoreException e) {
if( !ERROR_LOGGED) {
ILog.get().error("Could not instantiate ICompilationUnitResolver: '" + elementId + "' with class: " + configElement.getAttribute("class"), e); //$NON-NLS-1$
ILog.get().error("Could not instantiate ICompilationUnitResolver: '" + elementId + "' with class: " + configElement.getAttribute("class"), e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ERROR_LOGGED = true;
}
}
Expand Down

0 comments on commit 67b41dd

Please sign in to comment.