I hereby claim:
- I am odrotbohm on github.
- I am odrotbohm (https://keybase.io/odrotbohm) on keybase.
- I have a public key ASBAoaL1ovuekChAwlljeBmx1owaUCg5zwckYgcSGiGeAQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@Component | |
public class MockPostProcessor implements BeanPostProcessor { | |
/* | |
* (non-Javadoc) | |
* @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object, java.lang.String) | |
*/ | |
@Override | |
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { |
public class Sample { | |
public static void main(String[] args) { | |
Foo<? extends Bar<?>> foo = new Foo<>(); | |
// Compiles | |
Iterable<?> first = foo.someMethod(); | |
DedicatedWrapper<? extends Bar<?>> dedicatedWrapper = foo.someOtherMethod(); |
public class LambdaTypeDetectionSample { | |
public static void main(String[] args) { | |
Function<Integer, String> lambdaFunction = i -> i.toString(); | |
Function<Integer, String> oldschoolFunction = new Function<Integer, String>() { | |
public String apply(Integer t) { | |
return t.toString(); | |
} |
package org.sample; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.Date; | |
import java.util.TimeZone; | |
import org.openjdk.jmh.annotations.Benchmark; |
/* | |
* Copyright 2016 the original author or authors. | |
* | |
* 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 |
public class AmbiguitySample { | |
/** | |
* This compiles when using a JDK 8 with target JDK 6 but fails when the target is JDK 8. | |
*/ | |
public static void main(String[] args) { | |
CriteriaBuilder builder; | |
Expression<Object> objectExpression; | |
Expression<Collection<Object>> collectionOfObjectExpression; |
@RequiredArgsConstructor | |
public class ViewModel { | |
private final @NonNull YourService service; | |
public boolean yourDescriptiveMethod() { | |
return service.someMethod() | |
} | |
// … more methods |