SonarQube: Using PostJob in Plugins

SonarQube: Using PostJob in Plugins


The last post was all about creating a new plugin for sonar. Now, lets get off the beaten path and create a post job in a plugin instead of a decorator or sensor. But, first it is important to understand the difference. Please read the previous articles on sonar if your haven’t gone through them yet. Setting up sonar Running sonar analysis from eclipe Creating a custom sonarqube plugin The terms Sensor and Decorator have been explained here. Please go ...
Coding Custom SonarQube Plugin

Coding Custom SonarQube Plugin


This will be a continuation of the sonar series in code quality section. This article is for users who have been using sonar and wish to extend and explore the possibilities of customization. Go through the previous posts if you already haven’t: Setting up sonar Sonar analysis using eclipse plugin If you already use sonar, you are already aware of the plugins and web service sonar offers. There are more than 30 useful plugins out there you can leverage from. ...
Sonar Analysis From Eclipse

Sonar Analysis From Eclipse


Sonar is a great tool for ensuring quality and maintainable code. Sonar is like a code reviewer every developer should have. One shouldn’t wait for a formal code review and peer code review to find fault with one’s own code. So, the best way of writing quality code is to run a sonar analysis after coding every major functionality. To do that, once can integrate sonar with the IDE itself. This post is all about running local sonar analysis from ...
Tomcat Log4j Dynamic Logging

Tomcat Log4j Dynamic Logging


Tomcat Log4j Dynamic Logging Using log4j with DailyRollingFileAppender in Tomcat? Well, if you run Tomcat as a windows service, you might have noticed that your logs do not rotate daily.  The logs rotate only when the server is restarted. Although it works perfectly for a server on linux machine. But, tomcat when run as a windows service fail to rotate logs. It seems to be a common problem. I googled a lot for a solution, but didn’t find a solution, ...
Admiring and Understanding LinkedBlockingQueue take Method

Admiring and Understanding LinkedBlockingQueue take Method


In order to admire the code of the implementation of the BlockingQueue, lets have a look at the LinkedBlockingQueue take method. Lets go through the code line by line, understanding the role of each line of code. Line 4: final AtomicInteger count = this. count; In case you already know, AtomicInteger is used for atomic modifications to integers. It offers operations like increment and decrement in a thread safe way. Line 5: final ReentrantLock takeLock = this. takeLock; This lock is used as a monitor for ...