yWorks / yGuard

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

Home Page:https://yworks.github.io/yGuard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown problem is a null pointer exception caused by a missing null check

mendess opened this issue · comments

ClassDescriptor cd = model.getClassDescriptor(
entryName.substring( 0, entryName.lastIndexOf( ".class" ) ) );

cd can be null which will cause a null pointer exception and consequently a unhelpful yShrink encountered an unknown problem! diagnostic.

Checking and throwing a more informative exception, with the name of the unmodeled class would help troubleshoot the issue. I have personally encountered this and it's making it hard to understand what I miss configured.

@mendess thanks for opening this ticket. I don't entirely understand how a class that's read from a JAR would become unmodelled inside the shrinker in this scenario. Can you share a test case with us so we can find a concise solution to this problem. All the best

Closing because of missing feedback.