Category: java

  • Tips for running SonarQube on large / legacy codebases

    Crossposted from the Transylvania JUG website. SonarQube (previously Sonar) is a quality management platform aimed mainly at Java (although other programming languages are supported to a varying degree. Here are a couple of tips to get it working on legacy projects: There is an Ant runner and a standalone runner, it is not mandatory to…

  • Ensuring the order of execution for tasks

    Ensuring the order of execution for tasks

    This post was originally published as part of the Java Advent series. If you like it, please spread the word by sharing, tweeting, FB, G+ and so on! Want to write for the Java Advent blog? We are looking for contributors to fill all 24 slot and would love to have your contribution! Contact Attila…

  • Java Runtime options

    This post was originally published as part of the Java Advent series. If you like it, please spread the word by sharing, tweeting, FB, G+ and so on! Want to write for the Java Advent blog? We are looking for contributors to fill all 24 slot and would love to have your contribution! Contact Attila…

  • Changes to String.substring in Java 7

    Changes to String.substring in Java 7

    This post was originally published as part of the Java Advent series. If you like it, please spread the word by sharing, tweeting, FB, G+ and so on! Want to write for the Java Advent blog? We are looking for contributors to fill all 24 slot and would love to have your contribution! Contact Attila…

  • (Re)Start me up!

    This post was originally published as part of the Java Advent series. There are cases where you would like to start a Java process identical to the current one (or at least using the the same JVM with tweaked parameters). Some concrete cases where this would be useful: Auto-tuning the maximum memory parameters (ie. you…

  • Helper for testing multi-threaded programs in Java

    This post was originally published on the Transylvania JUG blog. Testing multi-threaded code is hard. The main problem is that you invoke your assertions either too soon (and they fail for no good reason) or too late (in which case the test runs for a long time, frustrating you). A possible solution is to declare…

  • Relaxed JSON parsing

    This blogpost was originally posted to the Transylvania JUG blog. JSON is a good alternative when you need a lightweight format to specify structured data. But sometimes (for example when you want the user to specify JSON manually) you would like to relax the formalism required to specify "valid" JSON data. For example the following…

  • Updating the root certificates for Java

    One usually thinks of SSL in the context of HTTPS, but there are also other protocols which rely on it to provide security. See this link for a short overview of SSL – it only mentions HTTPS, but the same applies for IMAPS, FTPS, etc – SSL is independent of the wrapped protocol. You can…

  • Using Jython from Maven

    This blogpost was originally posted to the Transylvania JUG blog. On the surface it looks simple: just add the dependency and you can run the example code. However what the jython artifact doesn’t get you are the standard python libraries like re. This means that as soon as you try to do something like the…

  • Integrating Maven with Ivy

    This post was originally published on the Transylvania JUG blog. The problem: you have some resources in an Ivy repository (and only there) which you would like to use in a project based on Maven. Possible solutions: Migrate the repository to Maven (Nexus for example) since Ivy can easily use Maven-style repositories (so your Ivy…