Skip to content

Instantly share code, notes, and snippets.

/**
* Use a @JsonAnySetter method which will get called even for empty/null fields, but won't get called if the field
* isn't set at all. This allows us to distinguish set/unset, but can't be used with final fields. However, it plays
* nicely with more complex objects with other fields, such as nested objects or arrays (you'd just make a @JsonCreator
* constructor or setters for the other fields). Also, make sure to put @JsonIgnore on the field, otherwise
* Jackson will set the field directly (to null) instead of calling your @JsonAnySetter method, making it impossible
* to distinguish set/unset fields. To compensate for the @JsonIgnore, you probably want @JsonGetter on the corresponding getter.
*/
public class AnySetter {
@JsonIgnore
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hubspot</groupId>
<artifactId>basepom</artifactId>
<version>15.7</version>
</parent>
Caused by: java.lang.RuntimeException: Unable to find proto buffer class
at com.google.protobuf.GeneratedMessageLite$SerializedForm.readResolve(GeneratedMessageLite.java:775)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1148)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2036)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
import hashlib
import requests
artifacts = [
{
'path': 'com/mycila/license-maven-plugin/2.11/license-maven-plugin-2.11.pom',
'actual_sha1': 'ca4834f90a2091bbd50cc0d72dff94c743a7fc9f'
},
{
'path': 'com/mycila/license-maven-plugin-parent/2.11/license-maven-plugin-parent-2.11.pom',
private SignalFxProtocolBuffers.DataPoint toSignalFxDatapoint(Data.DataPoint dataPoint) {
long timestamp = TimeUnit.SECONDS.toMillis(dataPoint.getTimestamp());
recordLag(timestamp);
final String metricSource = getMetricSourceTag(dataPoint.getTagsList());
final String source = toSignalFxSource(dataPoint.getTagsList());
return SignalFxProtocolBuffers.DataPoint.newBuilder()
.setMetric(toSignalFxMetric(dataPoint.getTagsList()))
.setMetricType(toSignalFxMetricType(dataPoint.getTagsList()))
.setValue(toSignalFxValue(dataPoint))
.setSource(source)
Result "com.hubspot.dropwizard.BootstrapRestBenchmark.hitBootstrapRest":
N = 24402
mean = 2.050 ±(99.9%) 0.063 ms/op
Histogram, ms/op:
[ 0.000, 12.500) = 24155
[ 12.500, 25.000) = 181
[ 25.000, 37.500) = 41
[ 37.500, 50.000) = 14
[ 50.000, 62.500) = 5
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>0.1-SNAPSHOT</version>
<dependencies>
<dependency>
#!/bin/bash
set -e
libdir="$M2_HOME/lib"
cd $libdir
resolverjar=`ls maven-resolver-impl-*.jar`
tmpdir=`mktemp -d -t maven.XXXXXX`
cd $tmpdir
➜ ~ curl -s https://oss.sonatype.org/content/repositories/releases/com/mycila/license-maven-plugin/2.11/license-maven-plugin-2.11.pom | shasum
ca4834f90a2091bbd50cc0d72dff94c743a7fc9f -
➜ ~ curl https://oss.sonatype.org/content/repositories/releases/com/mycila/license-maven-plugin/2.11/license-maven-plugin-2.11.pom.sha1
236d8fde9973092682cc886028fbdd6f009ee907%
➜ ~ curl http://central.maven.org/maven2/com/mycila/license-maven-plugin/2.11/license-maven-plugin-2.11.pom.sha1
ca4834f90a2091bbd50cc0d72dff94c743a7fc9f%
2018-03-01 16:36:57,881 [96310919] INFO - ea.checkstyle.CheckStylePlugin - CheckStyle Plugin loaded with project base dir: "/Users/jhaber/src/Wormhole"
2018-03-01 16:36:57,882 [96310920] INFO - ellij.project.impl.ProjectImpl - 124 project components initialized in 30 ms
2018-03-01 16:36:57,882 [96310920] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2018-03-01 16:36:57,906 [96310944] INFO - ution.rmi.RemoteProcessSupport - Terminating: 39473/Maven3ServerImpl726ae692
2018-03-01 16:37:01,552 [96314590] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 1ms; general responsiveness: ok; EDT responsiveness: ok
2018-03-01 16:37:01,593 [96314631] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 0 to update, calculated in 0ms
2018-03-01 16:37:01,594 [96314632] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 0 to update, calculated in 0ms
2018-03-01 16:37:01,694 [96314732] INFO - g.FileBasedIndexProjectH