I am working on a simple tool to check Java coding guidelines on a project. One of those guidelines is to verify that there is no variable declared like "private static ...", only "private static final ..." is allowed.
I am wondering how I can get this result. I wrote this one:
pattern = "private\\\s*static\\\s*(?!final)";
But it is not working. How can I get only the entries without the "final" keyword?
Thanks, Med.
private final staticvariable?private\\s*staticdoesn't matchprivate final static. It's not an issue, Med.