Atlassian, Java, JIRA

UTF-8 character problem with JIRA Application link

I have created a JIRA, and a Confluence add-on. They communicated with each other via REST API, using the Application link interface. I needed to call a REST function, implemented in my own JIRA add-on, from the Confluence add-on.   It worked fine until any of the REST parameters contains a non ASCII character. In… Continue reading UTF-8 character problem with JIRA Application link

Advertisement
Design pattern, Java

Multiton design pattern

  The Multiton pattern is a design pattern similar to the singleton, which allows only one instance of a class to be created. The Multiton pattern expands on the singleton concept to manage a map of named instances as key-value pairs. Rather than having a single instance per virtual machine, the Multiton pattern instead ensures a single instance… Continue reading Multiton design pattern

Design pattern, Java

Lazy initialization design pattern

Creational design pattern "... lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed." Lazy init can be triggered by calling the assessor method of an object started at a low priority background thread at application startup… Continue reading Lazy initialization design pattern

eclipse, Java

Code templates for Eclipse

In my daily work, I found very productive to use my own code templates for Eclipse. By the time, I have collected a useful set of templates. You can define your own templates by opening the dialog under Preferences\Java\Editor\Templates Defining templates is quite straightforward. If you need a detailed introduction, please refer to the following… Continue reading Code templates for Eclipse

Java, JUnit

Using reflection in setup phase of unit testing

It is  a common practice to use mock framework in the setup phase of a unit test, in order to set the internal state of the dependent objects. Sometimes it is though easier to set a value of a given field directly, in order to test the class accordingly. For modifying field value via reflection,… Continue reading Using reflection in setup phase of unit testing