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 CallerProvider extends SecurityManager { | |
public Class<?> getCallerClass() { | |
return getClassContext()[2]; | |
} | |
} |
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
# Run complete. Total time: 00:00:20 | |
Benchmark (url) Mode Samples Score Error Units | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://foo.com/blah_blah ss 300 580,450 ± 100,057 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://142.42.1.1:8080/ ss 300 575,237 ± 99,833 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://例子.测试 ss 300 454,633 ± 50,617 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http//foo/ ss 300 181,290 ± 15,749 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp ///a ss 300 86,680 ± 17,834 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp :// should fail ss 300 80,807 ± 11,059 us | |
o.h.v.URLConstraintBenchmark.measureValid |
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
javax.persistence.PersistenceException: org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException: Could not obtain JBoss Transactions transaction manager instance | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) | |
at org.hibernate.jpa.internal.EntityManagerImpl.isOpen(EntityManagerImpl.java:170) | |
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(EntityManagerImpl.java:101) | |
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(EntityManagerImpl.java:96) | |
at org.hibernate.jpa.internal.EntityManagerImpl.getSession(EntityManagerImpl.java:111) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.setDefaultProperties(AbstractEntityManagerImpl.java:308) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerIm |
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
File[] files = Maven.resolver() | |
.resolve( "org.apache.avro:avro:jar:1.7.6" ) | |
.withTransitivity() | |
.asFile(); | |
System.out.println( Arrays.toString( files ) ); |
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
// UC-1: As a user of OGM, upon an exception during flush(), I want to log all operations applied so far and abort the | |
// processing of the flush cycle |
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
➜ hibernate-orm git:(HHH-9708) ✗ ./gradlew clean compileJava | |
:buildSrc:compileJava UP-TO-DATE | |
:buildSrc:compileGroovy UP-TO-DATE | |
:buildSrc:processResources UP-TO-DATE | |
:buildSrc:classes UP-TO-DATE | |
:buildSrc:jar UP-TO-DATE | |
:buildSrc:assemble UP-TO-DATE | |
:buildSrc:compileTestJava UP-TO-DATE | |
:buildSrc:compileTestGroovy UP-TO-DATE | |
:buildSrc:processTestResources UP-TO-DATE |
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
// Copyright © 2015 Gunnar Morling | |
// This work is free. You can redistribute it and/or modify it under the | |
// terms of the Do What The Fuck You Want To Public License, Version 2, | |
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
// ==UserScript== | |
// @name GitHub PR branch links | |
// @description Renders the source and target branches of GitHub pull requests as links | |
// @namespace http://gunnarmorling.de | |
// @include https://github.com/* |
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
@Id | |
@DocumentId | |
@NumericField(forField="id_forNumericSort") | |
@Field(name = "id_forNumericSort", store=Store.NO, index=Index.NO) | |
public Integer getId() { | |
return id; | |
} |
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
@Field(analyzed=Analyze.NO) | |
@SortField | |
public String getLastname() { | |
return lastname; | |
} |
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
@Indexed | |
public class PointOfInterest { | |
@Id | |
@DocumentId | |
@Field(name = "myId") | |
@NumericField | |
private byte id; | |
... |