Skip to content

Commit

Permalink
fix: eliminate the possibility of NullPointerException (#56)
Browse files Browse the repository at this point in the history
* fix: eliminate the possibility of NullPointerException 
* build: fix release build

---------

Co-authored-by: Ryan Peper <ryan.peper@outlook.com>
  • Loading branch information
wadahiro and Ryan Peper authored Nov 2, 2024
1 parent d55eacf commit e2b5991
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[
"@terrestris/maven-semantic-release",
{
"mavenTarget": "install",
"mavenTarget": "deploy",
"clean": false,
"updateSnapshotVersion": true,
"settingsPath": "/home/runner/.m2/settings.xml",
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
<target>17</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event,

String username = getJsonProperty(profile, "username");
String discriminator = getJsonProperty(profile, "discriminator");
if (!discriminator.equals("0")) {
username = username + "#" + discriminator;

if (!"0".equals(discriminator)) {
username += "#" + discriminator;
}

user.setUsername(username);
user.setEmail(getJsonProperty(profile, "email"));
user.setIdp(this);
Expand Down

0 comments on commit e2b5991

Please sign in to comment.