Inclusion of`final` by Eclipse after saving file

Asked

Viewed 53 times

1

When I am working in some class and save the changed file, for some reason Eclipse adds final in random vegetarians, I don’t know the criteria that Eclipse makes this change, but it bothers too much.

How I take the Eclipse function from adding final in the variables?

1 answer

1


Certainly he did not do it in random variables, he did it where he could do it and it looked better (if the algorithm and criterion he uses is good). He must have turned on an eclipse mechanism in which one of the parts of the eclipse refactored his code to get better.

I don’t know if I’d hang up, because it looks like he’s doing where he’s supposed to be final same. There’s some pattern you’re using that makes it clear that they would be final. I can’t guarantee he’s not being abusive, but it might be a way to learn where to put final from now on. If the variable is immutable why not leave explicit?

Like I don’t use Eclipse I had to go to Soen to see how to turn it off:

Go on project > properties, java editor > save actions and configure, code style, and finally Use modifier final when possible.

There you can learn several things that he does and that can help you program better, or want to turn off too (or maybe turn something on, but if it’s off by default it might not be a good idea to call without really understanding what will happen).

  • So I thought he followed a logic, but he doesn’t. He usually mainly changes several of updated methods and sometimes methods that I have not changed and this occurs at a given time he addsfinalother times not. Randomness happens this is a fact. Not only in my project more than a few friends. I agree that sometimes it applies correctly, however, it has happened to apply in a variable that ended up screwing a package that was going to production. This procedure has already performed in a package, and it didn’t work, but I noticed that it didn’t change all . java.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.