Category Archives: Java

Java – Apache HttpClient to access the self signed certification and no host verification

Below code comes from https://memorynotfound.com/ignore-certificate-errors-apache-httpclient/ Advertisements

Posted in Java, Programming | Leave a comment

Java – Aspect based measuring the method execution time of function with annotation

Annotation definition. Aspect advice implementation. Example

Posted in Java, Programming | Leave a comment

Spring – CGLIB: High performance code generation library

Spring is heavily using the CGLIB for it’s framework implementation. CGLib is high performance code generation library. It is using to extend JAVA classes and implementation at runtime. More details can be found in the below. https://github.com/cglib/cglib/wiki

Posted in Java, Programming | Leave a comment

Java – Spring to inject multiple service instances having same interface

Create service for multiple name providers NameService class can inject multiple NameProviders with the following constructor injection.

Posted in Java, Programming | Leave a comment

Java – Importance of final fields for immutable object

Java will guarantee that all thread will see correct values of final fields that were set by the constructor, regardless of how object is published.

Posted in Java, Programming | Leave a comment

Java – Open addressing hash implementation in Java

IdentityHashMap class

Posted in Java, Programming | Leave a comment

Java – headMap, tailMap and subMap in NavigableMap

NavigableMap collection on Java provide methods to return the view of Map on sorted order of key. The most common methods are headMap, tailMap and subMap. headMap example. output If inclusive is true on calling headMap(“3”, true), it will be … Continue reading

Posted in Java, Programming | Leave a comment