Skip to content

Commit

Permalink
refactoring and simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyLandman authored and jurgenvinju committed Oct 17, 2023
1 parent 0a90ceb commit fe673d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

<groupId>io.usethesource</groupId>
<artifactId>vallang</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0-RC1</version>
<packaging>jar</packaging>

<scm>
<developerConnection>scm:git:ssh://[email protected]/usethesource/vallang.git</developerConnection>
<tag>HEAD</tag>
<tag>v1.0.0-RC1</tag>
</scm>

<!-- dependency resolution configuration (usethesource) -->
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/io/usethesource/vallang/INode.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public interface INode extends IValue, Iterable<IValue> {
default int getMatchFingerprint() {
int hash = getName().hashCode();

return hash == 0 ? 13547528 /* "node".hashCode() << 2*/ + arity() : hash + 131 * arity();
if (hash == 0) {
hash = 13547528 /* "node".hashCode() << 2*/;
}

return hash + 131 * arity();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/usethesource/vallang/IReal.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IReal extends INumber {
@Override
default int getMatchFingerprint() {
int hash = hashCode();
return hash == 0 ? 3496350 /* real.hashCode() */ : hash;
return hash == 0 ? 3496350 /* "real".hashCode() */ : hash;
}

/**
Expand Down

0 comments on commit fe673d2

Please sign in to comment.