Skip to content

Commit

Permalink
fix typo in wokerserviceloader (apache#9169)
Browse files Browse the repository at this point in the history
### Motivation
Fix typo in WorkerServiceLoader.java to avoid error while project build under java 15:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project pulsar-functions-worker: Compilation failure
[ERROR] /Users/jia/ws/code/pulsar/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/service/WorkerServiceLoader.java:[23,38] package com.sun.corba.se.pept.protocol does not exist
```

### Modifications

Fix to the right type.

### Verifying this change

build passed
  • Loading branch information
jiazhai authored Jan 13, 2021
1 parent 2ebceb8 commit 944963a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import static org.apache.commons.lang3.StringUtils.isEmpty;

import com.sun.corba.se.pept.protocol.ProtocolHandler;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
Expand Down Expand Up @@ -66,7 +65,7 @@ private static WorkerServiceDefinition getWorkerServiceDefinition(NarClassLoader
}

/**
* Load the worker service according to the handler definition.
* Load the worker service according to the worker service definition.
*
* @param metadata the worker service definition.
* @return
Expand All @@ -76,7 +75,7 @@ static WorkerServiceWithClassLoader load(WorkerServiceMetadata metadata,
NarClassLoader ncl = NarClassLoader.getFromArchive(
metadata.getArchivePath().toAbsolutePath().toFile(),
Collections.emptySet(),
ProtocolHandler.class.getClassLoader(), narExtractionDirectory);
WorkerService.class.getClassLoader(), narExtractionDirectory);

WorkerServiceDefinition phDef = getWorkerServiceDefinition(ncl);
if (StringUtils.isBlank(phDef.getHandlerClass())) {
Expand Down

0 comments on commit 944963a

Please sign in to comment.