Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor java code cleanup #73

Merged
merged 1 commit into from
Oct 22, 2018
Merged

Minor java code cleanup #73

merged 1 commit into from
Oct 22, 2018

Conversation

ajayk
Copy link

@ajayk ajayk commented Sep 6, 2018

Issue #, if available:

Description of changes:
Update Compiler and Surefire Plugin
Basic Java cleanup

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@SalusaSecondus
Copy link
Contributor

Thank you for this PR. We'll look through it.

@SalusaSecondus SalusaSecondus self-assigned this Sep 11, 2018
bdonlan
bdonlan previously approved these changes Oct 22, 2018
@bdonlan bdonlan dismissed their stale review October 22, 2018 17:53

test failures

@bdonlan
Copy link
Contributor

bdonlan commented Oct 22, 2018

These changes break the tests:

$ JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home mvn test -Pfast-tests-only
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.amazonaws:aws-encryption-sdk-java >----------------
[INFO] Building aws-encryption-sdk-java 1.3.6-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ aws-encryption-sdk-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/bdonlan/sdkjava/aws-encryption-sdk-java/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ aws-encryption-sdk-java ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 67 source files to /Users/bdonlan/sdkjava/aws-encryption-sdk-java/target/classes
[INFO] /Users/bdonlan/sdkjava/aws-encryption-sdk-java/src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java: Some input files use unchecked or unsafe operations.
[INFO] /Users/bdonlan/sdkjava/aws-encryption-sdk-java/src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ aws-encryption-sdk-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/bdonlan/sdkjava/aws-encryption-sdk-java/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ aws-encryption-sdk-java ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ aws-encryption-sdk-java ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.amazonaws.encryptionsdk.FastTestsOnlySuite
[ERROR] Tests run: 2001, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 27.486 s <<< FAILURE! - in com.amazonaws.encryptionsdk.FastTestsOnlySuite
[ERROR] contextWithInvalidCharacters(com.amazonaws.encryptionsdk.internal.EncContextSerializerTest)  Time elapsed: 0.006 s  <<< ERROR!
java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.NoSuchMethodError>
	at com.amazonaws.encryptionsdk.internal.EncContextSerializerTest.contextWithInvalidCharacters(EncContextSerializerTest.java:365)

[ERROR] testGrantTokenPassthrough_usingMKsetCall(com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests)  Time elapsed: 0.031 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests.testGrantTokenPassthrough_usingMKsetCall(KMSProviderBuilderMockTests.java:122)

[ERROR] testUserAgentPassthrough(com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests)  Time elapsed: 0.017 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests.testUserAgentPassthrough(KMSProviderBuilderMockTests.java:220)

[ERROR] testGrantTokenPassthrough_usingMKPWithers(com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests)  Time elapsed: 0.01 s  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at com.amazonaws.encryptionsdk.kms.KMSProviderBuilderMockTests.testGrantTokenPassthrough_usingMKPWithers(KMSProviderBuilderMockTests.java:170)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   EncContextSerializerTest.contextWithInvalidCharacters »  Unexpected exception,...
[ERROR]   KMSProviderBuilderMockTests.testGrantTokenPassthrough_usingMKPWithers:170 » NoSuchMethod
[ERROR]   KMSProviderBuilderMockTests.testGrantTokenPassthrough_usingMKsetCall:122 » NoSuchMethod
[ERROR]   KMSProviderBuilderMockTests.testUserAgentPassthrough:220 » NoSuchMethod java.n...
[INFO]
[ERROR] Tests run: 2001, Failures: 0, Errors: 4, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.131 s
[INFO] Finished at: 2018-10-22T10:52:22-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project aws-encryption-sdk-java: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/bdonlan/sdkjava/aws-encryption-sdk-java/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@bdonlan
Copy link
Contributor

bdonlan commented Oct 22, 2018

Nevermind, looks like it was an unclean build. Approving.

@bdonlan bdonlan merged commit eb8702e into aws:master Oct 22, 2018
@ajayk ajayk deleted the minor-java-cleanup branch October 22, 2018 21:16
josecorella added a commit that referenced this pull request Nov 20, 2023
* chore: update node version in versioning cb step (#1712)

* AWS Encryption SDK 2.4.1 Release -- $(date +%Y-%m-%d)

## [2.4.1](v2.4.0...v2.4.1) (2023-08-09)

### Fixes

* **ci:** Quote commit statement to prevent errant YAML parsing ([#581](#581)) ([2166f2d](2166f2d))
* Fix errors in the example code in README.md ([#1306](#1306)) ([b3f5b00](b3f5b00))
* NOTICE.txt ([#1617](#1617)) ([6dbf436](6dbf436))

### Maintenance

* **ci:** add missing @test annotation ([#1333](#1333)) ([3f289ac](3f289ac))
* **CommitmentPolicy:** Detail Commitment Policy on Enum ([#913](#913)) ([753bf7d](753bf7d))
* **deps-dev:** bump junit-jupiter-api from 5.8.2 to 5.9.0 ([#1022](#1022)) ([3706959](3706959))
* **deps-dev:** bump junit-jupiter-api from 5.9.0 to 5.9.1 ([#1073](#1073)) ([a85666c](a85666c))
* **deps-dev:** bump junit-jupiter-api from 5.9.1 to 5.9.2 ([#1313](#1313)) ([1466784](1466784))
* **deps-dev:** bump junit-vintage-engine from 5.8.2 to 5.9.0 ([#1050](#1050)) ([4a1222c](4a1222c))
* **deps-dev:** bump junit-vintage-engine from 5.9.0 to 5.9.1 ([#1074](#1074)) ([55746cf](55746cf))
* **deps-dev:** bump junit-vintage-engine from 5.9.1 to 5.9.3 ([#1550](#1550)) ([14b6766](14b6766))
* **deps-dev:** bump mockito-core from 4.10.0 to 4.11.0 ([#1283](#1283)) ([5311392](5311392))
* **deps-dev:** bump mockito-core from 4.3.1 to 4.4.0 ([#625](#625)) ([3e6edf3](3e6edf3))
* **deps-dev:** bump mockito-core from 4.4.0 to 4.6.1 ([#918](#918)) ([bf7978b](bf7978b))
* **deps-dev:** bump mockito-core from 4.6.1 to 4.8.0 ([#1055](#1055)) ([d47e1de](d47e1de))
* **deps-dev:** bump mockito-core from 4.8.0 to 4.8.1 ([#1147](#1147)) ([e2a0f52](e2a0f52))
* **deps-dev:** bump mockito-core from 4.8.1 to 4.9.0 ([#1194](#1194)) ([28c2e71](28c2e71))
* **deps-dev:** bump mockito-core from 4.9.0 to 4.10.0 ([#1254](#1254)) ([07e2ed2](07e2ed2))
* **deps:** bump actions/checkout from 2 to 3 ([#558](#558)) ([6652268](6652268))
* **deps:** bump aws-actions/configure-aws-credentials from 1 to 2 ([#1437](#1437)) ([91a5811](91a5811))
* **deps:** bump aws-java-sdk from 1.12.162 to 1.12.186 ([#629](#629)) ([ec38abe](ec38abe))
* **deps:** bump aws-java-sdk from 1.12.186 to 1.12.256 ([#920](#920)) ([ef4126b](ef4126b))
* **deps:** bump aws-java-sdk from 1.12.256 to 1.12.299 ([#1047](#1047)) ([fdf0a6d](fdf0a6d))
* **deps:** bump aws-java-sdk from 1.12.299 to 1.12.301 ([#1053](#1053)) ([718b3a2](718b3a2))
* **deps:** bump aws-java-sdk from 1.12.301 to 1.12.303 ([#1059](#1059)) ([970e9db](970e9db))
* **deps:** bump aws-java-sdk from 1.12.303 to 1.12.304 ([#1063](#1063)) ([e8471dc](e8471dc))
* **deps:** bump aws-java-sdk from 1.12.304 to 1.12.305 ([#1066](#1066)) ([5bc4b3b](5bc4b3b))
* **deps:** bump aws-java-sdk from 1.12.305 to 1.12.306 ([#1071](#1071)) ([93c8314](93c8314))
* **deps:** bump aws-java-sdk from 1.12.306 to 1.12.307 ([#1076](#1076)) ([88f85f4](88f85f4))
* **deps:** bump aws-java-sdk from 1.12.307 to 1.12.308 ([#1081](#1081)) ([53345b8](53345b8))
* **deps:** bump aws-java-sdk from 1.12.308 to 1.12.309 ([#1085](#1085)) ([658f9e9](658f9e9))
* **deps:** bump aws-java-sdk from 1.12.309 to 1.12.318 ([#1121](#1121)) ([18443d4](18443d4))
* **deps:** bump aws-java-sdk from 1.12.318 to 1.12.319 ([#1124](#1124)) ([624c592](624c592))
* **deps:** bump aws-java-sdk from 1.12.319 to 1.12.323 ([#1138](#1138)) ([74b3dd3](74b3dd3))
* **deps:** bump aws-java-sdk from 1.12.323 to 1.12.335 ([#1173](#1173)) ([b8b0d53](b8b0d53))
* **deps:** bump aws-java-sdk from 1.12.335 to 1.12.337 ([#1176](#1176)) ([fa92676](fa92676))
* **deps:** bump aws-java-sdk from 1.12.337 to 1.12.350 ([#1220](#1220)) ([35235a0](35235a0))
* **deps:** bump aws-java-sdk from 1.12.350 to 1.12.366 ([#1259](#1259)) ([456a4ad](456a4ad))
* **deps:** bump aws-java-sdk from 1.12.366 to 1.12.381 ([#1308](#1308)) ([80ed0a6](80ed0a6))
* **deps:** bump aws-java-sdk from 1.12.381 to 1.12.394 ([#1351](#1351)) ([0445b9e](0445b9e))
* **deps:** bump BouncyCastle from 1.72 to 1.75 ([#1670](#1670)) ([61b6260](61b6260))
* **deps:** bump jacoco-maven-plugin from 0.8.7 to 0.8.8 ([#655](#655)) ([802946a](802946a))
* **deps:** bump kms from 2.17.136 to 2.17.226 ([#916](#916)) ([6a4011e](6a4011e))
* **deps:** bump kms from 2.17.226 to 2.17.259 ([#1020](#1020)) ([6fc33b7](6fc33b7))
* **deps:** bump kms from 2.17.259 to 2.17.273 ([#1054](#1054)) ([d87cf16](d87cf16))
* **deps:** bump kms from 2.17.273 to 2.17.274 ([#1058](#1058)) ([4ab03c4](4ab03c4))
* **deps:** bump kms from 2.17.274 to 2.17.275 ([#1062](#1062)) ([5a70da4](5a70da4))
* **deps:** bump kms from 2.17.275 to 2.17.276 ([#1065](#1065)) ([a3d1fae](a3d1fae))
* **deps:** bump kms from 2.17.276 to 2.17.277 ([#1070](#1070)) ([7ca5c11](7ca5c11))
* **deps:** bump kms from 2.17.277 to 2.17.278 ([#1075](#1075)) ([cbac0a3](cbac0a3))
* **deps:** bump kms from 2.17.278 to 2.17.279 ([#1080](#1080)) ([558b2f4](558b2f4))
* **deps:** bump kms from 2.17.279 to 2.17.280 ([#1086](#1086)) ([29774ad](29774ad))
* **deps:** bump kms from 2.17.280 to 2.17.288 ([#1118](#1118)) ([8d94a69](8d94a69))
* **deps:** bump kms from 2.17.288 to 2.17.289 ([#1122](#1122)) ([d09ff99](d09ff99))
* **deps:** bump kms from 2.17.289 to 2.17.292 ([ff69200](ff69200))
* **deps:** bump kms from 2.17.292 to 2.18.8 ([#1167](#1167)) ([fa16a2d](fa16a2d))
* **deps:** bump kms from 2.18.12 to 2.18.38 ([#1252](#1252)) ([e35cf06](e35cf06))
* **deps:** bump kms from 2.18.8 to 2.18.12 ([#1177](#1177)) ([f514633](f514633))
* **deps:** bump maven-compiler-plugin from 3.9.0 to 3.10.1 ([#582](#582)) ([9e24357](9e24357))
* **deps:** bump maven-javadoc-plugin from 3.3.1 to 3.3.2 ([#525](#525)) ([8489bd6](8489bd6))
* **deps:** bump maven-javadoc-plugin from 3.3.2 to 3.4.1 ([#998](#998)) ([44be313](44be313))
* **deps:** bump maven-surefire-plugin from 2.22.2 to 3.1.2 ([#1632](#1632)) ([ea0a848](ea0a848))
* **deps:** bump nexus-staging-maven-plugin from 1.6.12 to 1.6.13 ([#704](#704)) ([15fab9f](15fab9f))
* **deps:** bump software.amazon.awssdk:bom from 2.17.136 to 2.17.228 ([#925](#925)) ([ae52cef](ae52cef))
* **deps:** bump software.amazon.awssdk:bom from 2.17.228 to 2.17.273 ([#1056](#1056)) ([e40651c](e40651c))
* **deps:** bump software.amazon.awssdk:bom from 2.17.273 to 2.17.274 ([#1057](#1057)) ([35f38bd](35f38bd))
* **deps:** bump software.amazon.awssdk:bom from 2.17.274 to 2.17.275 ([#1061](#1061)) ([18c8172](18c8172))
* **deps:** bump software.amazon.awssdk:bom from 2.17.275 to 2.17.276 ([#1067](#1067)) ([efd340d](efd340d))
* **deps:** bump software.amazon.awssdk:bom from 2.17.276 to 2.17.277 ([#1069](#1069)) ([5721a81](5721a81))
* **deps:** bump software.amazon.awssdk:bom from 2.17.277 to 2.17.278 ([#1077](#1077)) ([49b867e](49b867e))
* **deps:** bump software.amazon.awssdk:bom from 2.17.278 to 2.17.280 ([#1084](#1084)) ([cb2a92f](cb2a92f))
* **deps:** bump software.amazon.awssdk:bom from 2.17.280 to 2.17.288 ([#1116](#1116)) ([7ff4e14](7ff4e14))
* **deps:** bump software.amazon.awssdk:bom from 2.17.288 to 2.17.292 ([98236cd](98236cd))
* **deps:** bump software.amazon.awssdk:bom from 2.17.292 to 2.18.1 ([#1148](#1148)) ([f7f6088](f7f6088))
* **deps:** bump software.amazon.awssdk:bom from 2.18.1 to 2.18.8 ([#1168](#1168)) ([12e5383](12e5383))
* **deps:** bump software.amazon.awssdk:bom from 2.18.12 to 2.18.38 ([#1251](#1251)) ([6593b98](6593b98))
* **deps:** bump software.amazon.awssdk:bom from 2.18.38 to 2.19.11 ([#1299](#1299)) ([cd08a3b](cd08a3b))
* **deps:** bump software.amazon.awssdk:bom from 2.18.8 to 2.18.12 ([#1178](#1178)) ([03bc7bd](03bc7bd))
* **deps:** bump software.amazon.awssdk:bom from 2.19.11 to 2.19.26 ([#1354](#1354)) ([7ee7f55](7ee7f55))
* **deps:** bump software.amazon.awssdk:bom from 2.19.26 to 2.20.91 ([#1667](#1667)) ([2b5f92a](2b5f92a))
* Detail AWS SDK v2 support ([#835](#835)) ([5705e1f](5705e1f))
* Fix re-run CI workflows ([#1219](#1219)) ([3bec521](3bec521))
* remove mainline-1.x from dependabot ([#1120](#1120)) ([3956822](3956822))
* Run CodeBuild CI from Github Actions ([#1213](#1213)) ([ba726b5](ba726b5))
* **SupportPolicy:** Mark 1.x End-of-Support ([#1026](#1026)) ([ff93eab](ff93eab))
* Update `org.bouncycastle` to `bcprov-ext-jdk18on` ([#1572](#1572)) ([c56aff3](c56aff3))
* update node version in versioning cb step ([#1712](#1712)) ([a34e0ad](a34e0ad))
* use correct signing key for release ([#928](#928)) ([86332e4](86332e4))
* use new signing keys for ci ([#840](#840)) ([6043417](6043417))

* chore(deps): bump org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0 (#1717)

Bumps org.apache.commons:commons-lang3 from 3.12.0 to 3.13.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: fix release script (#1796)

* chore: fix release script

* chore(tests): update ESDK tests to replace sun.security.* API (#1852)

Update ESDK Java tests to replace sun.security.* API with supported alternate API

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: José Corella <39066999+josecorella@users.noreply.github.com>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants