8

I am using IntelliJ IDEA. I tried the "inspect code" function that it comes with, and I wanted to fix something called "entry points". That has something to do with my enums and my main method. I would like to know what an entry point is and how to fix that error.

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
shedes
  • 83
  • 1
  • 3

1 Answers1

5

Entry points are where the world around your code might invoke it, such as Junit tests, Servlets, classes with a main method. IntelliJ tries to trace usage of code back to at least one entry point, so if one of your classes is an entry point and Intellij couldn't detect it, more unused code will be reported than what is actual. (If class A uses code from class B, but no one uses class A, class B still has unused code). You could fix it by adding your class to the set of entry points.

Programmer Trond
  • 303
  • 2
  • 15