This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.AssertionError: LEAK: 2 leak(s) detected. ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. | |
== ByteBuf 1: | |
Recent access records: | |
#1: | |
io.netty.buffer.AdvancedLeakAwareByteBuf.getByte(AdvancedLeakAwareByteBuf.java:154) | |
io.netty.buffer.TestingPooledByteBufAllocatorTest.testLeakByteBufferDirect(TestingPooledByteBufAllocatorTest.java:62) | |
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
java.lang.reflect.Method.invoke(Method.java:498) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To regenerate the test key and certificates | |
# Generate an RSA private key and convert it to PKCS8 wraped in PEM | |
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform pem -outform pem -nocrypt -out rsa.key | |
# Generate a certificate signing request with the private key | |
openssl req -new -key rsa.key -out rsa.csr | |
# Sign request with private key | |
openssl x509 -req -days 10000 -in rsa.csr -signkey rsa.key -out rsa.crt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.airlift.testing; | |
import java.io.Closeable; | |
import java.io.IOException; | |
import static com.google.common.base.Preconditions.checkNotNull; | |
public final class Closeables | |
{ | |
private Closeables() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkNotNull(outputs, "outputs is null"); | |
this.outputs = ImmutableMap.copyOf(Maps.transformValues(outputs, new Function<Set<?>, Set<?>>() { | |
@Override | |
public Set<?> apply(@Nullable Set<?> input) | |
{ | |
return ImmutableSet.copyOf(input); | |
} | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git push foo master | |
Counting objects: 206, done. | |
Delta compression using up to 8 threads. | |
Compressing objects: 100% (104/104), done. | |
Writing objects: 100% (164/164), 16.23 KiB, done. | |
Total 164 (delta 86), reused 89 (delta 42) | |
remote: /data/github/current/lib/github/logger.rb:1:in `require': cannot load such file -- scrolls (LoadError) | |
remote: from /data/github/current/lib/github/logger.rb:1:in `<top (required)>' | |
remote: from /data/github/current/lib/github.rb:13:in `require' | |
remote: from /data/github/current/lib/github.rb:13:in `<top (required)>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function setjdk { | |
local ver=${1?Usage: setjdk <version>} | |
export JAVA_HOME=$(/usr/libexec/java_home -v $ver) | |
PATH=$(echo $PATH | tr ':' '\n' | grep -v Java | tr '\n' ':') | |
export PATH=$JAVA_HOME/bin:$PATH | |
java -version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyMutableObject | |
{ | |
private int value; | |
public MyMutableObject(int value) | |
{ | |
this.value = value; | |
} | |
public synchronized int getValue() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CallException | |
implements Callable<Boolean> | |
{ | |
@Override | |
public Boolean call() | |
throws IOException | |
{ | |
try { | |
if (Math.random() > 0) { | |
throw new IOException("random io failure"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.weakref.algorithms.graph; | |
import java.util.ArrayDeque; | |
import java.util.Deque; | |
import java.util.HashMap; | |
import java.util.Map; | |
import static java.lang.String.format; | |
import static java.util.Arrays.asList; |
NewerOlder