Skip to content

Instantly share code, notes, and snippets.

@YutaHiguchi-bsn
YutaHiguchi-bsn / memo
Created April 10, 2019 21:18
Specify JVM to use for VisualVM
Edit /Applications/VisualVM.app/Contents/Resources/visualvm/etc/visualvm.conf and add a line
visualvm_jdkhome="${JAVA_HOME}"
Lauch from command line, after exporting JAVA_HOME
$ /Applications/VisualVM.app/Contents/MacOS/visualvm &
@YutaHiguchi-bsn
YutaHiguchi-bsn / Minimum.java
Created June 4, 2019 23:25
EOFException on certificate error
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertThat;
import java.io.EOFException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.http.HttpMethod;
@YutaHiguchi-bsn
YutaHiguchi-bsn / Minimum.java
Last active June 12, 2019 19:53
Not getting SSLHandshakeException
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertThat;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import javax.net.ssl.SSLHandshakeException;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.http.HttpMethod;
recordIssues enabledForFailure: true,
tool: java(),
filters: [
includeFile('.*/*.java'),
excludeFile('submodules/.*'),
excludeCategory('Deprecation'),
],
qualityGates: [[threshold: 1, type: 'TOTAL_NORMAL']]
recordIssues enabledForFailure: true,
id: 'Java deprecate usages',