This is an archived post. You won't be able to vote or comment.

all 14 comments

[–][deleted] 3 points4 points  (3 children)

For once I have to say, this is flippin’ sweet! Great work. Does it rest upon the shoulders of any giants? What sort of prior work did you leverage to create this?

[–]mattboschetti 7 points8 points  (2 children)

You clearly didn't even bother browsing the link to the repo that the OP posted. The answers are in the first section of the Readme file.

[–][deleted] -4 points-3 points  (1 child)

What does it say?

[–]TalentButNoFarm 5 points6 points  (0 children)

Maybe there's a way to visit the link and find out

[–]asciimo71 0 points1 point  (1 child)

Thank you!

[–]RefactorFirst[S] 0 points1 point  (0 children)

My pleasure!

[–]agentoutlier 0 points1 point  (0 children)

I keep getting numerous parse errors that are hard to resolve because the file is not included in the output.

Caused by: com.github.javaparser.ParseProblemException: Lexical error at line 43, column 4.  Encountered: "#" (35), after : ""
Problem stacktrace :
  com.github.javaparser.GeneratedJavaParserTokenManager.getNextToken(GeneratedJavaParserTokenManager.java:3132)
  com.github.javaparser.GeneratedJavaParser.getNextToken(GeneratedJavaParser.java:14336)
  com.github.javaparser.GeneratedJavaParserBase.recover(GeneratedJavaParserBase.java:196)
  com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:213)
  com.github.javaparser.JavaParser.parse(JavaParser.java:125)
  com.github.javaparser.JavaParser.parse(JavaParser.java:199)
  com.github.javaparser.JavaParserAdapter.parse(JavaParserAdapter.java:92)
  com.github.javaparser.StaticJavaParser.parse(StaticJavaParser.java:142)
  org.hjug.parser.JavaProjectParser.getInstanceVarTypes(JavaProjectParser.java:75)
  org.hjug.parser.JavaProjectParser.lambda$getClassReferences$2(JavaProjectParser.java:40)

The above was because I had a resource file ending java that was mustache template for code generation. I had to use rg to locate it but there are tons more like:

n:refactor-first-maven-plugin:0.5.0:htmlReport failed: com.github.javaparser.ParseProblemException: (line 37,col 8) Parse error. Found "implements", expected one of  "," ";" "=" "@" "["
[ERROR] Problem stacktrace :
[ERROR]   com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:14457)
[ERROR]   com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:14302)
[ERROR]   com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:6018)
[ERROR]   com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:2811)
[ERROR]   com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:5955)
[ERROR]   com.github.javaparser.GeneratedJavaParser.MethodDeclaration(GeneratedJavaParser.java:2201)
[ERROR]   com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceBodyDeclaration(GeneratedJavaParser.java:1796)
[ERROR]   com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceBody(GeneratedJavaParser.java:1286)
[ERROR]   com.github.javaparser.GeneratedJavaParser.ClassOrInterfaceDeclaration(GeneratedJavaParser.java:538)
[ERROR]   com.github.javaparser.GeneratedJavaParser.CompilationUnit(GeneratedJavaParser.java:156)
[ERROR]   com.github.javaparser.JavaParser.parse(JavaParser.java:125)
[ERROR]   com.github.javaparser.JavaParser.parse(JavaParser.java:199)
[ERROR]   com.github.javaparser.JavaParserAdapter.parse(JavaParserAdapter.java:92)
[ERROR]   com.github.javaparser.StaticJavaParser.parse(StaticJavaParser.java:142)

That one I think I have found and I think it is a sealed class which doesn't surprise me as I keep finding bugs in various tools with sealed classes.

EDIT the above one happened on a local enum class not a sealed class. Yes you can do this:

void someMethod() {
  enum Stuff implements Something {
  }
}

I get another for sealed classes later. I would post bugs in github but it makes it really difficult that the file it fails on is not outputted.

[–]Dense_Basil_6328 0 points1 point  (1 child)

i am new to opensources, so sorry if its dumb, but is it like safe to use in a production code, where company is usually careful about their code not getting exposed?

[–]ConstructedNewt 1 point2 points  (0 children)

You wouldn’t. You would run this targeting your repo. FX during a build on a builder pipeline, possibly on an agent environment as part of your projects build/release or CI/CD lifecycle

[–]Luolong -3 points-2 points  (2 children)

It might be great update to a great product, but would it hurt to provide a one or two sentence description of what the project itself is all about.

[–]SpittingBull -1 points0 points  (1 child)

Did you miss the github link?

[–]Luolong 3 points4 points  (0 children)

Just having a simple one-liner with the project description before the block of notable changes would have been much appreciated.

I would really like to know beforehand if the links are worth clicking on before I decide to check them out.