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
WITH calendar(date_value) AS ( | |
SELECT TIMESTAMP '1582-09-30 00:00:00' | |
FROM dual | |
UNION ALL | |
SELECT date_value + 1 | |
FROM calendar | |
WHERE date_value <= TIMESTAMP '1582-10-16 00:00:00' | |
) | |
SELECT date_value | |
FROM calendar; |
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
class PortableDecimalFormatTest { | |
@Test | |
void decimalFormat() { | |
Locale switzerland = new Locale("de", "CH"); | |
DecimalFormat format = (DecimalFormat) NumberFormat.getInstance(switzerland); | |
format.applyPattern("#,##0.00"); | |
DecimalFormatSymbols decimalFormatSymbols = format.getDecimalFormatSymbols(); | |
decimalFormatSymbols.setGroupingSeparator('\''); | |
// important because #getDecimalFormatSymbols() returns a clone |
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
class SwissDecimalFormatTest { | |
@Test | |
void decimalFormat() { | |
Locale switzerland = new Locale("de", "CH"); | |
DecimalFormat format = (DecimalFormat) NumberFormat.getInstance(switzerland); | |
format.applyPattern("#,##0.00"); | |
String formatted = format.format(new BigDecimal("1234567.8")); | |
assertEquals("1'234'567.80", formatted); |
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
class val {} | |
val val = new val() |
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
WARNING: An illegal reflective access operation has occurred | |
WARNING: Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler (file:/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/lib/missioncontrol/plugins/org.eclipse.emf.ecore.xmi_2.12.0.v20160420-0247.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding() | |
WARNING: Please consider reporting this to the maintainers of org.eclipse.emf.ecore.xmi.impl.XMLHandler | |
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations | |
WARNING: All illegal access operations will be denied in a future release |
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 -version | |
openjdk version "1.8.0_121" | |
OpenJDK Runtime Environment (build 1.8.0_121-b13) | |
OpenJDK 64-Bit Graal VM (build 25.71-b01-internal-jvmci-0.30, mixed mode) | |
Result "com.github.marschall.charsequences.ParseUuidBenchmark.parseJdk": | |
2.411 ±(99.9%) 0.014 ops/us [Average] | |
(min, avg, max) = (2.124, 2.411, 2.462), stdev = 0.043 | |
CI (99.9%): [2.396, 2.425] (assumes normal distribution) |
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
class com/sun/ejb/containers/EJBContextImpl uses type java/security/Identity deprecated FOR REMOVAL | |
class com/sun/ejb/containers/EJBContextImpl uses method in type java/security/Identity deprecated FOR REMOVAL | |
class com/sun/ejb/containers/EJBContextImpl method getCallerIdentity has return type Ljava/security/Identity; deprecated FOR REMOVAL | |
class com/sun/ejb/containers/EJBContextImpl method isCallerInRole has parameter type Ljava/security/Identity; deprecated FOR REMOVAL | |
class com/sun/enterprise/security/PolicyLoader uses type javax/security/auth/Policy deprecated FOR REMOVAL | |
class com/sun/enterprise/security/PolicyLoader uses method in type javax/security/auth/Policy deprecated FOR REMOVAL | |
class com/sun/enterprise/security/PolicyLoader uses method in type javax/security/auth/Policy deprecated FOR REMOVAL | |
class com/sun/enterprise/security/ssl/GlassfishSSLSupport uses type [Ljavax/security/cert/X509Certificate; deprecated FOR REMOVAL | |
class com/sun/enterprise/security/ssl/GlassfishSSLSupport uses type javax/sec |
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_HOME/bin/jdeprscan --for-removal --release 9 oracle-javaee-api-7.0.jar | |
interface javax/ejb/EJBContext method getCallerIdentity has return type Ljava/security/Identity; deprecated FOR REMOVAL | |
interface javax/ejb/EJBContext method isCallerInRole has parameter type Ljava/security/Identity; deprecated FOR REMOVAL |
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
class Vector | |
{ | |
public float x, y, z; | |
public Vector(float x, float y, float z) | |
{ | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} |
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 SequenceableCollection { | |
public static <T> List<T> streamContents(Supplier<List<T>> constructor, Consumer<Consumer<T>> block) { | |
List<T> result = constructor.get(); | |
block.accept(each -> result.add(each)); | |
return result; | |
} | |
public static List<String> example(ResultSet rs) { | |
return streamContents(ArrayList::new, (accumulator) -> { |
NewerOlder