diff --git a/.baseline/checkstyle/checkstyle-suppressions.xml b/.baseline/checkstyle/checkstyle-suppressions.xml
index 59e401ce..5b9a462f 100644
--- a/.baseline/checkstyle/checkstyle-suppressions.xml
+++ b/.baseline/checkstyle/checkstyle-suppressions.xml
@@ -11,6 +11,7 @@
+
diff --git a/.baseline/checkstyle/checkstyle.xml b/.baseline/checkstyle/checkstyle.xml
index 2677cbb5..103b7e00 100644
--- a/.baseline/checkstyle/checkstyle.xml
+++ b/.baseline/checkstyle/checkstyle.xml
@@ -19,7 +19,7 @@
-
+
@@ -39,8 +39,13 @@
+
+
+
+
+
-
+
@@ -73,7 +78,12 @@
-
+
@@ -165,11 +175,11 @@
-
+
-
+
@@ -287,11 +297,6 @@
-
-
-
-
-
@@ -319,7 +324,7 @@
-
+
@@ -396,7 +401,7 @@
-
+
@@ -411,7 +416,7 @@
-
+
diff --git a/.baseline/copyright/apache-2.0.txt b/.baseline/copyright/001_apache-2.0.txt
similarity index 87%
rename from .baseline/copyright/apache-2.0.txt
rename to .baseline/copyright/001_apache-2.0.txt
index c12d5ab0..54d4a031 100644
--- a/.baseline/copyright/apache-2.0.txt
+++ b/.baseline/copyright/001_apache-2.0.txt
@@ -1,4 +1,4 @@
-Copyright ${today.year} Palantir Technologies, Inc. All rights reserved.
+(c) Copyright ${today.year} Palantir Technologies Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/.baseline/eclipse/org.eclipse.jdt.core.prefs b/.baseline/eclipse/org.eclipse.jdt.core.prefs
index dc125f1d..fc7a7ddf 100644
--- a/.baseline/eclipse/org.eclipse.jdt.core.prefs
+++ b/.baseline/eclipse/org.eclipse.jdt.core.prefs
@@ -109,7 +109,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
diff --git a/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs b/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs
index c0204737..f2990d96 100644
--- a/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs
+++ b/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs
@@ -11,7 +11,7 @@ org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=/**\n * @return the ${bare_field_name}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//**\n * ${tags}\n *//**\n * ${tags}\n *//**\n * ${tags}\n *//* (non-Javadoc)\n * ${see_to_overridden}\n *//**\n * ${tags}\n * ${see_to_target}\n *//*\n * Copyright ${year} Palantir Technologies, Inc. All rights reserved.\n */\n\n${package_declaration}\n\n/**\n * \n */\n${typecomment}\n${type_declaration}\n\n\n\nthrow new RuntimeException(${exception_var});${body_statement}${body_statement}return ${field};${field} \= ${param};
+org.eclipse.jdt.ui.text.custom_code_templates=/**\n * @return the ${bare_field_name}\n *//**\n * @param ${param} the ${bare_field_name} to set\n *//**\n * ${tags}\n *//**\n * ${tags}\n *//**\n * ${tags}\n *//* (non-Javadoc)\n * ${see_to_overridden}\n *//**\n * ${tags}\n * ${see_to_target}\n *//*\n * (c) Copyright ${year} Palantir Technologies Inc. All rights reserved.\n */\n\n${package_declaration}\n\n/**\n * \n */\n${typecomment}\n${type_declaration}\n\n\n\nthrow new RuntimeException(${exception_var});${body_statement}${body_statement}return ${field};${field} \= ${param};
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
diff --git a/.baseline/idea/intellij-java-palantir-style.xml b/.baseline/idea/intellij-java-palantir-style.xml
index 18550582..54e7e9dd 100644
--- a/.baseline/idea/intellij-java-palantir-style.xml
+++ b/.baseline/idea/intellij-java-palantir-style.xml
@@ -91,6 +91,7 @@
+
diff --git a/build.gradle b/build.gradle
index 61bef2f3..2b5ffc13 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,13 +5,12 @@ buildscript {
}
dependencies {
- classpath 'com.netflix.nebula:nebula-dependency-recommender:3.6.3'
+ classpath 'com.netflix.nebula:nebula-dependency-recommender:5.2.0'
+ classpath 'com.netflix.nebula:nebula-publishing-plugin:7.0.6'
classpath 'gradle.plugin.com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.2.0'
classpath 'com.palantir.gradle.docker:gradle-docker:0.12.0'
- classpath 'com.palantir.baseline:gradle-baseline-java:0.13.0-rc3'
- classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.4.14'
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
- classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0'
+ classpath 'com.palantir.baseline:gradle-baseline-java:0.19.1'
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
}
}
@@ -19,7 +18,7 @@ plugins {
id 'com.palantir.git-version' version '0.5.2'
id 'org.inferred.processors' version '1.2.3'
id 'com.palantir.jacoco-full-report' version '0.3.0'
- id 'org.unbroken-dome.test-sets' version '1.3.2'
+ id 'org.unbroken-dome.test-sets' version '1.4.5'
}
repositories {
@@ -32,7 +31,7 @@ apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'org.inferred.processors'
dependencies {
- baseline 'com.palantir.baseline:gradle-baseline-java-config:0.13.0-rc3@zip'
+ baseline 'com.palantir.baseline:gradle-baseline-java-config:0.19.1@zip'
}
allprojects {
@@ -99,7 +98,8 @@ subprojects {
compileJava {
options.compilerArgs += [
'-XepDisableWarningsInGeneratedCode',
- '-Xep:OptionalEquality:WARN'
+ '-Xep:OptionalEquality:WARN',
+ '-Werror'
]
}
}
diff --git a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
index 4811b3c4..0553be61 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
index 85992af9..23d1c887 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
index 431013b0..449b40b8 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
index fbbc736f..c10321c4 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
index f96a2787..04dd5532 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
index e11ecd83..badd5094 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
index 760016c7..4b122411 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
index 3b73cde8..47754a18 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
index 543c8a7b..fac00f29 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
index 1f8f87ca..52906b35 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/Person.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/Person.java
index 649cef79..600dafa8 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/Person.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/Person.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/TestConfig.java b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/TestConfig.java
index 0514f5f3..215df961 100644
--- a/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/TestConfig.java
+++ b/encrypted-config-value-bundle-dropwizard1/src/test/java/com/palantir/config/crypto/util/TestConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
index 4811b3c4..0553be61 100644
--- a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
+++ b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/ConfigurationDecryptionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
index c0ffc15b..6cf186b3 100644
--- a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
+++ b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptConfigValueCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
index 431013b0..449b40b8 100644
--- a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
+++ b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/EncryptedConfigValueBundle.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
index 68372495..e4ce7988 100644
--- a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
+++ b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/GenerateKeyCommand.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
index 6ddcfcae..0809cf87 100644
--- a/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
+++ b/encrypted-config-value-bundle/src/main/java/com/palantir/config/crypto/SubstitutingConfigurationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
index e11ecd83..badd5094 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/EncryptConfigValueCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
index 87b02154..11553e30 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/GenerateKeyCommandTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
index 9b7d5636..b7624a98 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/SubstitutingConfigurationFactoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
index 543c8a7b..fac00f29 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/VariableSubstitutionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
index 83aa8d4f..6982ac5e 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/Person.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/Person.java
index 649cef79..600dafa8 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/Person.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/Person.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/TestConfig.java b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/TestConfig.java
index 0514f5f3..215df961 100644
--- a/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/TestConfig.java
+++ b/encrypted-config-value-bundle/src/test/java/com/palantir/config/crypto/util/TestConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/DecryptingVariableSubstitutor.java b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/DecryptingVariableSubstitutor.java
index 1df5db33..b99b0ed2 100644
--- a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/DecryptingVariableSubstitutor.java
+++ b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/DecryptingVariableSubstitutor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtils.java b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtils.java
index f575bda7..c0c5db61 100644
--- a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtils.java
+++ b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtils.java
@@ -1,5 +1,17 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
+ *
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.palantir.config.crypto.jackson;
diff --git a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacer.java b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacer.java
index 824d1b11..d546ddc2 100644
--- a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacer.java
+++ b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeStringReplacer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitor.java b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitor.java
index d6fddfa0..e8eda79b 100644
--- a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitor.java
+++ b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitors.java b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitors.java
index bec01093..c00b7bc2 100644
--- a/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitors.java
+++ b/encrypted-config-value-module/src/main/java/com/palantir/config/crypto/jackson/JsonNodeVisitors.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/DecryptingVariableSubstitutorTest.java b/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/DecryptingVariableSubstitutorTest.java
index 21b76dc3..f7601e2f 100644
--- a/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/DecryptingVariableSubstitutorTest.java
+++ b/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/DecryptingVariableSubstitutorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtilsTest.java b/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtilsTest.java
index 6cb3c501..ed40a2fd 100644
--- a/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtilsTest.java
+++ b/encrypted-config-value-module/src/test/java/com/palantir/config/crypto/jackson/EncryptedConfigMapperUtilsTest.java
@@ -1,5 +1,17 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
+ *
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.palantir.config.crypto.jackson;
diff --git a/encrypted-config-value/build.gradle b/encrypted-config-value/build.gradle
index 10c01b48..51648b9c 100644
--- a/encrypted-config-value/build.gradle
+++ b/encrypted-config-value/build.gradle
@@ -2,6 +2,7 @@ apply from: "${rootDir}/gradle/publish.gradle"
apply from: "${rootDir}/gradle/immutables-processors.gradle"
dependencies {
+ compile 'com.google.errorprone:error_prone_annotations'
compile 'com.google.guava:guava'
compile 'com.fasterxml.jackson.core:jackson-databind'
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValue.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValue.java
index 62f3d842..9d1dd045 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValue.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,6 +80,7 @@ public static EncryptedValue fromString(String value) {
}
}
+ @Override
public final String toString() {
byte[] bytes = accept(new EncryptedValueVisitor() {
@Override
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValueVisitor.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValueVisitor.java
index eba43706..49cb03d0 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValueVisitor.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/EncryptedValueVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/Key.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/Key.java
index a2914c7c..6da4520d 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/Key.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/Key.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyFileUtils.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyFileUtils.java
index 4c30d0b2..fc266949 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyFileUtils.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyFileUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPair.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPair.java
index e9f90b74..a9b27d16 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPair.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPair.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPairFiles.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPairFiles.java
index 733412cd..f51a7621 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPairFiles.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyPairFiles.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyWithType.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyWithType.java
index 9ee04630..822c2625 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyWithType.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/KeyWithType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/LegacyEncryptedValue.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/LegacyEncryptedValue.java
index e2c90230..7a023fd0 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/LegacyEncryptedValue.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/LegacyEncryptedValue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Algorithm.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Algorithm.java
index 04cdc403..56b94dea 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Algorithm.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Algorithm.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package com.palantir.config.crypto.algorithm;
import com.fasterxml.jackson.annotation.JsonValue;
-import com.google.common.base.Supplier;
import com.palantir.config.crypto.KeyPair;
import com.palantir.config.crypto.algorithm.aes.AesGcmEncrypter;
import com.palantir.config.crypto.algorithm.aes.AesKeyPair;
@@ -30,28 +29,35 @@
* algorithm with a supported key.
*/
public enum Algorithm {
- AES("AES", () -> AesKeyPair.newKeyPair(), () -> AesGcmEncrypter.INSTANCE),
- RSA("RSA", () -> RsaKeyPair.newKeyPair(), () -> RsaOaepEncrypter.INSTANCE);
+ AES("AES", AesGcmEncrypter.INSTANCE) {
+ @Override
+ public KeyPair newKeyPair() {
+ return AesKeyPair.newKeyPair();
+ }
+ },
+ RSA("RSA", RsaOaepEncrypter.INSTANCE) {
+ @Override
+ public KeyPair newKeyPair() {
+ return RsaKeyPair.newKeyPair();
+ }
+ };
private final String name;
- private final Supplier keyPairGenerator;
- private final Supplier encrypterGenerator;
+ private final Encrypter encrypter;
- Algorithm(String name, Supplier keyPairGenerator, Supplier cipherGenerator) {
+ Algorithm(String name, Encrypter cipher) {
this.name = name;
- this.keyPairGenerator = keyPairGenerator;
- this.encrypterGenerator = cipherGenerator;
+ this.encrypter = cipher;
}
- public KeyPair newKeyPair() {
- return keyPairGenerator.get();
- }
+ public abstract KeyPair newKeyPair();
public Encrypter newEncrypter() {
- return encrypterGenerator.get();
+ return encrypter;
}
@JsonValue
+ @Override
public String toString() {
return name;
}
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Encrypter.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Encrypter.java
index 1c0305ef..7846fddc 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Encrypter.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/Encrypter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,9 +17,11 @@
package com.palantir.config.crypto.algorithm;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.EncryptedValue;
import com.palantir.config.crypto.KeyWithType;
+@Immutable
public interface Encrypter {
/**
* Creates an {@link EncryptedValue} that is the result of encrypting the provided plaintext using the provided key.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyGenerator.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyGenerator.java
index e9b54d23..368d4ea5 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyGenerator.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,9 +17,11 @@
package com.palantir.config.crypto.algorithm;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.Key;
import com.palantir.config.crypto.KeyWithType;
+@Immutable
public interface KeyGenerator {
/**
* Creates a {@link KeyWithType} based on the provided key content bytes. The provided bytes should correspond to
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyType.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyType.java
index a120fc92..115a35eb 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyType.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/KeyType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,6 +52,7 @@ public static KeyType from(String name) {
this.algorithm = algorithm;
}
+ @Override
public String toString() {
return name;
}
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesEncryptedValue.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesEncryptedValue.java
index 4a479409..bc2f526f 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesEncryptedValue.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesEncryptedValue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesGcmEncrypter.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesGcmEncrypter.java
index cdca31ea..472d5c9e 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesGcmEncrypter.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesGcmEncrypter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package com.palantir.config.crypto.algorithm.aes;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.EncryptedValue;
import com.palantir.config.crypto.KeyWithType;
import com.palantir.config.crypto.algorithm.Encrypter;
@@ -27,6 +28,7 @@
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;
+@Immutable
public enum AesGcmEncrypter implements Encrypter {
INSTANCE;
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKey.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKey.java
index 7ce30901..ac1adf8b 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKey.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKey.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package com.palantir.config.crypto.algorithm.aes;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.ImmutableKeyWithType;
import com.palantir.config.crypto.Key;
import com.palantir.config.crypto.KeyWithType;
@@ -41,6 +42,7 @@ public byte[] bytes() {
return secretKey.getEncoded();
}
+ @Immutable
public enum AesKeyGenerator implements KeyGenerator {
INSTANCE;
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKeyPair.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKeyPair.java
index 5fb1509a..de7a5585 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKeyPair.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/aes/AesKeyPair.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaEncryptedValue.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaEncryptedValue.java
index ac8dea57..3b2972df 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaEncryptedValue.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaEncryptedValue.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaKeyPair.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaKeyPair.java
index 2eea55d5..125b309e 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaKeyPair.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaKeyPair.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaOaepEncrypter.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaOaepEncrypter.java
index 3affb73a..ff9803d9 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaOaepEncrypter.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaOaepEncrypter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package com.palantir.config.crypto.algorithm.rsa;
import com.fasterxml.jackson.annotation.JsonValue;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.EncryptedValue;
import com.palantir.config.crypto.KeyWithType;
import com.palantir.config.crypto.algorithm.Encrypter;
@@ -32,6 +33,7 @@
/**
* Encrypts values using RSA-OAEP-MDF1. Uses SHA-256 as the hash function for both OAEP and MDF1.
*/
+@Immutable
public enum RsaOaepEncrypter implements Encrypter {
INSTANCE;
@@ -49,6 +51,7 @@ public enum HashAlgorithm {
}
@JsonValue
+ @Override
public String toString() {
return name;
}
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPrivateKey.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPrivateKey.java
index e8535128..7d1bd84c 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPrivateKey.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPrivateKey.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package com.palantir.config.crypto.algorithm.rsa;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.ImmutableKeyWithType;
import com.palantir.config.crypto.Key;
import com.palantir.config.crypto.KeyWithType;
@@ -44,6 +45,7 @@ public byte[] bytes() {
return privateKey.getEncoded();
}
+ @Immutable
public enum RsaPrivateKeyGenerator implements KeyGenerator {
INSTANCE;
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPublicKey.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPublicKey.java
index 8d4b0ecd..092ba90b 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPublicKey.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/algorithm/rsa/RsaPublicKey.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package com.palantir.config.crypto.algorithm.rsa;
+import com.google.errorprone.annotations.Immutable;
import com.palantir.config.crypto.ImmutableKeyWithType;
import com.palantir.config.crypto.Key;
import com.palantir.config.crypto.KeyWithType;
@@ -44,6 +45,7 @@ public byte[] bytes() {
return publicKey.getEncoded();
}
+ @Immutable
public enum RsaPublicKeyGenerator implements KeyGenerator {
INSTANCE;
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/DecryptedStringSupplier.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/DecryptedStringSupplier.java
index 21a3a858..213abc29 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/DecryptedStringSupplier.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/DecryptedStringSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/ThrowingSupplier.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/ThrowingSupplier.java
index 72583888..671148b9 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/ThrowingSupplier.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/supplier/ThrowingSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/StringSubstitutionException.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/StringSubstitutionException.java
index 541d0702..6763310e 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/StringSubstitutionException.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/StringSubstitutionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/Suppliers.java b/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/Suppliers.java
index 8e20687c..1e004537 100644
--- a/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/Suppliers.java
+++ b/encrypted-config-value/src/main/java/com/palantir/config/crypto/util/Suppliers.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/test/java/com/palantir/config/crypto/AlgorithmTest.java b/encrypted-config-value/src/test/java/com/palantir/config/crypto/AlgorithmTest.java
index 731b6622..eec30286 100644
--- a/encrypted-config-value/src/test/java/com/palantir/config/crypto/AlgorithmTest.java
+++ b/encrypted-config-value/src/test/java/com/palantir/config/crypto/AlgorithmTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueCompatTest.java b/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueCompatTest.java
index 437cf3dc..84957276 100644
--- a/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueCompatTest.java
+++ b/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueCompatTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueTest.java b/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueTest.java
index 65e3d252..d4f16c2e 100644
--- a/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueTest.java
+++ b/encrypted-config-value/src/test/java/com/palantir/config/crypto/EncryptedValueTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/test/java/com/palantir/config/crypto/KeyWithTypeTest.java b/encrypted-config-value/src/test/java/com/palantir/config/crypto/KeyWithTypeTest.java
index 99679ed4..d32f56fe 100644
--- a/encrypted-config-value/src/test/java/com/palantir/config/crypto/KeyWithTypeTest.java
+++ b/encrypted-config-value/src/test/java/com/palantir/config/crypto/KeyWithTypeTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/encrypted-config-value/src/test/java/com/palantir/config/crypto/util/StringSubstitutionExceptionTest.java b/encrypted-config-value/src/test/java/com/palantir/config/crypto/util/StringSubstitutionExceptionTest.java
index 52d14c69..cdfae25a 100644
--- a/encrypted-config-value/src/test/java/com/palantir/config/crypto/util/StringSubstitutionExceptionTest.java
+++ b/encrypted-config-value/src/test/java/com/palantir/config/crypto/util/StringSubstitutionExceptionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
+ * (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/gradle/publish-base.gradle b/gradle/publish-base.gradle
new file mode 100644
index 00000000..adea9e29
--- /dev/null
+++ b/gradle/publish-base.gradle
@@ -0,0 +1,22 @@
+apply plugin: 'com.jfrog.bintray'
+apply plugin: 'nebula.maven-base-publish'
+apply plugin: 'nebula.maven-resolved-dependencies'
+apply plugin: 'nebula.javadoc-jar'
+apply plugin: 'nebula.source-jar'
+
+bintray {
+ user = System.env.BINTRAY_USERNAME
+ key = System.env.BINTRAY_PASSWORD
+ publish = true
+ pkg {
+ repo = 'releases'
+ name = 'encrypted-config-value'
+ userOrg = 'palantir'
+ licenses = ['Apache-2.0']
+ publications = ['nebula']
+ }
+}
+
+bintrayUpload.dependsOn { generatePomFileForNebulaPublication }
+bintrayUpload.dependsOn { sourceJar }
+bintrayUpload.dependsOn { build }
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
index ef4679ea..7cdfd252 100644
--- a/gradle/publish.gradle
+++ b/gradle/publish.gradle
@@ -1,65 +1,9 @@
-apply plugin: 'maven-publish'
-apply plugin: 'com.jfrog.bintray'
-apply plugin: 'com.jfrog.artifactory'
-
-task sourceJar(type: Jar) {
- from sourceSets.main.allSource
- classifier 'sources'
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
- destinationDir rootProject.file("${buildDir}/libs")
-}
-
-tasks.build.dependsOn sourceJar, javadocJar
+apply from: "${rootDir}/gradle/publish-base.gradle"
publishing {
publications {
- bintray(MavenPublication) {
+ nebula(MavenPublication) {
from components.java
- artifact(sourceJar)
- artifact(javadocJar)
- version project.version.replaceAll(/-.*/, '-SNAPSHOT')
- }
- }
-}
-
-
-artifactory {
- publish {
- contextUrl = 'https://oss.jfrog.org/artifactory'
- repository {
- repoKey = (project.version =~ /-/ ? 'oss-snapshot-local' : 'oss-release-local')
- username = System.env.BINTRAY_USERNAME
- password = System.env.BINTRAY_PASSWORD
- maven = true
- }
- defaults {
- publications (publishing.publications.bintray)
- properties = ['git': project.version]
}
}
}
-artifactoryPublish.dependsOn 'generatePomFileForBintrayPublication', 'build'
-
-bintray {
- user = System.env.BINTRAY_USERNAME
- key = System.env.BINTRAY_PASSWORD
- publish = true
- pkg {
- repo = 'releases'
- name = 'encrypted-config-value'
- userOrg = 'palantir'
- licenses = ['Apache-2.0']
- publications = ['bintray']
- }
-}
-
-bintrayUpload.onlyIf {
- System.env.BINTRAY_USERNAME && System.env.BINTRAY_PASSWORD && project.version ==~ /\d+\.\d+\.\d+/
-}
-
-bintrayUpload.dependsOn 'generatePomFileForBintrayPublication', 'build'
-
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 3c7abdf1..91ca28c8 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a0b28519..16d28051 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
diff --git a/gradlew b/gradlew
index 91a7e269..cccdd3d5 100755
--- a/gradlew
+++ b/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,20 +6,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index aec99730..e95643d6 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail
:init
-@rem Get command-line arguments, handling Windowz variants
+@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
diff --git a/version.props b/version.props
index 182d82d4..6d6fc41e 100644
--- a/version.props
+++ b/version.props
@@ -3,6 +3,7 @@ com.fasterxml.jackson.dataformat:jackson-dataformat-yaml = 2.6.1
com.fasterxml.jackson.datatype:jackson-datatype-guava = 2.6.1
com.fasterxml.jackson.datatype:jackson-datatype-jdk7 = 2.6.1
com.google.code.findbugs:jsr305 = 3.0.0
+com.google.errorprone:error_prone_annotations = 2.3.1
com.google.guava:guava = 21.0
com.netflix.feign:feign-jackson = 8.11.0
com.netflix.feign:feign-jaxrs = 8.11.0
@@ -15,7 +16,7 @@ junit:junit = 4.12
org.apache.commons:commons-lang3 = 3.4
org.hamcrest:hamcrest-all = 1.3
org.hamcrest:hamcrest-core = 1.3
-org.immutables:value = 2.4.4
+org.immutables:value = 2.5.6
org.mockito:mockito-core = 1.10.19
org.objenesis:objenesis = 2.2
org.slf4j:slf4j-api = 1.7.12