Skip to content

Tag: java

What is the latest version of opensaml?

Regarding the heading, can someone tell me what is the latest version of opensaml-saml-api? I can see that on maven repository(https://repo1.maven.org/maven2/org/opensaml/opensaml-saml-api/) it’s latest version is listed as 4.0.1 Is there any other official site where I can get hold of latest opensaml v…

Should I care about no_entry_value in trove4j?

I’m using trove4j for its primitives collections. I notice it has constructors like where no_entry_value represents null. The default value is zero. The null value in collections, like Set specially, is very important, according to my cognition. But I found trove4j did’t use this value much after …

Should I use ThreadLocal to store connections?

I code my Test project and it is prohibited to use Spring and Hibernate there. I wanted to manage my transactions from Service layer. For this I have created a class that gets a Connection from the pool and puts it in the ThreadLocal. This is an example of the fields and the method. The class has also close, …

How to get from parse tree to Java class file

I am working on a command-line tool with the following functionality: Parse modified .java files using an extended ANTLR4 Java9 grammar. The syntax in the files is Java, with one modification to the method declaration which includes a purpose, like in this example: public void {marketing} sendEmail() {} Colle…

how to set a task to run twice a day at specified times in Java

I have a java class that is a basic task that inherits from the TimerTask class. Then I have some tasks that inherit from the basic task. for example class MyTask and I want MyTask to run twice a day at 9 and at 11.45. code: Main class: config file: How to implement this? Answer You can use ScheduledExecutorS…