The sample provided shows that whoever wrote that piece of code does not understand how programing works. He does not understand basic data types and basic instructions. (PS: I created real-time embedded software for cars and for robots in the semiconductor industry for more than 15 years, so I know what I talk about)
Coding style usually refers to layout and indentation, but useless verbosity and inefficiency can also be considered "bad coding style".
That guy needs to be trained from basic level of programming, in whatever language. Otherwise, he will hurt the project (and the rest of the team) a lot.
Combined with the fact that he is a senior developer, there not only a red flag about this guy, but also an entire field full of red flags.
You should first talk (read note at the end) with your manager and explain the overview of the situation. Offer to create a report to show how the application:
- will be more expensive;
- will take a much longer development time;
- run slower;
- have more bugs;
- have more customer complaints;
- erode the morale of the team because of the mess.
Just show that this:
public boolean myMethod()
can be written as this:
public boolean myMethod()
or (if data hiding is not essential) even as:
It should be easy to understand by anybody, regardless of education, that the original is uglier.
NOTE 1: if the manager decides in favor of the colleague, then there will not be much more that you can do.
NOTE 2: I underline "discuss", as opposed to "complain". The discussion should be started like along this:
"Boss, I am not sure if I noticed something right. I think (this), and guy X thinks (that). The simplest example is (this - have it with you, maybe a hard copy) with the negative impact (this). I need some support, in order to improve my skills, while improving the quality of our product at the same time. If the information is not enough, I can create a short list of examples, so we can discuss more to the point."
NOTE 3: Sometimes, the best solution is to go find another job. I have done that myself. But that is a defeat for yourself and for your career, if you do not try something else first - with decency, of course.
NOTE 4: "Installing" and then "enforcing" official coding rules is a long process in itself, and it usually leads to longer development times, and higher development costs (short time). The downsides are balanced (long term) by fewer customer complaints, less time "wasted" on debugging etc. Therefore, if there is no management support, coding rule are nothing but a beautiful dream.