From f0f74c1ada9e65030d732656b0f33ad07ea98c6b Mon Sep 17 00:00:00 2001 From: Anton Shvetz Date: Sat, 4 May 2024 01:56:04 +0300 Subject: [PATCH] Cleanup --- build.xml | 5 ++++- src/ant/config.properties | 2 +- .../coneforest/psylla/core/PsyErrorException.java | 4 +++- .../coneforest/psylla/core/PsyRational.java | 8 -------- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/build.xml b/build.xml index c7869b5e..733587ce 100644 --- a/build.xml +++ b/build.xml @@ -212,6 +212,7 @@ access="public" encoding="UTF-8" charset="UTF-8" + doctitle="Psylla ${project.version}" windowtitle="Psylla ${project.version}" > @@ -221,7 +222,8 @@ - + + @@ -229,6 +231,7 @@ + Copyright © 2014—2024 ${project.developer.name} diff --git a/src/ant/config.properties b/src/ant/config.properties index 77adedbe..d9f004e3 100644 --- a/src/ant/config.properties +++ b/src/ant/config.properties @@ -35,7 +35,7 @@ project.moduleprefix=${project.maven.groupId}.${project.maven.artifactId} project.name=${ant.project.name} project.nameversion=${project.name}-${project.version} project.purl=pkg:github/${project.developer.id}/${project.name} -project.scm.connection=scm:git:git@github.com:${project.developer.id}/${project.name}.git +project.scm.connection=scm:git:http://github.com:${project.developer.id}/${project.name} project.scm.developerConnection=scm:git:git@github.com:${project.developer.id}/${project.name}.git project.scm.url=https://github.com/${project.developer.id}/${project.name} project.summary=The Psylla programming language diff --git a/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyErrorException.java b/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyErrorException.java index a9e62723..d63fc2f0 100644 --- a/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyErrorException.java +++ b/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyErrorException.java @@ -1,6 +1,7 @@ package coneforest.psylla.core; import coneforest.psylla.*; +import java.util.Stack; import java.util.StringJoiner; @Type("error") @@ -9,6 +10,7 @@ abstract public class PsyErrorException extends Exception implements PsyExecutable { + @Override public void invoke(final PsyContext oContext) { try @@ -51,7 +53,7 @@ public void invoke(final PsyContext oContext) public String getName() { - var agenda=new java.util.Stack>(); + var agenda=new Stack>(); agenda.push(getClass()); while(agenda.size()>0) diff --git a/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyRational.java b/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyRational.java index e34d5054..ccc438e2 100644 --- a/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyRational.java +++ b/src/main/java/coneforest.psylla/coneforest/psylla/core/PsyRational.java @@ -40,18 +40,14 @@ default public PsyRational psyNeg() default public PsyRealNumeric psyAdd(final PsyRealNumeric oRealNumeric) { if(oRealNumeric instanceof PsyIntegral oIntegral) - { return of( (PsyIntegral)psyNumerator().psyAdd(psyDenominator().psyMul(oIntegral)), psyDenominator()); - } if(oRealNumeric instanceof PsyRational oRational) - { return of( (PsyIntegral)psyNumerator().psyMul(oRational.psyDenominator()) .psyAdd(psyDenominator().psyMul(oRational.psyNumerator())), (PsyIntegral)psyDenominator().psyMul(oRational.psyDenominator())); - } if(oRealNumeric instanceof PsyReal oReal) return new PsyReal(doubleValue()+oReal.doubleValue()); throw new ClassCastException(); @@ -61,18 +57,14 @@ default public PsyRealNumeric psyAdd(final PsyRealNumeric oRealNumeric) default public PsyRealNumeric psySub(final PsyRealNumeric oRealNumeric) { if(oRealNumeric instanceof PsyIntegral oIntegral) - { return of( (PsyIntegral)psyNumerator().psySub(psyDenominator().psyMul(oIntegral)), psyDenominator()); - } if(oRealNumeric instanceof PsyRational oRational) - { return of( (PsyIntegral)psyNumerator().psyMul(oRational.psyDenominator()) .psySub(psyDenominator().psyMul(oRational.psyNumerator())), (PsyIntegral)psyDenominator().psyMul(oRational.psyDenominator())); - } if(oRealNumeric instanceof PsyReal oReal) return new PsyReal(doubleValue()+oReal.doubleValue()); throw new ClassCastException();