Skip to content

Commit 5d8e6f9

Browse files
committed
minimal refactoring
1 parent c9e3b75 commit 5d8e6f9

3 files changed

Lines changed: 7 additions & 48 deletions

File tree

pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@
7171
</plugin>
7272
</plugins>
7373
</build>
74-
<distributionManagement>
75-
<site>
76-
<id>gitHub</id>
77-
<name>gitHub</name>
78-
<url>git:git@github.com/verhas/jScriptBasic</url>
79-
</site>
80-
</distributionManagement>
8174
<dependencies>
8275
<dependency>
8376
<groupId>org.mockito</groupId>

src/main/java/com/scriptbasic/executors/rightvalues/BasicBooleanValue.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ public BasicBooleanValue(final Boolean b) {
1010

1111
private static Boolean convertNumeric(
1212
final AbstractNumericRightValue<Number> originalValue) {
13-
Boolean convertedValue = null;
13+
final Boolean convertedValue;
1414
if (originalValue.isLong()) {
1515
final var l = (Long) originalValue.getValue();
1616
convertedValue = l != null && l != 0;
1717
} else if (originalValue.isDouble()) {
1818
final var d = (Double) originalValue.getValue();
1919
convertedValue = d != null && d != 0;
20+
} else {
21+
convertedValue = null;
2022
}
2123
return convertedValue;
2224
}
2325

2426
public static Boolean asBoolean(final RightValue originalValue) {
25-
Boolean convertedValue = null;
27+
final Boolean convertedValue;
2628

2729
if (originalValue == null) {
2830
convertedValue = Boolean.FALSE;
@@ -41,12 +43,14 @@ public static Boolean asBoolean(final RightValue originalValue) {
4143
// TODO elaborate the conversion with other object classes
4244
convertedValue = o != null;
4345
}
46+
} else {
47+
convertedValue = null;
4448
}
4549
return convertedValue;
4650
}
4751

4852
@Override
4953
public String toString() {
50-
return asBoolean(this).toString();
54+
return asBoolean(this).toString();
5155
}
5256
}

src/site/site.xml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)