You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by sh...@apache.org on 2022/03/17 08:00:54 UTC
[pulsar] branch master updated: [optimize] make field final in java instance runnable (#14718)
This is an automated email from the ASF dual-hosted git repository.
shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 1ec2c71 [optimize] make field final in java instance runnable (#14718)
1ec2c71 is described below
commit 1ec2c71c0df4123d81a442c605b8fe2d772974db
Author: ZhangJian He <sh...@gmail.com>
AuthorDate: Thu Mar 17 15:59:28 2022 +0800
[optimize] make field final in java instance runnable (#14718)
### Modifications
Make field final in [JavaInstanceRunnable](https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java) Class
---
.../org/apache/pulsar/functions/instance/JavaInstanceRunnable.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
index 74290f0..b84d72f 100644
--- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
+++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
@@ -90,7 +90,7 @@ public class JavaInstanceRunnable implements AutoCloseable, Runnable {
// input topic consumer & output topic producer
private final ClientBuilder clientBuilder;
- private PulsarClientImpl client;
+ private final PulsarClientImpl client;
private final PulsarAdmin pulsarAdmin;
private LogAppender logAppender;
@@ -125,14 +125,14 @@ public class JavaInstanceRunnable implements AutoCloseable, Runnable {
private final Map<String, String> properties;
private final ClassLoader instanceClassLoader;
- private ClassLoader functionClassLoader;
+ private final ClassLoader functionClassLoader;
// a flog to determine if member variables have been initialized as part of setup().
// used for out of band API calls like operations involving stats
private transient boolean isInitialized = false;
// a read write lock for stats operations
- private ReadWriteLock statsLock = new ReentrantReadWriteLock();
+ private final ReadWriteLock statsLock = new ReentrantReadWriteLock();
public JavaInstanceRunnable(InstanceConfig instanceConfig,
ClientBuilder clientBuilder,