File tree Expand file tree Collapse file tree
main/java/com/scriptbasic/executors/rightvalues Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments