nescohen commented on a change in pull request #1391:
URL: https://github.com/apache/groovy/pull/1391#discussion_r498608776
##########
File path: src/main/java/org/codehaus/groovy/classgen/EnumCompletionVisitor.java
##########
@@ -83,7 +83,13 @@ private void completeEnum(ClassNode enumClass) {
private static void addImplicitConstructors(ClassNode enumClass, boolean
aic) {
if (aic) {
ClassNode sn = enumClass.getSuperClass();
- List<ConstructorNode> sctors = new
ArrayList<ConstructorNode>(sn.getDeclaredConstructors());
Review comment:
So I guess the question would be, would you prefer to have a NPE thrown
vs en empty constructor list OR I could even refactor to throw an exception of
the semantically correct type. Would you know of one to recommend? I guess I
just like to err on the side of never throwing NPEs, but I know that sometimes
it is preferable to fail fast.
Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]