Github user chtyim commented on a diff in the pull request:
https://github.com/apache/incubator-twill/pull/52#discussion_r34333777
--- Diff:
twill-core/src/main/java/org/apache/twill/internal/AbstractTwillService.java ---
@@ -83,7 +83,8 @@
public abstract class AbstractTwillService extends
AbstractExecutionThreadService implements MessageCallback {
private static final Logger LOG =
LoggerFactory.getLogger(AbstractTwillService.class);
- private static final Gson GSON = new Gson();
+
+ protected static final Gson GSON = new Gson();
--- End diff --
Prefer to keep the Gson be a private static and just let the sub-class to
new their own. It gives better encapsulation (e.g. if the parent can add a
codec that can break sub-class usage).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---