-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SpotBugs and fix new issues (#420)
* Bump com.github.spotbugs:spotbugs-maven-plugin from 4.7.3.6 to 4.8.1.0 Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.6 to 4.8.1.0. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.7.3.6...spotbugs-maven-plugin-4.8.1.0) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Move PatchOperationPath parsing into util method. Construction of object now happens in util method as to not be vunlerable to finalizer attacks. This is probably a nit, but SpotBugs/FindSecBugs flagged this issue in the latest update. There are a few other minor related issues flagged by the spotbugs upgrade as well - missing static keywords - fields that could be private * Explicitly configure lombok annotation processor This will prevent build cache misses --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a799af6
commit 163f732
Showing
17 changed files
with
81 additions
and
64 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -322,7 +322,7 @@ public void applyRemove() { | |
public void applyWithFilterExpression() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REPLACE); | ||
op.setPath(new PatchOperationPath("emails[type EQ \"home\"].value")); | ||
op.setPath(PatchOperationPath.fromString("emails[type EQ \"home\"].value")); | ||
op.setValue("[email protected]"); | ||
ScimUser updatedUser = patchHandler.apply(user(), List.of(op)); | ||
List<Email> emails = updatedUser.getEmails(); | ||
|
@@ -341,7 +341,7 @@ public void applyWithFilterExpression() throws FilterParseException { | |
public void replaceItem() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REPLACE); | ||
op.setPath(new PatchOperationPath("emails[type EQ \"home\"]")); | ||
op.setPath(PatchOperationPath.fromString("emails[type EQ \"home\"]")); | ||
op.setValue(Map.of( | ||
"type", "other", | ||
"value", "[email protected]" | ||
|
@@ -395,7 +395,7 @@ public void replaceMultipleAttributes() { | |
public void replaceCollection() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REPLACE); | ||
op.setPath(new PatchOperationPath("emails")); | ||
op.setPath(PatchOperationPath.fromString("emails")); | ||
op.setValue(List.of( | ||
Map.of( | ||
"value", "[email protected]", | ||
|
@@ -422,7 +422,7 @@ public void replaceCollection() throws FilterParseException { | |
public void deleteItemWithFilter() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REMOVE); | ||
op.setPath(new PatchOperationPath("emails[type EQ \"home\"]")); | ||
op.setPath(PatchOperationPath.fromString("emails[type EQ \"home\"]")); | ||
ScimUser updatedUser = patchHandler.apply(user(), List.of(op)); | ||
List<Email> emails = updatedUser.getEmails(); | ||
assertThat(emails).isEqualTo(List.of( | ||
|
@@ -437,7 +437,7 @@ public void deleteItemWithFilter() throws FilterParseException { | |
public void deleteAttributeWithPath() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REMOVE); | ||
op.setPath(new PatchOperationPath("nickName")); | ||
op.setPath(PatchOperationPath.fromString("nickName")); | ||
ScimUser updatedUser = patchHandler.apply(user(), List.of(op)); | ||
assertThat(updatedUser.getNickName()).isNull(); | ||
} | ||
|
@@ -446,7 +446,7 @@ public void deleteAttributeWithPath() throws FilterParseException { | |
public void deleteCollectionWithPath() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REMOVE); | ||
op.setPath(new PatchOperationPath("emails")); | ||
op.setPath(PatchOperationPath.fromString("emails")); | ||
ScimUser updatedUser = patchHandler.apply(user(), List.of(op)); | ||
assertThat(updatedUser.getEmails()).isNull(); | ||
} | ||
|
@@ -455,7 +455,7 @@ public void deleteCollectionWithPath() throws FilterParseException { | |
public void deleteItemWithComplexFilter() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(REMOVE); | ||
op.setPath(new PatchOperationPath("emails[type EQ \"home\"] and value ew \"example.com\"")); | ||
op.setPath(PatchOperationPath.fromString("emails[type EQ \"home\"] and value ew \"example.com\"")); | ||
ScimUser updatedUser = patchHandler.apply(user(), List.of(op)); | ||
assertThat(updatedUser.getEmails()).isEqualTo(List.of( | ||
new Email() | ||
|
@@ -469,7 +469,7 @@ public void deleteItemWithComplexFilter() throws FilterParseException { | |
public void addAttribute() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(ADD); | ||
op.setPath(new PatchOperationPath("profileUrl")); | ||
op.setPath(PatchOperationPath.fromString("profileUrl")); | ||
op.setValue("https://profile.example.com"); | ||
|
||
ScimUser expectedUser = user() | ||
|
@@ -483,7 +483,7 @@ public void addAttribute() throws FilterParseException { | |
public void addItem() throws FilterParseException { | ||
PatchOperation op = new PatchOperation(); | ||
op.setOperation(ADD); | ||
op.setPath(new PatchOperationPath("emails")); | ||
op.setPath(PatchOperationPath.fromString("emails")); | ||
op.setValue(Map.of( | ||
"type", "other", | ||
"value", "[email protected]")); | ||
|
@@ -537,11 +537,11 @@ public void addMultipleProperties() throws FilterParseException { | |
public void multiplePatchOperations() throws FilterParseException { | ||
PatchOperation opRm = new PatchOperation(); | ||
opRm.setOperation(REMOVE); | ||
opRm.setPath(new PatchOperationPath("emails[type EQ \"home\"]")); | ||
opRm.setPath(PatchOperationPath.fromString("emails[type EQ \"home\"]")); | ||
|
||
PatchOperation opAdd = new PatchOperation(); | ||
opAdd.setOperation(ADD); | ||
opAdd.setPath(new PatchOperationPath("emails")); | ||
opAdd.setPath(PatchOperationPath.fromString("emails")); | ||
opAdd.setValue(Map.of( | ||
"value", "[email protected]", | ||
"type", "other") | ||
|
@@ -564,11 +564,11 @@ public void multiplePatchOperations() throws FilterParseException { | |
public void replaceCollectionWithMultipleOps() throws FilterParseException { | ||
PatchOperation opRm = new PatchOperation(); | ||
opRm.setOperation(REMOVE); | ||
opRm.setPath(new PatchOperationPath("emails")); | ||
opRm.setPath(PatchOperationPath.fromString("emails")); | ||
|
||
PatchOperation opAdd = new PatchOperation(); | ||
opAdd.setOperation(ADD); | ||
opAdd.setPath(new PatchOperationPath("emails")); | ||
opAdd.setPath(PatchOperationPath.fromString("emails")); | ||
opAdd.setValue(List.of( | ||
Map.of( | ||
"value", "[email protected]", | ||
|
@@ -597,7 +597,7 @@ private PatchOperation patchOperation(Type operationType, String path, Object va | |
PatchOperation op = new PatchOperation(); | ||
op.setOperation(operationType); | ||
if (path != null) { | ||
op.setPath(new PatchOperationPath(path)); | ||
op.setPath(PatchOperationPath.fromString(path)); | ||
} | ||
if (value != null) { | ||
op.setValue(value); | ||
|
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
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
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
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
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
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
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
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
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
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