You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(36) |
Apr
(36) |
May
(127) |
Jun
(193) |
Jul
(12) |
Aug
(46) |
Sep
(66) |
Oct
(28) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(39) |
Feb
(68) |
Mar
(58) |
Apr
(88) |
May
(40) |
Jun
(82) |
Jul
(213) |
Aug
(19) |
Sep
(2) |
Oct
(26) |
Nov
(2) |
Dec
|
| 2008 |
Jan
(5) |
Feb
(30) |
Mar
(26) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(4) |
Apr
(44) |
May
(1) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(35) |
Jun
|
Jul
|
Aug
(48) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(40) |
| 2017 |
Jan
(82) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(37) |
Mar
(28) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(27) |
| 2021 |
Jan
(52) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(72) |
Dec
(100) |
| 2022 |
Jan
(119) |
Feb
(94) |
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
(97) |
| 2023 |
Jan
(52) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(21) |
Oct
(8) |
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(11) |
Feb
(1) |
Mar
|
Apr
(27) |
May
(62) |
Jun
(27) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2025-07-01 09:33:15
|
Revision: 2883
http://sourceforge.net/p/axsl/code/2883
Author: victormote
Date: 2025-07-01 09:33:08 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
Replace axsl.test-fixtures-conventions.gradle with java-test-fixtures.
Modified Paths:
--------------
trunk/axsl/axsl-fotree/build.gradle
trunk/axsl/axsl-kp-model/build.gradle
Removed Paths:
-------------
trunk/axsl/buildSrc/src/main/groovy/axsl.test-fixtures-conventions.gradle
Modified: trunk/axsl/axsl-fotree/build.gradle
===================================================================
--- trunk/axsl/axsl-fotree/build.gradle 2025-07-01 00:04:00 UTC (rev 2882)
+++ trunk/axsl/axsl-fotree/build.gradle 2025-07-01 09:33:08 UTC (rev 2883)
@@ -1,6 +1,6 @@
plugins {
id "axsl.library-conventions"
- id "axsl.test-fixtures-conventions"
+ id 'java-test-fixtures'
}
description = "axsl-fotree"
Modified: trunk/axsl/axsl-kp-model/build.gradle
===================================================================
--- trunk/axsl/axsl-kp-model/build.gradle 2025-07-01 00:04:00 UTC (rev 2882)
+++ trunk/axsl/axsl-kp-model/build.gradle 2025-07-01 09:33:08 UTC (rev 2883)
@@ -1,6 +1,6 @@
plugins {
id 'axsl.library-conventions'
- id 'axsl.test-fixtures-conventions'
+ id 'java-test-fixtures'
}
description = "axsl-kp-model"
Deleted: trunk/axsl/buildSrc/src/main/groovy/axsl.test-fixtures-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.test-fixtures-conventions.gradle 2025-07-01 00:04:00 UTC (rev 2882)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.test-fixtures-conventions.gradle 2025-07-01 09:33:08 UTC (rev 2883)
@@ -1,12 +0,0 @@
-/* Precompiled script plugin for aXSL projects that contain test fixtures. */
-
-plugins {
- id 'axsl.common-conventions'
- id 'java-test-fixtures'
- id 'maven-publish'
-}
-
-dependencies {
-}
-
-/* Last line of script. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-07-01 00:04:02
|
Revision: 2882
http://sourceforge.net/p/axsl/code/2882
Author: victormote
Date: 2025-07-01 00:04:00 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
Fix build problems reported by dependency-analysis.
Modified Paths:
--------------
trunk/axsl/axsl-constants/build.gradle
trunk/axsl/axsl-kp-model/build.gradle
trunk/axsl/axsl-value/build.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/axsl-constants/build.gradle
===================================================================
--- trunk/axsl/axsl-constants/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
+++ trunk/axsl/axsl-constants/build.gradle 2025-07-01 00:04:00 UTC (rev 2882)
@@ -1,8 +1,12 @@
plugins {
id 'axsl.library-conventions'
- id 'axsl.test-conventions'
}
+
description = "axsl-constants"
+dependencies {
+ testImplementation libs.junit.jupiter.api
+}
+
/* Last line of script. */
Modified: trunk/axsl/axsl-kp-model/build.gradle
===================================================================
--- trunk/axsl/axsl-kp-model/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
+++ trunk/axsl/axsl-kp-model/build.gradle 2025-07-01 00:04:00 UTC (rev 2882)
@@ -1,6 +1,5 @@
plugins {
id 'axsl.library-conventions'
- id 'axsl.test-conventions'
id 'axsl.test-fixtures-conventions'
}
@@ -7,6 +6,7 @@
description = "axsl-kp-model"
dependencies {
+ testImplementation libs.junit.jupiter.api
}
/* Last line of script. */
Modified: trunk/axsl/axsl-value/build.gradle
===================================================================
--- trunk/axsl/axsl-value/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
+++ trunk/axsl/axsl-value/build.gradle 2025-07-01 00:04:00 UTC (rev 2882)
@@ -1,6 +1,5 @@
plugins {
id "axsl.library-conventions"
- id "axsl.test-conventions"
}
description = "axsl-value"
@@ -8,6 +7,9 @@
dependencies {
api project(":axsl-i18n")
implementation project(":axsl-constants")
+
+
+ testImplementation libs.junit.jupiter.api
}
/* Last line of script. */
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-30 23:43:02 UTC (rev 2881)
+++ trunk/axsl/gradle/libs.versions.toml 2025-07-01 00:04:00 UTC (rev 2882)
@@ -49,6 +49,7 @@
checker-framework = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerFramework" }
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
+junit-jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }
junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher" }
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-30 23:43:05
|
Revision: 2881
http://sourceforge.net/p/axsl/code/2881
Author: victormote
Date: 2025-06-30 23:43:02 +0000 (Mon, 30 Jun 2025)
Log Message:
-----------
Fix build problems reported by dependency-analysis.
Modified Paths:
--------------
trunk/axsl/axsl-areatree/build.gradle
trunk/axsl/axsl-context/build.gradle
trunk/axsl/axsl-font/build.gradle
trunk/axsl/axsl-fotree/build.gradle
trunk/axsl/axsl-graphic/build.gradle
trunk/axsl/axsl-layout/build.gradle
trunk/axsl/axsl-linebreak/build.gradle
trunk/axsl/axsl-mif/build.gradle
trunk/axsl/axsl-orthography/build.gradle
trunk/axsl/axsl-output/build.gradle
trunk/axsl/axsl-pdf/build.gradle
trunk/axsl/axsl-ps/build.gradle
trunk/axsl/axsl-value/build.gradle
Modified: trunk/axsl/axsl-areatree/build.gradle
===================================================================
--- trunk/axsl/axsl-areatree/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-areatree/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,5 +1,5 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-areatree"
@@ -10,11 +10,13 @@
* The area tree is intended to be a not-very-smart container for the results of layout, and should be agnostic
* about how that layout was accomplished. */
- api (project(':axsl-context'))
- api (project(':axsl-fotree'))
- api (project(':axsl-galley'))
- api (project(':axsl-linebreak'))
- api (project(':axsl-orthography'))
+ api project(":axsl-context")
+ api project(":axsl-fotree")
+ api project(":axsl-galley")
+ api project(":axsl-linebreak")
+ api project(":axsl-font")
+ api project(":axsl-graphic")
+ api project(":axsl-value")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-context/build.gradle
===================================================================
--- trunk/axsl/axsl-context/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-context/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,12 +1,12 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-context"
dependencies {
- api (project(':axsl-i18n'))
- implementation (project(':axsl-value'))
+ api project(":axsl-i18n")
+ api project(":axsl-value")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-font/build.gradle
===================================================================
--- trunk/axsl/axsl-font/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-font/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,24 +1,25 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-font"
dependencies {
- implementation (project(':axsl-constants'))
- implementation (project(':axsl-primitive'))
- implementation (project(':axsl-ps'))
- implementation (project(':axsl-orthography'))
- implementation (project(':axsl-value'))
- api (project(':axsl-context'))
+ implementation project(":axsl-constants")
+ api project(":axsl-primitive")
+ api project(":axsl-ps")
+ api project(":axsl-orthography")
+ api project(":axsl-value")
+ api project(":axsl-context")
+ api project(":axsl-i18n")
}
/* We want the DTDs to live as part of the website files, so we need to copy them into the jar file here. */
jar {
- from rootProject.projectDir.absolutePath + '/axsl-00-dev/doc/web/dtds/0.1/en/',
+ from rootProject.projectDir.absolutePath + "/axsl-00-dev/doc/web/dtds/0.1/en/",
{
- include 'axsl-font-config.dtd'
- into '/resources/org/axsl/dtds/'
+ include "axsl-font-config.dtd"
+ into "/resources/org/axsl/dtds/"
}
}
Modified: trunk/axsl/axsl-fotree/build.gradle
===================================================================
--- trunk/axsl/axsl-fotree/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-fotree/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,6 +1,6 @@
plugins {
- id 'axsl.library-conventions'
- id 'axsl.test-fixtures-conventions'
+ id "axsl.library-conventions"
+ id "axsl.test-fixtures-conventions"
}
description = "axsl-fotree"
@@ -24,12 +24,12 @@
/* TODO: Either remove dependency on axsl-orthography and document why that should be permanent, or document why is
is absolutely needed. */
- implementation (project(':axsl-i18n'))
- implementation (project(':axsl-kp-model'))
- implementation (project(':axsl-orthography'))
- implementation (project(':axsl-value'))
- implementation (project(':axsl-primitive'))
- api (project(':axsl-context'))
+ api project(":axsl-i18n")
+ api project(":axsl-kp-model")
+ api project(":axsl-orthography")
+ api project(":axsl-value")
+ api project(":axsl-primitive")
+ api project(":axsl-context")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-graphic/build.gradle
===================================================================
--- trunk/axsl/axsl-graphic/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-graphic/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -5,14 +5,14 @@
description = "axsl-graphic"
dependencies {
- implementation libs.svg.dom
- implementation libs.mathml.dom
+ api libs.svg.dom
+ api libs.mathml.dom
implementation project(":axsl-constants")
- implementation project(":axsl-primitive")
- implementation project(":axsl-ps")
- implementation project(":axsl-font")
- implementation project(":axsl-orthography")
+ api project(":axsl-primitive")
+ api project(":axsl-ps")
+ api project(":axsl-font")
+ api project(":axsl-orthography")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-layout/build.gradle
===================================================================
--- trunk/axsl/axsl-layout/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-layout/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,12 +1,12 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-layout"
dependencies {
- implementation (project(':axsl-areatree'))
- implementation (project(':axsl-linebreak'))
+ api project(":axsl-areatree")
+ api project(":axsl-linebreak")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-linebreak/build.gradle
===================================================================
--- trunk/axsl/axsl-linebreak/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-linebreak/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,12 +1,12 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-linebreak"
dependencies {
- implementation (project(':axsl-context'))
- implementation (project(':axsl-kp-model'))
+ api project(":axsl-context")
+ api project(":axsl-kp-model")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-mif/build.gradle
===================================================================
--- trunk/axsl/axsl-mif/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-mif/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,11 +1,11 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-mif"
dependencies {
- implementation (project(':axsl-output'))
+ api project(":axsl-output")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-orthography/build.gradle
===================================================================
--- trunk/axsl/axsl-orthography/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-orthography/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,5 +1,5 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-orthography"
@@ -10,20 +10,20 @@
* composition in other projects.
* This project is intended to be a minimal component. */
- implementation (project(':axsl-primitive'))
- implementation (project(':axsl-i18n'))
+ api project(":axsl-primitive")
+ api project(":axsl-i18n")
}
/* We want the DTDs to live as part of the website files, so we need to copy them into the jar file here. */
jar {
- from rootProject.projectDir.absolutePath + '/axsl-00-dev/doc/web/dtds/0.1/en/',
+ from rootProject.projectDir.absolutePath + "/axsl-00-dev/doc/web/dtds/0.1/en/",
{
- include 'axsl-area-tree.dtd'
- include 'axsl-dictionary.dtd'
- include 'axsl-hyphenation.dtd'
- include 'axsl-orthography-config.dtd'
- include 'axsl-parts-of-speech.dtd'
- into '/resources/org/axsl/dtds/'
+ include "axsl-area-tree.dtd"
+ include "axsl-dictionary.dtd"
+ include "axsl-hyphenation.dtd"
+ include "axsl-orthography-config.dtd"
+ include "axsl-parts-of-speech.dtd"
+ into "/resources/org/axsl/dtds/"
}
}
Modified: trunk/axsl/axsl-output/build.gradle
===================================================================
--- trunk/axsl/axsl-output/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-output/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,5 +1,5 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-output"
@@ -8,8 +8,8 @@
/* Do *** NOT *** add a dependency here on axsl-areatree.
The output projects should have only read-only access to the area tree, i.e. axsl-galley. */
- implementation (project(':axsl-font'))
- implementation (project(':axsl-galley'))
+ api project(":axsl-font")
+ api project(":axsl-galley")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-pdf/build.gradle
===================================================================
--- trunk/axsl/axsl-pdf/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-pdf/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,14 +1,14 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-pdf"
dependencies {
- implementation (project(':axsl-font'))
- implementation (project(':axsl-graphic'))
- implementation (project(':axsl-orthography'))
- implementation (project(':axsl-ps'))
+ api project(":axsl-font")
+ api project(":axsl-graphic")
+ api project(":axsl-orthography")
+ api project(":axsl-ps")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-ps/build.gradle
===================================================================
--- trunk/axsl/axsl-ps/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-ps/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,11 +1,11 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-ps"
dependencies {
- implementation (project(':axsl-primitive'))
+ api project(":axsl-primitive")
}
/* Last line of script. */
Modified: trunk/axsl/axsl-value/build.gradle
===================================================================
--- trunk/axsl/axsl-value/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
+++ trunk/axsl/axsl-value/build.gradle 2025-06-30 23:43:02 UTC (rev 2881)
@@ -1,13 +1,13 @@
plugins {
- id 'axsl.library-conventions'
- id 'axsl.test-conventions'
+ id "axsl.library-conventions"
+ id "axsl.test-conventions"
}
description = "axsl-value"
dependencies {
- implementation (project(':axsl-i18n'))
- implementation (project(':axsl-constants'))
+ api project(":axsl-i18n")
+ implementation project(":axsl-constants")
}
/* Last line of script. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-30 22:46:29
|
Revision: 2880
http://sourceforge.net/p/axsl/code/2880
Author: victormote
Date: 2025-06-30 22:46:28 +0000 (Mon, 30 Jun 2025)
Log Message:
-----------
Setup dependency analysis plugin better.
Modified Paths:
--------------
trunk/axsl/build.gradle
Modified: trunk/axsl/build.gradle
===================================================================
--- trunk/axsl/build.gradle 2025-06-26 15:44:21 UTC (rev 2879)
+++ trunk/axsl/build.gradle 2025-06-30 22:46:28 UTC (rev 2880)
@@ -27,7 +27,7 @@
plugins {
id 'axsl.common-conventions'
id 'java-library-distribution'
- alias(libs.plugins.autonomousDependencyAnalysis)
+ alias(libs.plugins.autonomousDependencyAnalysis) apply false
alias(libs.plugins.aggregateJavadoc)
alias(libs.plugins.shadow)
alias(libs.plugins.checkerFramework)
@@ -124,6 +124,7 @@
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
+ apply(plugin: "com.autonomousapps.dependency-analysis")
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-26 15:44:24
|
Revision: 2879
http://sourceforge.net/p/axsl/code/2879
Author: victormote
Date: 2025-06-26 15:44:21 +0000 (Thu, 26 Jun 2025)
Log Message:
-----------
Fix checkstyle config and versioning.
Modified Paths:
--------------
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-26 13:28:37 UTC (rev 2878)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-26 15:44:21 UTC (rev 2879)
@@ -17,7 +17,19 @@
ext.buildDate = new Date().format("yyyy-MM-dd 'at' HH:mm 'GMT'", TimeZone.getTimeZone("GMT"))
+ext.versions = [
+ /* IMPORTANT: Most dependency versions should be managed in gradle/libs.versions.toml. The versions recorded here
+ should apply only to dependencies that cannot be managed from that document, or for which we do not know how to
+ manage from that document. */
+ /* The latest version of checkstyle as of 2025-06-11 is 10.25. As of that same date, the current Eclipse plugin for
+ checkstyle uses Checkstyle 10.23.0. We will use that for now to avoid configuration conflicts between the two
+ versions. */
+ checkstyle: "10.23.0"
+]
+
+
+
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle 2025-06-26 13:28:37 UTC (rev 2878)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle 2025-06-26 15:44:21 UTC (rev 2879)
@@ -24,8 +24,7 @@
checkstyle {
configFile = new File(rootProject.projectDir.absolutePath + '/axsl-00-dev/config/checkstyle/checkstyle-config.xml')
configProperties.put('axsl.root', rootProject.projectDir)
- // TODO: Fix this direct reference to a version number
- toolVersion = "10.23"
+ toolVersion = versions.checkstyle
}
artifacts {
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-26 13:28:37 UTC (rev 2878)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-26 15:44:21 UTC (rev 2879)
@@ -7,13 +7,13 @@
svgDom = "1.1"
mathMlDom = "2.0"
-checkerFramework = "3.49.2" # Latest is 3.49.2 as of 2025-04-20. See Note 4.
-checkerFrameworkGradlePlugin = "0.6.55" # Latest is 0.6.55 as of 2025-06-24. See Note 4.
+checkerFramework = "3.49.2" # Latest is 3.49.2 as of 2025-04-20. See Note 3.
+checkerFrameworkGradlePlugin = "0.6.55" # Latest is 0.6.55 as of 2025-06-24. See Note 3.
junit = "5.13.1" # Latest is 5.13.1 as of 2025-06-15.
-mockito = "4.11.0" # Latest is 5.18.0 as of 2025-06-04. See Note 3.
+mockito = "4.11.0" # Latest is 5.18.0 as of 2025-06-04. See Note 2.
# Build-time-only dependencies that should never be permanently used in build.gradle files.
-checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
+# checkstyle -- see axsl.common-conventions.gradle, ext.versions
autonomousDependencyAnalysis = "2.19.0" # Latest is 2.19.0 as of 2025-06-25.
aggregateJavadoc = "6.5.1"
shadow = "8.1.1"
@@ -26,12 +26,9 @@
# 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
# beta releases).
#
-# 2. The current (as of 2025-06-11) Eclipse plugin for checkstyle uses Checkstyle 10.23.
-# We will use that for now to avoid configuration conflicts between the two versions.
+# 2. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
#
-# 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
-#
-# 4. The version of the Checker Framework is irrelevant to us.
+# 3. The version of the Checker Framework is irrelevant to us.
# Instead, we use the Gradle Checker Framework Plugin which is a wrapper of, but a separate product from, the
# Checker Framework, having its own release cycle, and its own release numbering system.
# https://github.com/kelloggm/checkerframework-gradle-plugin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-26 13:28:40
|
Revision: 2878
http://sourceforge.net/p/axsl/code/2878
Author: victormote
Date: 2025-06-26 13:28:37 +0000 (Thu, 26 Jun 2025)
Log Message:
-----------
Fix junit dependency.
Modified Paths:
--------------
trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-26 11:37:08 UTC (rev 2877)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-26 13:28:37 UTC (rev 2878)
@@ -5,7 +5,6 @@
}
dependencies {
- testImplementation libs.junit.bom
testImplementation libs.junit.jupiter
testRuntimeOnly libs.junit.platform.launcher
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-26 11:37:08 UTC (rev 2877)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-26 13:28:37 UTC (rev 2878)
@@ -51,9 +51,8 @@
checker-framework = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerFramework" }
-junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit" }
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
-junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit" }
+junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher" }
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-26 11:37:11
|
Revision: 2877
http://sourceforge.net/p/axsl/code/2877
Author: victormote
Date: 2025-06-26 11:37:08 +0000 (Thu, 26 Jun 2025)
Log Message:
-----------
Rename libs for clarity.
Modified Paths:
--------------
trunk/axsl/axsl-graphic/build.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/axsl-graphic/build.gradle
===================================================================
--- trunk/axsl/axsl-graphic/build.gradle 2025-06-24 20:10:07 UTC (rev 2876)
+++ trunk/axsl/axsl-graphic/build.gradle 2025-06-26 11:37:08 UTC (rev 2877)
@@ -1,18 +1,18 @@
plugins {
- id 'axsl.library-conventions'
+ id "axsl.library-conventions"
}
description = "axsl-graphic"
dependencies {
- implementation libs.svg.lib
- implementation libs.mathml.lib
+ implementation libs.svg.dom
+ implementation libs.mathml.dom
- implementation (project(':axsl-constants'))
- implementation (project(':axsl-primitive'))
- implementation (project(':axsl-ps'))
- implementation (project(':axsl-font'))
- implementation (project(':axsl-orthography'))
+ implementation project(":axsl-constants")
+ implementation project(":axsl-primitive")
+ implementation project(":axsl-ps")
+ implementation project(":axsl-font")
+ implementation project(":axsl-orthography")
}
/* Last line of script. */
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-24 20:10:07 UTC (rev 2876)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-26 11:37:08 UTC (rev 2877)
@@ -14,7 +14,7 @@
# Build-time-only dependencies that should never be permanently used in build.gradle files.
checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
-autonomousDependencyAnalysis = "2.6.1"
+autonomousDependencyAnalysis = "2.19.0" # Latest is 2.19.0 as of 2025-06-25.
aggregateJavadoc = "6.5.1"
shadow = "8.1.1"
@@ -46,11 +46,10 @@
[libraries]
-svg-lib = { group = "org.axsl.org.w3c.dom.svg", name = "svg-dom-java", version.ref = "svgDom" }
-mathml-lib = { group = "org.axsl.org.w3c.dom.mathml", name = "mathml-dom-java", version.ref = "mathMlDom" }
+svg-dom = { group = "org.axsl.org.w3c.dom.svg", name = "svg-dom-java", version.ref = "svgDom" }
+mathml-dom = { group = "org.axsl.org.w3c.dom.mathml", name = "mathml-dom-java", version.ref = "mathMlDom" }
checker-framework = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerFramework" }
-# checkerFramework (group: 'org.checkerframework', name: 'checker', version: versions.checkerFramework)
junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit" }
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
@@ -60,6 +59,10 @@
+
+
+
+
[plugins]
checkerFramework = { id = "org.checkerframework", version.ref = "checkerFrameworkGradlePlugin" }
autonomousDependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "autonomousDependencyAnalysis" }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-24 20:10:10
|
Revision: 2876
http://sourceforge.net/p/axsl/code/2876
Author: victormote
Date: 2025-06-24 20:10:07 +0000 (Tue, 24 Jun 2025)
Log Message:
-----------
Move plugin configurations to libs.versions.toml.
Modified Paths:
--------------
trunk/axsl/build.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/build.gradle
===================================================================
--- trunk/axsl/build.gradle 2025-06-24 19:54:27 UTC (rev 2875)
+++ trunk/axsl/build.gradle 2025-06-24 20:10:07 UTC (rev 2876)
@@ -26,11 +26,11 @@
plugins {
id 'axsl.common-conventions'
- id "com.autonomousapps.dependency-analysis" version "2.6.1"
- id 'io.freefair.aggregate-javadoc' version "6.5.1"
id 'java-library-distribution'
- id 'com.github.johnrengelman.shadow' version '8.1.1'
- alias(libs.plugins.checkerframework)
+ alias(libs.plugins.autonomousDependencyAnalysis)
+ alias(libs.plugins.aggregateJavadoc)
+ alias(libs.plugins.shadow)
+ alias(libs.plugins.checkerFramework)
}
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-24 19:54:27 UTC (rev 2875)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-24 20:10:07 UTC (rev 2876)
@@ -14,8 +14,13 @@
# Build-time-only dependencies that should never be permanently used in build.gradle files.
checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
+autonomousDependencyAnalysis = "2.6.1"
+aggregateJavadoc = "6.5.1"
+shadow = "8.1.1"
+
+
# Notes on Dependency Releases (See above for references)
# ========================================================
# 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
@@ -56,6 +61,10 @@
[plugins]
-checkerframework = { id = "org.checkerframework", version.ref = "checkerFrameworkGradlePlugin" }
+checkerFramework = { id = "org.checkerframework", version.ref = "checkerFrameworkGradlePlugin" }
+autonomousDependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "autonomousDependencyAnalysis" }
+aggregateJavadoc = { id = "io.freefair.aggregate-javadoc", version.ref = "aggregateJavadoc" }
+shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
+
# Last line of libs.versions.toml File.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-24 19:54:30
|
Revision: 2875
http://sourceforge.net/p/axsl/code/2875
Author: victormote
Date: 2025-06-24 19:54:27 +0000 (Tue, 24 Jun 2025)
Log Message:
-----------
Solve gradle build JVM version complaint by adding gradle-daemon-jvm.properties.
Added Paths:
-----------
trunk/axsl/gradle/gradle-daemon-jvm.properties
Added: trunk/axsl/gradle/gradle-daemon-jvm.properties
===================================================================
--- trunk/axsl/gradle/gradle-daemon-jvm.properties (rev 0)
+++ trunk/axsl/gradle/gradle-daemon-jvm.properties 2025-06-24 19:54:27 UTC (rev 2875)
@@ -0,0 +1,2 @@
+#This file is generated by updateDaemonJvm
+toolchainVersion=17
Property changes on: trunk/axsl/gradle/gradle-daemon-jvm.properties
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-24 19:07:04
|
Revision: 2874
http://sourceforge.net/p/axsl/code/2874
Author: victormote
Date: 2025-06-24 19:07:01 +0000 (Tue, 24 Jun 2025)
Log Message:
-----------
Fix javadoc issues reported by checkstyle.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java
trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/MutableSequence.java
trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -74,7 +74,7 @@
* If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
* @return The byte array containing the font file content that is available for embedding, or null if
* {@link Font#isEmbeddable()} is false.
- * @see FontUse#getContent()
+ * @see #getContent()
*/
ByteSequence getContentPostScriptHex();
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -101,7 +101,7 @@
* Set this to null to signal that the writing system needs no further consideration during font selection.
* @return The best-fitting {@link FontUse} instance associated with the descriptive input, or null if none is
* found using the given criteria.
- * @see #selectFontFallback(int)
+ * @see #selectFontFallback(Script)
* @see #selectFontFallback()
* @see <a href="https://www.w3.org/TR/CSS2/fonts.html#algorithm">The CSS2 Font Matching Algorithm</a>
*/
@@ -115,7 +115,7 @@
* a font, and continue processing.
* @param script The script for which a font is needed.
* @return A {@link FontUse} instance that generally supports {@code script}, or null if none is found.
- * @see #selectFont(FontSelectionStrategy, List, FontStyle, FontWeight, FontVariant, FontStretch, int)
+ * @see #selectFont(List, FontStyle, FontVariant, FontWeight, FontStretch, int, WritingSystem)
* @see #selectFontFallback()
*/
FontUse selectFontFallback(Script script);
@@ -130,8 +130,8 @@
* Implementations may allow the user to configure the fallback font, but are required to return a font from this
* method regardless.
* @return A {@link FontUse} instance, any instance.
- * @see #selectFont(FontSelectionStrategy, List, FontStyle, FontWeight, FontVariant, FontStretch, int)
- * @see #selectFontFallback(int)
+ * @see #selectFont(List, FontStyle, FontVariant, FontWeight, FontStretch, int, WritingSystem)
+ * @see #selectFontFallback(Script)
*/
FontUse selectFontFallback();
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUtility.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -49,15 +49,15 @@
/**
* Converts a CSS2-style String input for font-family into a value expected by
- * {@link FontConsumer#selectFontCss(List, org.axsl.value.FontStyle, org.axsl.value.FontWeight,
- * org.axsl.value.FontVariant, org.axsl.value.FontStretch, int, int)}.
+ * {@link FontConsumer#selectFont(List, org.axsl.value.FontStyle, org.axsl.value.FontVariant,
+ * org.axsl.value.FontWeight, org.axsl.value.FontStretch, int, org.axsl.i18n.WritingSystem)}.
* @param input The CSS2-style font-family String to be converted.
* This is a comma-delimited String containing one or more potential font-family items to be selected.
* Consult the CSS2 standard for details.
* @return A String array with the parsed font-family items in it.
* This method never returns "null", but may return an array with zero elements for invalid input.
- * @see FontConsumer#selectFontCss(List, org.axsl.value.FontStyle, org.axsl.value.FontWeight,
- * org.axsl.value.FontVariant, org.axsl.value.FontStretch, int, int)
+ * @see FontConsumer#selectFont(List, org.axsl.value.FontStyle, org.axsl.value.FontVariant,
+ * org.axsl.value.FontWeight, org.axsl.value.FontStretch, int, org.axsl.i18n.WritingSystem)
* @see #foFontFamily(CharSequence)
*/
public static List<String> cssFontFamily(final CharSequence input) {
Modified: trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java
===================================================================
--- trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-graphic/src/main/java/org/axsl/graphic/Graphic.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -112,8 +112,8 @@
* This format is described in Section 4.8.3 of the "PDF Reference, 5th Edition."
* Briefly, the pixels or samples are ordered from left-to-right, and from top-to-bottom, with the first row read
* entirely, then the second row, etc.
- * The {@link #getColorSpace()} and the {@link #getBitsPerComponent()} indicate the number of channels, order of the
- * channels, and number of bits that are used to describe each image sample.
+ * The {@link #getColorSpace()} and the {@link BitmapGraphic#getBitsPerComponent()} indicate the number of channels,
+ * order of the channels, and number of bits that are used to describe each image sample.
* @return The graphic content.
* Graphics that contain only vector data (no image samples) return null.
* @throws GraphicException For errors during parsing of the graphic content.
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -692,7 +692,7 @@
* The result is a positive integer if this {@code ByteSequencePlus} object lexicographically follows the argument
* object.
* The result is zero if the sequences are equal; {@code compareTo} returns {@code 0} exactly when the
- * {@link #equals(Object)} method would return {@code true}.</p>
+ * {@link Object#equals(Object)} method would return {@code true}.</p>
*
* <p>If the two sequences are different, then either they have different characters at some index that is a valid
* index for both sequences, or their lengths are different, or both.
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/MutableSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/MutableSequence.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/MutableSequence.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -50,7 +50,7 @@
/**
* Returns the current capacity.
* The capacity is the total size, in elements, of the internal buffer.
- * Any excess of it over {@link #length()} is available for newly inserted elements.
+ * Any excess of it over the length of the sequence is available for newly inserted elements.
* Adding elements beyond the capacity will result in an allocation.
* @return The current capacity.
* @see java.lang.StringBuilder#capacity()
Modified: trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java
===================================================================
--- trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java 2025-06-24 16:11:06 UTC (rev 2873)
+++ trunk/axsl/axsl-ps/src/main/java/org/axsl/ps/Encoding.java 2025-06-24 19:07:01 UTC (rev 2874)
@@ -24,7 +24,7 @@
package org.axsl.ps;
/**
- * Superinterface for all character-to-glyph-index encoding schemes, including {@link EncodingVector} and {@link Cmap}.
+ * Superinterface for all character-to-glyph-index encoding schemes, including {@link EncodingVector} and Cmaps.
*/
public interface Encoding {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-24 16:11:09
|
Revision: 2873
http://sourceforge.net/p/axsl/code/2873
Author: victormote
Date: 2025-06-24 16:11:06 +0000 (Tue, 24 Jun 2025)
Log Message:
-----------
Move remaining checkerframework configuration from common-conventions to the root project.
Modified Paths:
--------------
trunk/axsl/build.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/build.gradle
===================================================================
--- trunk/axsl/build.gradle 2025-06-24 13:47:14 UTC (rev 2872)
+++ trunk/axsl/build.gradle 2025-06-24 16:11:06 UTC (rev 2873)
@@ -30,13 +30,7 @@
id 'io.freefair.aggregate-javadoc' version "6.5.1"
id 'java-library-distribution'
id 'com.github.johnrengelman.shadow' version '8.1.1'
- /* The Gradle Checker Framework Plugin (being invoked here) is a wrapper of, but is a separate product from, the
- Checker Framework, has its own release cycle, and its own release numbering system.
- https://github.com/kelloggm/checkerframework-gradle-plugin
- Documentation of the Checker Framework itself can be found at
- https://checkerframework.org/manual/#gradle
- */
- id "org.checkerframework" version "0.6.53"
+ alias(libs.plugins.checkerframework)
}
@@ -181,4 +175,21 @@
}
+checkerFramework {
+ checkers = [
+ "org.checkerframework.checker.signedness.SignednessChecker"
+ ]
+
+ /* Uncomment the following line temporarily to disable checker, for testing. */
+ /* Must be disabled for now, until we can resolve the build failure with it on. */
+ skipCheckerFramework = true
+
+ /* The following may be needed to avoid ClassCastException in Gradle. See
+ https://github.com/kelloggm/checkerframework-gradle-plugin?tab=readme-ov-file#incremental-compilation
+ Setting it did not help the build problem documented at "skipCheckerFramework" above.
+ Since we have disabled the entire framework, we leave this commented for now. */
+// incrementalize = false
+}
+
+
/* Last line of script. */
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-24 13:47:14 UTC (rev 2872)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-24 16:11:06 UTC (rev 2873)
@@ -3,7 +3,6 @@
plugins {
id 'java'
- id "org.checkerframework"
}
@@ -27,20 +26,4 @@
}
}
-checkerFramework {
- checkers = [
- "org.checkerframework.checker.signedness.SignednessChecker"
- ]
-
- /* Uncomment the following line temporarily to disable checker, for testing. */
- /* Must be disabled for now, until we can resolve the build failure with it on. */
- skipCheckerFramework = true
-
- /* The following may be needed to avoid ClassCastException in Gradle. See
- https://github.com/kelloggm/checkerframework-gradle-plugin?tab=readme-ov-file#incremental-compilation
- Setting it did not help the build problem documented at "skipCheckerFramework" above.
- Since we have disabled the entire framework, we leave this commented for now. */
-// incrementalize = false
-}
-
/* Last line of script. */
Modified: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml 2025-06-24 13:47:14 UTC (rev 2872)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-24 16:11:06 UTC (rev 2873)
@@ -4,15 +4,16 @@
# ******************** See Note 1 below for information about dependency releases. ********************
-svgDom = "1.1"
-mathMlDom = "2.0"
+svgDom = "1.1"
+mathMlDom = "2.0"
-checkerFramework = "3.49.2" # Latest is 3.49.2 as of 2025-04-20.
-junit = "5.13.1" # Latest is 5.13.1 as of 2025-06-15.
-mockito = "4.11.0" # Latest is 5.18.0 as of 2025-06-04. See Note 3.
+checkerFramework = "3.49.2" # Latest is 3.49.2 as of 2025-04-20. See Note 4.
+checkerFrameworkGradlePlugin = "0.6.55" # Latest is 0.6.55 as of 2025-06-24. See Note 4.
+junit = "5.13.1" # Latest is 5.13.1 as of 2025-06-15.
+mockito = "4.11.0" # Latest is 5.18.0 as of 2025-06-04. See Note 3.
# Build-time-only dependencies that should never be permanently used in build.gradle files.
-checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
+checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
# Notes on Dependency Releases (See above for references)
@@ -22,8 +23,15 @@
#
# 2. The current (as of 2025-06-11) Eclipse plugin for checkstyle uses Checkstyle 10.23.
# We will use that for now to avoid configuration conflicts between the two versions.
-#
+#
# 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
+#
+# 4. The version of the Checker Framework is irrelevant to us.
+# Instead, we use the Gradle Checker Framework Plugin which is a wrapper of, but a separate product from, the
+# Checker Framework, having its own release cycle, and its own release numbering system.
+# https://github.com/kelloggm/checkerframework-gradle-plugin
+# Documentation of the Checker Framework itself can be found at
+# https://checkerframework.org/manual/#gradle
@@ -31,6 +39,7 @@
+
[libraries]
svg-lib = { group = "org.axsl.org.w3c.dom.svg", name = "svg-dom-java", version.ref = "svgDom" }
mathml-lib = { group = "org.axsl.org.w3c.dom.mathml", name = "mathml-dom-java", version.ref = "mathMlDom" }
@@ -46,4 +55,7 @@
+[plugins]
+checkerframework = { id = "org.checkerframework", version.ref = "checkerFrameworkGradlePlugin" }
+
# Last line of libs.versions.toml File.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-24 13:47:16
|
Revision: 2872
http://sourceforge.net/p/axsl/code/2872
Author: victormote
Date: 2025-06-24 13:47:14 +0000 (Tue, 24 Jun 2025)
Log Message:
-----------
Move some dependency configuration to libs.versions.toml.
Modified Paths:
--------------
trunk/axsl/axsl-graphic/build.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
Added Paths:
-----------
trunk/axsl/gradle/libs.versions.toml
Modified: trunk/axsl/axsl-graphic/build.gradle
===================================================================
--- trunk/axsl/axsl-graphic/build.gradle 2025-06-16 10:27:55 UTC (rev 2871)
+++ trunk/axsl/axsl-graphic/build.gradle 2025-06-24 13:47:14 UTC (rev 2872)
@@ -5,8 +5,8 @@
description = "axsl-graphic"
dependencies {
- implementation (group: 'org.axsl.org.w3c.dom.svg', name: 'svg-dom-java', version: versions.svgDom)
- implementation (group: 'org.axsl.org.w3c.dom.mathml', name: 'mathml-dom-java', version: versions.mathMlDom)
+ implementation libs.svg.lib
+ implementation libs.mathml.lib
implementation (project(':axsl-constants'))
implementation (project(':axsl-primitive'))
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-16 10:27:55 UTC (rev 2871)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-24 13:47:14 UTC (rev 2872)
@@ -19,37 +19,9 @@
ext.buildDate = new Date().format("yyyy-MM-dd 'at' HH:mm 'GMT'", TimeZone.getTimeZone("GMT"))
-/******************** See Note 1 below for information about dependency releases. ********************/
-ext.versions = [
- javaSourceCompatibility: JavaVersion.VERSION_1_8,
- javaTargetCompatibility: JavaVersion.VERSION_1_8,
-
- svgDom: '1.1',
- mathMlDom: '2.0',
-
- checkerFramework: '3.49.2', // Latest is 3.49.2 as of 2025-04-20.
- junit: '5.13.1', // Latest is 5.13.1 as of 2025-06-15.
- mockito: '4.11.0', // Latest is 5.18.0 as of 2025-06-04. See Note 3.
-
- /* Build-time-only dependencies that should never be permanently used in build.gradle files. */
- checkstyle: '10.23', // Latest is 10.25 as of 2025-06-11. See Note 2.
-]
-/*
- * Notes on Dependency Releases (See above for references)
- * ========================================================
- * 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
- * beta releases).
- *
- * 2. The current (as of 2025-06-11) Eclipse plugin for checkstyle uses Checkstyle 10.23.
- * We will use that for now to avoid configuration conflicts between the two versions.
- *
- * 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
- */
-
-
java {
- sourceCompatibility = versions.javaSourceCompatibility
- targetCompatibility = versions.javaTargetCompatibility
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
@@ -71,10 +43,4 @@
// incrementalize = false
}
-dependencies {
- compileOnly (group: 'org.checkerframework', name: 'checker-qual', version: versions.checkerFramework)
- testCompileOnly (group: 'org.checkerframework', name: 'checker-qual', version: versions.checkerFramework)
- checkerFramework (group: 'org.checkerframework', name: 'checker', version: versions.checkerFramework)
-}
-
/* Last line of script. */
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle 2025-06-16 10:27:55 UTC (rev 2871)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.library-conventions.gradle 2025-06-24 13:47:14 UTC (rev 2872)
@@ -24,7 +24,8 @@
checkstyle {
configFile = new File(rootProject.projectDir.absolutePath + '/axsl-00-dev/config/checkstyle/checkstyle-config.xml')
configProperties.put('axsl.root', rootProject.projectDir)
- toolVersion = versions.checkstyle
+ // TODO: Fix this direct reference to a version number
+ toolVersion = "10.23"
}
artifacts {
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-16 10:27:55 UTC (rev 2871)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-24 13:47:14 UTC (rev 2872)
@@ -5,12 +5,11 @@
}
dependencies {
- testImplementation (platform
- (group: 'org.junit', name: 'junit-bom', version: versions.junit))
- testImplementation (group: 'org.junit.jupiter', name: 'junit-jupiter')
- testRuntimeOnly (group: 'org.junit.platform', name: 'junit-platform-launcher')
+ testImplementation libs.junit.bom
+ testImplementation libs.junit.jupiter
+ testRuntimeOnly libs.junit.platform.launcher
- testImplementation (group: 'org.mockito', name: 'mockito-core', version: versions.mockito)
+ testImplementation libs.mockito
}
test {
Added: trunk/axsl/gradle/libs.versions.toml
===================================================================
--- trunk/axsl/gradle/libs.versions.toml (rev 0)
+++ trunk/axsl/gradle/libs.versions.toml 2025-06-24 13:47:14 UTC (rev 2872)
@@ -0,0 +1,49 @@
+
+
+[versions]
+
+
+# ******************** See Note 1 below for information about dependency releases. ********************
+svgDom = "1.1"
+mathMlDom = "2.0"
+
+checkerFramework = "3.49.2" # Latest is 3.49.2 as of 2025-04-20.
+junit = "5.13.1" # Latest is 5.13.1 as of 2025-06-15.
+mockito = "4.11.0" # Latest is 5.18.0 as of 2025-06-04. See Note 3.
+
+# Build-time-only dependencies that should never be permanently used in build.gradle files.
+checkstyle = "10.23" # Latest is 10.25 as of 2025-06-11. See Note 2.
+
+
+# Notes on Dependency Releases (See above for references)
+# ========================================================
+# 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
+# beta releases).
+#
+# 2. The current (as of 2025-06-11) Eclipse plugin for checkstyle uses Checkstyle 10.23.
+# We will use that for now to avoid configuration conflicts between the two versions.
+#
+# 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
+
+
+
+
+
+
+
+[libraries]
+svg-lib = { group = "org.axsl.org.w3c.dom.svg", name = "svg-dom-java", version.ref = "svgDom" }
+mathml-lib = { group = "org.axsl.org.w3c.dom.mathml", name = "mathml-dom-java", version.ref = "mathMlDom" }
+
+checker-framework = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerFramework" }
+# checkerFramework (group: 'org.checkerframework', name: 'checker', version: versions.checkerFramework)
+
+junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit" }
+junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit" }
+junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit" }
+
+mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
+
+
+
+# Last line of libs.versions.toml File.
Property changes on: trunk/axsl/gradle/libs.versions.toml
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-16 10:27:58
|
Revision: 2871
http://sourceforge.net/p/axsl/code/2871
Author: victormote
Date: 2025-06-16 10:27:55 +0000 (Mon, 16 Jun 2025)
Log Message:
-----------
Remove duplicate method easily computed downstream.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-16 09:58:28 UTC (rev 2870)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-16 10:27:55 UTC (rev 2871)
@@ -180,16 +180,6 @@
boolean glyphAvailable(int codePoint);
/**
- * Returns the PostScript name of the font.
- * If this FontUse uses the Font's internal encoding, this name should be
- * the same as the Font's PostScript name.
- * If not, this name should be a combination of the Font's PostScript name
- * and the name of the encoding.
- * @return The PostScript name of the font.
- */
- String getPostscriptName();
-
- /**
* Records the fact that a FontConsumer is using a particular character.
* This is important for subsetting.
* @param codePoint The Unicode character to be registered.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-16 09:58:36
|
Revision: 2870
http://sourceforge.net/p/axsl/code/2870
Author: victormote
Date: 2025-06-16 09:58:28 +0000 (Mon, 16 Jun 2025)
Log Message:
-----------
Move font-related methods from FontUse to Font.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-06-16 01:57:16 UTC (rev 2869)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-06-16 09:58:28 UTC (rev 2870)
@@ -30,7 +30,10 @@
import org.axsl.ps.BoundingBox;
import org.axsl.ps.Encoding;
import org.axsl.unicode.block.U0000_Basic_Latin;
+import org.axsl.value.FontStretch;
+import java.math.BigDecimal;
+
/**
* The Font interface exposes a font resource to the client application.
*/
@@ -618,4 +621,68 @@
*/
Font nextLighterFont();
+ /**
+ * Returns the percentage of the font-size that will be used to compute the faux small-caps size.
+ * @return The percentage that will be applied to the font-size to get the faux small-caps font-size, or null if
+ * small-caps should not be simulated, or {@link FontFeatureSimulation#SMALL_CAP_SIMULATION_NATIVE} if the native
+ * font metrics should be used to compute the font size.
+ */
+ BigDecimal simulateSmallCaps();
+
+ /**
+ * <p>Returns the size, in millipoints, which should be used for the intrinsically lowercase characters in this
+ * font.
+ * If the font has true small-caps glyphs or is unable to simulate small-caps, the value returned will be the same
+ * as the value passed.
+ * In other words, no scaling is implied.
+ * Only if the font is capable of simulating small-caps will the value returned be different from the value
+ * passed.</p>
+ *
+ * <p>Not all font-families have a small-caps variant, but small-caps can be simulated by the client application.
+ * To do so, 1) convert all text to uppercase characters, and 2) switch back and forth between a larger font size
+ * (for characters originally in uppercase) and a smaller font size (for characters originally in lowercase).
+ * If the requested font size is 12 points, and the lowercase characters should be scaled at 80%, then the font size
+ * to use for the lowercase characters is 9.6 points.</p>
+ *
+ * <p>Note that the simulation of small-caps is done entirely outside of the font system.
+ * As far as the font system is concerned, the same font is being used regardless of whether it is being used at the
+ * size for uppercase characters or the size for lowercase characters.
+ * All that is being reported in this method is the computation of what has been configured for the font.</p>
+ *
+ * @param fontSize The size, in millipoints, of the font at normal size.
+ * In other words, the size that will be used to create the uppercase glyphs.
+ * @return The size, in millipoints, that should be used for creating the instrinsically lowercase glyphs in this
+ * font.
+ * For a font that is capable of simulating small-caps, this value will be scaled to a percentage configured for the
+ * font.
+ */
+ int smallCapsSize(int fontSize);
+
+ /**
+ * Returns the percentage of 90 degrees that this font should be rotated clockwise to simulate oblique.
+ * A positive value skews the glyphs clockwise, and a negative value skews the glyphs counter-clockwise.
+ * Presumably values returned should be positive.
+ * @return The percentage of 90 degrees that glyphs from this font should be rotated clockwise to simulate oblique,
+ * or null if oblique should not be simulated.
+ */
+ BigDecimal simulateOblique();
+
+ /**
+ * Returns the percentage of 90 degrees that this font should be rotated counter-clockwise to simulate backslant.
+ * A positive value skews the glyphs counter-clockwise, and a negative value skews the glyphs clockwise.
+ * Presumably values returned should be positive.
+ * @return The percentage of 90 degrees that glyphs from this font should be rotated counter-clockwise to simulate
+ * backslant, or null if backslant should not be simulated.
+ */
+ BigDecimal simulateBackslant();
+
+ /**
+ * Returns the percentage by which the horizontal width of glyphs should be stretched to simulate font-stretch.
+ * Values over 100% will result in wider characters, and a values less than 100% will result in narrower characters.
+ * @param stretch The font-stretch value for which a simulation stretch percentage is being requested.
+ * @return The percentage that should be applied to the width of characters from this font for {@code stretch}, or
+ * null if the font has not been configured to simulate that stretch value.
+ */
+ BigDecimal simulateStretch(FontStretch stretch);
+
}
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-16 01:57:16 UTC (rev 2869)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-16 09:58:28 UTC (rev 2870)
@@ -27,10 +27,7 @@
import org.axsl.primitive.sequence.IntSequence;
import org.axsl.primitive.sequence.ShortSequence;
import org.axsl.ps.Encoding;
-import org.axsl.value.FontStretch;
-import java.math.BigDecimal;
-
/**
* <p>The FontUse interface exposes a font resource to the client application.
* It encapsulates a {@link Font} as it is used by a specific {@link FontConsumer}, for a specific {@link Encoding}.
@@ -183,70 +180,6 @@
boolean glyphAvailable(int codePoint);
/**
- * Returns the percentage of the font-size that will be used to compute the faux small-caps size.
- * @return The percentage that will be applied to the font-size to get the faux small-caps font-size, or null if
- * small-caps should not be simulated, or {@link FontFeatureSimulation#SMALL_CAP_SIMULATION_NATIVE} if the native
- * font metrics should be used to compute the font size.
- */
- BigDecimal simulateSmallCaps();
-
- /**
- * <p>Returns the size, in millipoints, which should be used for the intrinsically lowercase characters in this
- * font.
- * If the font has true small-caps glyphs or is unable to simulate small-caps, the value returned will be the same
- * as the value passed.
- * In other words, no scaling is implied.
- * Only if the font is capable of simulating small-caps will the value returned be different from the value
- * passed.</p>
- *
- * <p>Not all font-families have a small-caps variant, but small-caps can be simulated by the client application.
- * To do so, 1) convert all text to uppercase characters, and 2) switch back and forth between a larger font size
- * (for characters originally in uppercase) and a smaller font size (for characters originally in lowercase).
- * If the requested font size is 12 points, and the lowercase characters should be scaled at 80%, then the font size
- * to use for the lowercase characters is 9.6 points.</p>
- *
- * <p>Note that the simulation of small-caps is done entirely outside of the font system.
- * As far as the font system is concerned, the same font is being used regardless of whether it is being used at the
- * size for uppercase characters or the size for lowercase characters.
- * All that is being reported in this method is the computation of what has been configured for the font.</p>
- *
- * @param fontSize The size, in millipoints, of the font at normal size.
- * In other words, the size that will be used to create the uppercase glyphs.
- * @return The size, in millipoints, that should be used for creating the instrinsically lowercase glyphs in this
- * font.
- * For a font that is capable of simulating small-caps, this value will be scaled to a percentage configured for the
- * font.
- */
- int smallCapsSize(int fontSize);
-
- /**
- * Returns the percentage of 90 degrees that this font should be rotated clockwise to simulate oblique.
- * A positive value skews the glyphs clockwise, and a negative value skews the glyphs counter-clockwise.
- * Presumably values returned should be positive.
- * @return The percentage of 90 degrees that glyphs from this font should be rotated clockwise to simulate oblique,
- * or null if oblique should not be simulated.
- */
- BigDecimal simulateOblique();
-
- /**
- * Returns the percentage of 90 degrees that this font should be rotated counter-clockwise to simulate backslant.
- * A positive value skews the glyphs counter-clockwise, and a negative value skews the glyphs clockwise.
- * Presumably values returned should be positive.
- * @return The percentage of 90 degrees that glyphs from this font should be rotated counter-clockwise to simulate
- * backslant, or null if backslant should not be simulated.
- */
- BigDecimal simulateBackslant();
-
- /**
- * Returns the percentage by which the horizontal width of glyphs should be stretched to simulate font-stretch.
- * Values over 100% will result in wider characters, and a values less than 100% will result in narrower characters.
- * @param stretch The font-stretch value for which a simulation stretch percentage is being requested.
- * @return The percentage that should be applied to the width of characters from this font for {@code stretch}, or
- * null if the font has not been configured to simulate that stretch value.
- */
- BigDecimal simulateStretch(FontStretch stretch);
-
- /**
* Returns the PostScript name of the font.
* If this FontUse uses the Font's internal encoding, this name should be
* the same as the Font's PostScript name.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-16 01:57:20
|
Revision: 2869
http://sourceforge.net/p/axsl/code/2869
Author: victormote
Date: 2025-06-16 01:57:16 +0000 (Mon, 16 Jun 2025)
Log Message:
-----------
Move nextBolder and nextLighter methods from FontUse to Font. Add method to FontConsumer to use that Font to get a FontUse.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-06-15 20:44:09 UTC (rev 2868)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/Font.java 2025-06-16 01:57:16 UTC (rev 2869)
@@ -604,4 +604,18 @@
*/
int getFlags();
+ /**
+ * Returns the next bolder font in this font's font-family, if one exists,
+ * or null if this is the boldest font.
+ * @return Either the next bolder font, or null if there is no such font.
+ */
+ Font nextBolderFont();
+
+ /**
+ * Returns the next lighter font in this font's font-family, if one exists,
+ * or null if this is the lightest font.
+ * @return Either the next lighter font, or null if there is no such font.
+ */
+ Font nextLighterFont();
+
}
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-15 20:44:09 UTC (rev 2868)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-16 01:57:16 UTC (rev 2869)
@@ -25,6 +25,7 @@
import org.axsl.i18n.Script;
import org.axsl.i18n.WritingSystem;
+import org.axsl.ps.Encoding;
import org.axsl.value.FontSelectionStrategy;
import org.axsl.value.FontStretch;
import org.axsl.value.FontStyle;
@@ -135,6 +136,15 @@
FontUse selectFontFallback();
/**
+ * Creates a FontUse instance for an already-resolved Font.
+ * @param font The font for which a FontUse is needed.
+ * @param encoding The encoding to use for the FontUse instance.
+ * If null, the native font encoding should be used.
+ * @return A font use to be used by this consumer.
+ */
+ FontUse getFontUse(Font font, Encoding encoding);
+
+ /**
* Returns a list of the {@link ConsumerFont} instances that have been used by this FontConsumer.
* @return The list of {@link ConsumerFont} instances used by this FontConsumer.
*/
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-15 20:44:09 UTC (rev 2868)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-16 01:57:16 UTC (rev 2869)
@@ -183,20 +183,6 @@
boolean glyphAvailable(int codePoint);
/**
- * Returns the next bolder font in this font's font-family, if one exists,
- * or null if this is the boldest font.
- * @return Either the next bolder font, or null if there is no such font.
- */
- FontUse nextBolderFont();
-
- /**
- * Returns the next lighter font in this font's font-family, if one exists,
- * or null if this is the lightest font.
- * @return Either the next lighter font, or null if there is no such font.
- */
- FontUse nextLighterFont();
-
- /**
* Returns the percentage of the font-size that will be used to compute the faux small-caps size.
* @return The percentage that will be applied to the font-size to get the faux small-caps font-size, or null if
* small-caps should not be simulated, or {@link FontFeatureSimulation#SMALL_CAP_SIMULATION_NATIVE} if the native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-15 20:44:12
|
Revision: 2868
http://sourceforge.net/p/axsl/code/2868
Author: victormote
Date: 2025-06-15 20:44:09 +0000 (Sun, 15 Jun 2025)
Log Message:
-----------
Upgrade JUnit to latest version. Fix missing JUnit dependency.
Modified Paths:
--------------
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-14 20:06:45 UTC (rev 2867)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-15 20:44:09 UTC (rev 2868)
@@ -28,7 +28,7 @@
mathMlDom: '2.0',
checkerFramework: '3.49.2', // Latest is 3.49.2 as of 2025-04-20.
- junit: '5.10.2', // Latest is 5.10.2 as of 2024-05-08.
+ junit: '5.13.1', // Latest is 5.13.1 as of 2025-06-15.
mockito: '4.11.0', // Latest is 5.18.0 as of 2025-06-04. See Note 3.
/* Build-time-only dependencies that should never be permanently used in build.gradle files. */
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-14 20:06:45 UTC (rev 2867)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.test-conventions.gradle 2025-06-15 20:44:09 UTC (rev 2868)
@@ -8,6 +8,7 @@
testImplementation (platform
(group: 'org.junit', name: 'junit-bom', version: versions.junit))
testImplementation (group: 'org.junit.jupiter', name: 'junit-jupiter')
+ testRuntimeOnly (group: 'org.junit.platform', name: 'junit-platform-launcher')
testImplementation (group: 'org.mockito', name: 'mockito-core', version: versions.mockito)
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-14 20:06:47
|
Revision: 2867
http://sourceforge.net/p/axsl/code/2867
Author: victormote
Date: 2025-06-14 20:06:45 +0000 (Sat, 14 Jun 2025)
Log Message:
-----------
Roll font-content element into font.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/doc/web/dtds/0.1/en/axsl-font-config.dtd
trunk/axsl/axsl-font/config/sample-axsl-font-config.xml
Modified: trunk/axsl/axsl-00-dev/doc/web/dtds/0.1/en/axsl-font-config.dtd
===================================================================
--- trunk/axsl/axsl-00-dev/doc/web/dtds/0.1/en/axsl-font-config.dtd 2025-06-12 21:40:26 UTC (rev 2866)
+++ trunk/axsl/axsl-00-dev/doc/web/dtds/0.1/en/axsl-font-config.dtd 2025-06-14 20:06:45 UTC (rev 2867)
@@ -78,12 +78,9 @@
xml:base CDATA #IMPLIED
>
-<!ELEMENT font-family (font-content*, font+) >
+<!ELEMENT font-family (font+) >
<!ATTLIST font-family
name CDATA #REQUIRED
- simulate-small-caps CDATA #IMPLIED
- encoding CDATA #IMPLIED
- embed (all | subset | none) #IMPLIED
xml:base CDATA #IMPLIED
>
@@ -161,9 +158,11 @@
A stretch value of 80% will result in a width of 480 text space units, or
5.76 points.
+ The IMPLIED value for the "embed" attribute is "none".
+
-->
<!ATTLIST font
- content IDREF #REQUIRED
+ id ID #REQUIRED
style (normal | italic | oblique | backslant) #REQUIRED
weight (normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800
| 900) #REQUIRED
@@ -183,14 +182,6 @@
simulate-extra-expanded CDATA #IMPLIED
simulate-ultra-expanded CDATA #IMPLIED
encoding CDATA #IMPLIED
->
-
-<!ELEMENT font-content EMPTY >
-<!--
- The IMPLIED value for the "embed" attribute is "none".
--->
-<!ATTLIST font-content
- id ID #REQUIRED
system-name CDATA #IMPLIED
embed (all | subset | none) #IMPLIED
font-file CDATA #IMPLIED
Modified: trunk/axsl/axsl-font/config/sample-axsl-font-config.xml
===================================================================
--- trunk/axsl/axsl-font/config/sample-axsl-font-config.xml 2025-06-12 21:40:26 UTC (rev 2866)
+++ trunk/axsl/axsl-font/config/sample-axsl-font-config.xml 2025-06-14 20:06:45 UTC (rev 2867)
@@ -33,42 +33,28 @@
register the Base-14 fonts.
<font-group label="Base14" embed="none" xml:base="{base14-root}">
<font-family name="Base14-Helvetica" simulate-small-caps="80%" encoding="WinAnsiEncoding">
- <font-content id="Base14-Helvetica" metrics-file="Helvetica.afm"/>
- <font-content id="Base14-Helvetica-Oblique" metrics-file="Helvetica-Oblique.afm"/>
- <font-content id="Base14-Helvetica-Bold" metrics-file="Helvetica-Bold.afm"/>
- <font-content id="Base14-Helvetica-BoldOblique" metrics-file="Helvetica-BoldOblique.afm"/>
- <font content="Base14-Helvetica" style="normal" weight="normal"/>
- <font content="Base14-Helvetica-Oblique" style="oblique" weight="normal"/>
- <font content="Base14-Helvetica-Bold" style="normal" weight="bold"/>
- <font content="Base14-Helvetica-BoldOblique" style="oblique" weight="bold"/>
+ <font id="Base14-Helvetica" style="normal" weight="normal" metrics-file="Helvetica.afm"/>
+ <font id="Base14-Helvetica-Oblique" style="oblique" weight="normal" metrics-file="Helvetica-Oblique.afm"/>
+ <font id="Base14-Helvetica-Bold" style="normal" weight="bold" metrics-file="Helvetica-Bold.afm"/>
+ <font id="Base14-Helvetica-BoldOblique" style="oblique" weight="bold" metrics-file="Helvetica-BoldOblique.afm"/>
</font-family>
<font-family name="Base14-Times" simulate-small-caps="80%" encoding="WinAnsiEncoding">
- <font-content id="Base14-Times" metrics-file="Times-Roman.afm"/>
- <font-content id="Base14-Times-Italic" metrics-file="Times-Italic.afm"/>
- <font-content id="Base14-Times-Bold" metrics-file="Times-Bold.afm"/>
- <font-content id="Base14-Times-BoldItalic" metrics-file="Times-BoldItalic.afm"/>
- <font content="Base14-Times" style="normal" weight="normal"/>
- <font content="Base14-Times-Italic" style="italic" weight="normal"/>
- <font content="Base14-Times-Bold" style="normal" weight="bold"/>
- <font content="Base14-Times-BoldItalic" style="italic" weight="bold"/>
+ <font id="Base14-Times" style="normal" weight="normal" metrics-file="Times-Roman.afm"/>
+ <font id="Base14-Times-Italic" style="italic" weight="normal" metrics-file="Times-Italic.afm"/>
+ <font id="Base14-Times-Bold" style="normal" weight="bold" metrics-file="Times-Bold.afm"/>
+ <font id="Base14-Times-BoldItalic" style="italic" weight="bold" metrics-file="Times-BoldItalic.afm"/>
</font-family>
<font-family name="Base14-Courier" simulate-small-caps="80%" encoding="WinAnsiEncoding">
- <font-content id="Base14-Courier" metrics-file="Courier.afm"/>
- <font-content id="Base14-Courier-Oblique" metrics-file="Courier-Oblique.afm"/>
- <font-content id="Base14-Courier-Bold" metrics-file="Courier-Bold.afm"/>
- <font-content id="Base14-Courier-BoldOblique" metrics-file="Courier-BoldOblique.afm"/>
- <font content="Base14-Courier" style="normal" weight="normal"/>
- <font content="Base14-Courier-Oblique" style="oblique" weight="normal"/>
- <font content="Base14-Courier-Bold" style="normal" weight="bold"/>
- <font content="Base14-Courier-BoldOblique" style="oblique" weight="bold"/>
+ <font id="Base14-Courier" style="normal" weight="normal" metrics-file="Courier.afm"/>
+ <font id="Base14-Courier-Oblique" style="oblique" weight="normal" metrics-file="Courier-Oblique.afm"/>
+ <font id="Base14-Courier-Bold" style="normal" weight="bold" metrics-file="Courier-Bold.afm"/>
+ <font id="Base14-Courier-BoldOblique" style="oblique" weight="bold" metrics-file="Courier-BoldOblique.afm"/>
</font-family>
<font-family name="Base14-Symbol" simulate-small-caps="80%" encoding="InternalEncoding">
- <font-content id="Base14-Symbol" metrics-file="Symbol.afm"/>
- <font content="Base14-Symbol" style="normal" weight="normal"/>
+ <font id="Base14-Symbol" style="normal" weight="normal" metrics-file="Symbol.afm"/>
</font-family>
<font-family name="Base14-ZapfDingbats" simulate-small-caps="80%" encoding="InternalEncoding">
- <font-content id="Base14-ZapfDingbats" metrics-file="ZapfDingbats.afm"/>
- <font content="Base14-ZapfDingbats" style="normal" weight="normal"/>
+ <font id="Base14-ZapfDingbats" style="normal" weight="normal" metrics-file="ZapfDingbats.afm"/>
</font-family>
</font-group>
-->
@@ -77,38 +63,25 @@
<!-- Some standard AWT fonts. -->
<font-group label="AWT-standard">
<font-family name="AWT-sans-serif">
- <font-content id="AWT-sans-serif-plain" system-name="sansserif"/>
- <font-content id="AWT-sans-serif-italic" system-name="sansserif.italic"/>
- <font-content id="AWT-sans-serif-bold" system-name="sansserif.bold"/>
- <font-content id="AWT-sans-serif-bold-italic" system-name="sansserif.bolditalic"/>
- <font content="AWT-sans-serif-plain" style="normal" weight="normal"/>
- <font content="AWT-sans-serif-italic" style="italic" weight="normal"/>
- <font content="AWT-sans-serif-bold" style="normal" weight="bold"/>
- <font content="AWT-sans-serif-bold-italic" style="italic" weight="bold"/>
+ <font id="AWT-sans-serif-plain" style="normal" weight="normal" system-name="sansserif"/>
+ <font id="AWT-sans-serif-italic" style="italic" weight="normal" system-name="sansserif.italic"/>
+ <font id="AWT-sans-serif-bold" style="normal" weight="bold" system-name="sansserif.bold"/>
+ <font id="AWT-sans-serif-bold-italic" style="italic" weight="bold" system-name="sansserif.bolditalic"/>
</font-family>
<font-family name="AWT-serif">
- <font-content id="AWT-serif-plain" system-name="serif"/>
- <font-content id="AWT-serif-italic" system-name="serif.italic"/>
- <font-content id="AWT-serif-bold" system-name="serif.bold"/>
- <font-content id="AWT-serif-bold-italic" system-name="serif.bolditalic"/>
- <font content="AWT-serif-plain" style="normal" weight="normal"/>
- <font content="AWT-serif-italic" style="italic" weight="normal"/>
- <font content="AWT-serif-bold" style="normal" weight="bold"/>
- <font content="AWT-serif-bold-italic" style="italic" weight="bold"/>
+ <font id="AWT-serif-plain" style="normal" weight="normal" system-name="serif"/>
+ <font id="AWT-serif-italic" style="italic" weight="normal" system-name="serif.italic"/>
+ <font id="AWT-serif-bold" style="normal" weight="bold" system-name="serif.bold"/>
+ <font id="AWT-serif-bold-italic" style="italic" weight="bold" system-name="serif.bolditalic"/>
</font-family>
<font-family name="AWT-monospaced">
- <font-content id="AWT-monospaced-plain" system-name="monospaced"/>
- <font-content id="AWT-monospaced-italic" system-name="monospaced.italic"/>
- <font-content id="AWT-monospaced-bold" system-name="monospaced.bold"/>
- <font-content id="AWT-monospaced-bold-italic" system-name="monospaced.bolditalic"/>
- <font content="AWT-monospaced-plain" style="normal" weight="normal"/>
- <font content="AWT-monospaced-italic" style="italic" weight="normal"/>
- <font content="AWT-monospaced-bold" style="normal" weight="bold"/>
- <font content="AWT-monospaced-bold-italic" style="italic" weight="bold"/>
+ <font id="AWT-monospaced-plain" style="normal" weight="normal" system-name="monospaced"/>
+ <font id="AWT-monospaced-italic" style="italic" weight="normal" system-name="monospaced.italic"/>
+ <font id="AWT-monospaced-bold" style="normal" weight="bold" system-name="monospaced.bold"/>
+ <font id="AWT-monospaced-bold-italic" style="italic" weight="bold" system-name="monospaced.bolditalic"/>
</font-family>
<font-family name="AWT-unicode">
- <font-content id="AWT-unicode" system-name="Lucida Sans Unicode"/>
- <font content="AWT-unicode" style="normal" weight="normal"/>
+ <font id="AWT-unicode" style="normal" weight="normal" system-name="Lucida Sans Unicode"/>
</font-family>
</font-group>
<!-- End of standard AWT fonts. -->
@@ -122,36 +95,24 @@
<!--
<font-group label="AWT-windows">
<font-family name="Arial" simulate-small-caps="80%">
- <font-content id="Arial" system-name="Arial"/>
- <font-content id="Arial-italic" system-name="Arial Italic"/>
- <font-content id="Arial-bold" system-name="Arial Bold"/>
- <font-content id="Arial-bold-italic" system-name="Arial Bold Italic"/>
- <font content="Arial" style="normal" weight="normal"/>
- <font content="Arial-italic" style="italic" weight="normal"/>
- <font content="Arial-bold" style="normal" weight="bold"/>
- <font content="Arial-bold-italic" style="italic" weight="bold"/>
+ <font id="Arial" style="normal" weight="normal" system-name="Arial"/>
+ <font id="Arial-italic" style="italic" weight="normal" system-name="Arial Italic"/>
+ <font id="Arial-bold" style="normal" weight="bold" system-name="Arial Bold"/>
+ <font id="Arial-bold-italic" style="italic" weight="bold" system-name="Arial Bold Italic"/>
</font-family>
<font-family name="TimesNewRoman" simulate-small-caps="80%">
- <font-content id="TimesNewRoman" system-name="Times New Roman"/>
- <font-content id="TimesNewRoman-italic" system-name="Times New Roman Italic"/>
- <font-content id="TimesNewRoman-bold" system-name="Times New Roman Bold"/>
- <font-content id="TimesNewRoman-bold-italic" system-name="Times New Roman Bold Italic"/>
- <font content="TimesNewRoman" style="normal" weight="normal"/>
- <font content="TimesNewRoman-italic" style="italic" weight="normal"/>
- <font content="TimesNewRoman-bold" style="normal" weight="bold"/>
- <font content="TimesNewRoman-bold-italic" style="italic" weight="bold"/>
+ <font id="TimesNewRoman" style="normal" weight="normal" system-name="Times New Roman"/>
+ <font id="TimesNewRoman-italic" style="italic" weight="normal" system-name="Times New Roman Italic"/>
+ <font id="TimesNewRoman-bold" style="normal" weight="bold" system-name="Times New Roman Bold"/>
+ <font id="TimesNewRoman-bold-italic" style="italic" weight="bold" system-name="Times New Roman Bold Italic"/>
</font-family>
<font-family name="CourierNew" simulate-small-caps="80%">
- <font-content id="CourierNew" system-name="Courier New"/>
- <font-content id="CourierNew-italic" system-name="Courier New Italic"/>
- <font-content id="CourierNew-bold" system-name="Courier New Bold"/>
- <font-content id="CourierNew-bold-italic" system-name="Courier New Bold Italic"/>
- <font content="CourierNew" style="normal" weight="normal"/>
- <font content="CourierNew-italic" style="italic" weight="normal"/>
- <font content="CourierNew-bold" style="normal" weight="bold"/>
- <font content="CourierNew-bold-italic" style="italic" weight="bold"/>
+ <font id="CourierNew" style="normal" weight="normal" system-name="Courier New"/>
+ <font id="CourierNew-italic" style="italic" weight="normal" system-name="Courier New Italic"/>
+ <font id="CourierNew-bold" style="normal" weight="bold" system-name="Courier New Bold"/>
+ <font id="CourierNew-bold-italic" style="italic" weight="bold" system-name="Courier New Bold Italic"/>
</font-family>
</font-group>
-->
@@ -169,36 +130,24 @@
<!--
<font-group label="AWT-linux">
<font-family name="Nimbus-sans" simulate-small-caps="80%">
- <font-content id="Nimbus-sans" system-name="Nimbus Sans L Regular"/>
- <font-content id="Nimbus-sans-italic" system-name="Nimbus Sans L Regular Italic"/>
- <font-content id="Nimbus-sans-bold" system-name="Nimbus Sans L Bold"/>
- <font-content id="Nimbus-sans-bold-italic" system-name="Nimbus Sans L Bold Italic"/>
- <font content="Nimbus-sans" style="normal" weight="normal"/>
- <font content="Nimbus-sans-italic" style="italic" weight="normal"/>
- <font content="Nimbus-sans-bold" style="normal" weight="bold"/>
- <font content="Nimbus-sans-bold-italic" style="italic" weight="bold"/>
+ <font id="Nimbus-sans" style="normal" weight="normal" system-name="Nimbus Sans L Regular"/>
+ <font id="Nimbus-sans-italic" style="italic" weight="normal" system-name="Nimbus Sans L Regular Italic"/>
+ <font id="Nimbus-sans-bold" style="normal" weight="bold" system-name="Nimbus Sans L Bold"/>
+ <font id="Nimbus-sans-bold-italic" style="italic" weight="bold" system-name="Nimbus Sans L Bold Italic"/>
</font-family>
<font-family name="Nimbus-roman" simulate-small-caps="80%">
- <font-content id="Nimbus-roman" system-name="Nimbus Roman No9 L Regular"/>
- <font-content id="Nimbus-roman-italic" system-name="Nimbus Roman No9 L Regular Italic"/>
- <font-content id="Nimbus-roman-bold" system-name="Nimbus Roman No9 L Medium"/>
- <font-content id="Nimbus-roman-bold-italic" system-name="Nimbus Roman No9 L Medium Italic"/>
- <font content="Nimbus-roman" style="normal" weight="normal"/>
- <font content="Nimbus-roman-italic" style="italic" weight="normal"/>
- <font content="Nimbus-roman-bold" style="normal" weight="bold"/>
- <font content="Nimbus-roman-bold-italic" style="italic" weight="bold"/>
+ <font id="Nimbus-roman" style="normal" weight="normal" system-name="Nimbus Roman No9 L Regular"/>
+ <font id="Nimbus-roman-italic" style="italic" weight="normal" system-name="Nimbus Roman No9 L Regular Italic"/>
+ <font id="Nimbus-roman-bold" style="normal" weight="bold" system-name="Nimbus Roman No9 L Medium"/>
+ <font id="Nimbus-roman-bold-italic" style="italic" weight="bold" system-name="Nimbus Roman No9 L Medium Italic"/>
</font-family>
<font-family name="Nimbus-mono" simulate-small-caps="80%">
- <font-content id="Nimbus-mono" system-name="Nimbus Mono L Regular"/>
- <font-content id="Nimbus-mono-oblique" system-name="Nimbus Mono L Regular Oblique"/>
- <font-content id="Nimbus-mono-bold" system-name="Nimbus Mono L Bold"/>
- <font-content id="Nimbus-mono-bold-oblique" system-name="Nimbus Mono L Bold Oblique"/>
- <font content="Nimbus-mono" style="normal" weight="normal"/>
- <font content="Nimbus-mono-oblique" style="oblique" weight="normal"/>
- <font content="Nimbus-mono-bold" style="normal" weight="bold"/>
- <font content="Nimbus-mono-bold-oblique" style="oblique" weight="bold"/>
+ <font id="Nimbus-mono" style="normal" weight="normal" system-name="Nimbus Mono L Regular"/>
+ <font id="Nimbus-mono-oblique" style="oblique" weight="normal" system-name="Nimbus Mono L Regular Oblique"/>
+ <font id="Nimbus-mono-bold" style="normal" weight="bold" system-name="Nimbus Mono L Bold"/>
+ <font id="Nimbus-mono-bold-oblique" style="oblique" weight="bold" system-name="Nimbus Mono L Bold Oblique"/>
</font-family>
</font-group>
-->
@@ -208,9 +157,8 @@
<!-- Example of a TrueType font -->
<!--
<font-family name="GoudyOldStyle">
- <font-content id="GoudyOldStyle-Bitstream" embed="subset"
+ <font id="GoudyOldStyle-Bitstream" style="normal" weight="normal" simulate-small-caps="80%" embed="subset"
font-file="truetype/bitstream/10343_Goudy_Old_Style_roman/TT0107M_.TTF"/>
- <font content="GoudyOldStyle-Bitstream" style="normal" weight="normal" simulate-small-caps="80%"/>
</font-family>
-->
@@ -218,10 +166,9 @@
<!-- Example of a Type1 font using AFM metrics and PFB outlines-->
<!--
<font-family name="DomCasual-Adobe">
- <font-content id="DomCasual-Adobe" embed="subset"
+ <font id="DomCasual-Adobe" style="normal" weight="normal" embed="subset"
metrics-file="type1/adobe/091/dc______.afm"
font-file="type1/adobe/091/dc______.pfb"/>
- <font content="DomCasual-Adobe" style="normal" weight="normal"/>
</font-family>
-->
@@ -229,10 +176,9 @@
<!-- Example of a Type1 font using AFM metrics and PFA outlines-->
<!--
<font-family name="Willow-Adobe">
- <font-content id="Willow-Adobe" embed="subset"
+ <font id="Willow-Adobe" style="normal" weight="normal" embed="subset"
metrics-file="type1/test_pfa/wi______.afm"
font-file="type1/test_pfa/wi______.pfa"/>
- <font content="Willow-Adobe" style="normal" weight="normal"/>
</font-family>
-->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-12 21:40:29
|
Revision: 2866
http://sourceforge.net/p/axsl/code/2866
Author: victormote
Date: 2025-06-12 21:40:26 +0000 (Thu, 12 Jun 2025)
Log Message:
-----------
Move listing of FontUse instances from FontConsumer to ConsumerFont, to clean up the tree structure.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-12 20:17:39 UTC (rev 2865)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-12 21:40:26 UTC (rev 2866)
@@ -25,6 +25,8 @@
import org.axsl.primitive.sequence.ByteSequence;
+import java.util.List;
+
/**
* <p>A {@link Font} as used by a specific {@link FontConsumer}.
* The main responsibilities of this class are:</p>
@@ -36,18 +38,26 @@
public interface ConsumerFont {
/**
- * Return the actual Font.
+ * Return the parent {@link Font}.
* @return The actual Font.
*/
Font getFont();
/**
- * Returns the FontConsumer for whom this FontUse exists.
+ * Returns the parent {@link FontConsumer}.
* @return The FontConsumer instance attached to this FontUse.
*/
FontConsumer getFontConsumer();
/**
+ * Returns the list of child {@link FontUse} instances.
+ * This will ordinarily contain only one instance, but in the case of Type1 fonts that require multiple encodings
+ * for access to all glyphs, it may contain more.
+ * @return The list of child {@link FontUse} instances.
+ */
+ List<? extends FontUse> getUsedFontUses();
+
+ /**
* Returns the raw font file content, so that it can be embedded in other documents.
* If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
* @return The byte array containing the font file content that is available for embedding, or null if
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-12 20:17:39 UTC (rev 2865)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-12 21:40:26 UTC (rev 2866)
@@ -141,12 +141,6 @@
List<? extends ConsumerFont> getUsedFonts();
/**
- * Returns the list of the {@link FontUse} instances that have been used by this FontConsumer.
- * @return The the list of {@link FontUse} instances used by this FontConsumer.
- */
- List<? extends FontUse> getUsedFontUses();
-
- /**
* <p>Optimizes the fonts used by this FontConsumer.
* This is only useful if two passes are made at the document contents, one before running this method, the other
* after doing so.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-12 20:17:42
|
Revision: 2865
http://sourceforge.net/p/axsl/code/2865
Author: victormote
Date: 2025-06-12 20:17:39 +0000 (Thu, 12 Jun 2025)
Log Message:
-----------
Provide better information by reporting the list of ConsumerFont instances, which contain pointers to the Font.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-12 17:27:45 UTC (rev 2864)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontConsumer.java 2025-06-12 20:17:39 UTC (rev 2865)
@@ -135,10 +135,10 @@
FontUse selectFontFallback();
/**
- * Returns a list of the {@link Font} instances that have been used by this FontConsumer.
- * @return The list of {@link Font} instances used by this FontConsumer.
+ * Returns a list of the {@link ConsumerFont} instances that have been used by this FontConsumer.
+ * @return The list of {@link ConsumerFont} instances used by this FontConsumer.
*/
- List<? extends Font> getUsedFonts();
+ List<? extends ConsumerFont> getUsedFonts();
/**
* Returns the list of the {@link FontUse} instances that have been used by this FontConsumer.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-12 17:27:48
|
Revision: 2864
http://sourceforge.net/p/axsl/code/2864
Author: victormote
Date: 2025-06-12 17:27:45 +0000 (Thu, 12 Jun 2025)
Log Message:
-----------
Clarify relationships between interfaces be eliminating some shortcuts.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-12 16:41:56 UTC (rev 2863)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-12 17:27:45 UTC (rev 2864)
@@ -36,6 +36,18 @@
public interface ConsumerFont {
/**
+ * Return the actual Font.
+ * @return The actual Font.
+ */
+ Font getFont();
+
+ /**
+ * Returns the FontConsumer for whom this FontUse exists.
+ * @return The FontConsumer instance attached to this FontUse.
+ */
+ FontConsumer getFontConsumer();
+
+ /**
* Returns the raw font file content, so that it can be embedded in other documents.
* If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
* @return The byte array containing the font file content that is available for embedding, or null if
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-12 16:41:56 UTC (rev 2863)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-12 17:27:45 UTC (rev 2864)
@@ -32,27 +32,19 @@
import java.math.BigDecimal;
/**
- * The FontUse interface exposes a font resource to the client application.
- * It encapsulates a {@link Font} as it is used by a specific {@link FontConsumer}, for a specific {@link Encoding} and
- * for a specific font family.
- * It is possible for a {@link FontConsumer} to use the same {@link Font} instance in more than one way, due to more
- * than one encoding or the font being configured in more than one font family.
+ * <p>The FontUse interface exposes a font resource to the client application.
+ * It encapsulates a {@link Font} as it is used by a specific {@link FontConsumer}, for a specific {@link Encoding}.
+ * For fonts supported by smaller encodings (such as many Type1 fonts), it is possible for a {@link FontConsumer} to use
+ * the same {@link Font} instance with more than one encoding.
+ * In most other cases, there should be a one-to-one relationship between {@link FontUse} and {@link ConsumerFont}.</p>
+ *
+ * <p>It is also possible for a {@link FontConsumer} to use the same {@link Font} instance in more than one way, due to
+ * the font being configured in more than one font family.
+ * However, implementations should be able to detect this case and avoid confusion and duplications.
*/
public interface FontUse {
/**
- * Return the actual Font.
- * @return The actual Font.
- */
- Font getFont();
-
- /**
- * Returns the FontConsumer for whom this FontUse exists.
- * @return The FontConsumer instance attached to this FontUse.
- */
- FontConsumer getFontConsumer();
-
- /**
* Returns the {@link ConsumerFont} for this use.
* @return The {@link ConsumerFont} for this use.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-12 16:41:59
|
Revision: 2863
http://sourceforge.net/p/axsl/code/2863
Author: victormote
Date: 2025-06-12 16:41:56 +0000 (Thu, 12 Jun 2025)
Log Message:
-----------
Reintroduce the ConsumerFont interface, as being necessary to keep encoding-related issues separate from font-related issues.
Modified Paths:
--------------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
Added Paths:
-----------
trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
Added: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java (rev 0)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java 2025-06-12 16:41:56 UTC (rev 2863)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2025 The aXSL Project.
+ * http://www.axsl.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.axsl.font;
+
+import org.axsl.primitive.sequence.ByteSequence;
+
+/**
+ * <p>A {@link Font} as used by a specific {@link FontConsumer}.
+ * The main responsibilities of this class are:</p>
+ * <ul>
+ * <li>To supply a FontUse with the proper encoding when it is requested by a FontConsumer.</li>
+ * <li>To handle embedding and subsetting.</li>
+ * </ul>
+ */
+public interface ConsumerFont {
+
+ /**
+ * Returns the raw font file content, so that it can be embedded in other documents.
+ * If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
+ * @return The byte array containing the font file content that is available for embedding, or null if
+ * {@link Font#isEmbeddable()} is false.
+ */
+ ByteSequence getContent();
+
+ /**
+ * Returns the modified font file content, so that it can be embedded in other documents.
+ * The encrypted portion of the font file should be returned in the so-called "Hexadecimal Format" described in
+ * Section 3.1 of Adobe Technical Note #5040.
+ * This form is useful for embedding in documents that will be sent to PostScript interpreters, which must always
+ * have 7-bit ASCII input.
+ * If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
+ * @return The byte array containing the font file content that is available for embedding, or null if
+ * {@link Font#isEmbeddable()} is false.
+ * @see FontUse#getContent()
+ */
+ ByteSequence getContentPostScriptHex();
+
+ /**
+ * Return the size, in bytes, of part 1 of the font content to be embedded.
+ * For non-Type1 fonts, this is the total size of the font to be embedded.
+ * @return The size, in bytes, of part 1 of the font content to be embedded.
+ */
+ int getEmbeddableLength1();
+
+ /**
+ * Return the size, in bytes, of part 2 of the font content to be embedded.
+ * For non-Type1 fonts, this should be zero.
+ * @return The size, in bytes, of part 2 of the font content to be embedded.
+ */
+ int getEmbeddableLength2();
+
+ /**
+ * Return the size, in bytes, of part 3 of the font content to be embedded.
+ * For non-Type1 fonts, this should be zero.
+ * @return The size, in bytes, of part 3 of the font content to be embedded.
+ */
+ int getEmbeddableLength3();
+
+}
Property changes on: trunk/axsl/axsl-font/src/main/java/org/axsl/font/ConsumerFont.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java
===================================================================
--- trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-11 21:52:19 UTC (rev 2862)
+++ trunk/axsl/axsl-font/src/main/java/org/axsl/font/FontUse.java 2025-06-12 16:41:56 UTC (rev 2863)
@@ -24,7 +24,6 @@
package org.axsl.font;
import org.axsl.orthography.Orthography;
-import org.axsl.primitive.sequence.ByteSequence;
import org.axsl.primitive.sequence.IntSequence;
import org.axsl.primitive.sequence.ShortSequence;
import org.axsl.ps.Encoding;
@@ -54,6 +53,12 @@
FontConsumer getFontConsumer();
/**
+ * Returns the {@link ConsumerFont} for this use.
+ * @return The {@link ConsumerFont} for this use.
+ */
+ ConsumerFont getConsumerFont();
+
+ /**
* <p>Returns a {@link FontUse} for the next best font for a specific code point, presumably because this instance
* either has no glyph for the code point, or cannot encode the code point using the encoding for this instance.
* This method is intended to handle step 4 in the CSS2 Font Matching Algorithm, and the part of step 5 that
@@ -316,48 +321,6 @@
CharSequence getCharsUsed();
/**
- * Returns the raw font file content, so that it can be embedded in other documents.
- * If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
- * @return The byte array containing the font file content that is available for embedding, or null if
- * {@link Font#isEmbeddable()} is false.
- */
- ByteSequence getContent();
-
- /**
- * Return the size, in bytes, of part 1 of the font content to be embedded.
- * For non-Type1 fonts, this is the total size of the font to be embedded.
- * @return The size, in bytes, of part 1 of the font content to be embedded.
- */
- int getEmbeddableLength1();
-
- /**
- * Return the size, in bytes, of part 2 of the font content to be embedded.
- * For non-Type1 fonts, this should be zero.
- * @return The size, in bytes, of part 2 of the font content to be embedded.
- */
- int getEmbeddableLength2();
-
- /**
- * Return the size, in bytes, of part 3 of the font content to be embedded.
- * For non-Type1 fonts, this should be zero.
- * @return The size, in bytes, of part 3 of the font content to be embedded.
- */
- int getEmbeddableLength3();
-
- /**
- * Returns the modified font file content, so that it can be embedded in other documents.
- * The encrypted portion of the font file should be returned in the so-called "Hexadecimal Format" described in
- * Section 3.1 of Adobe Technical Note #5040.
- * This form is useful for embedding in documents that will be sent to PostScript interpreters, which must always
- * have 7-bit ASCII input.
- * If the font use is configured to be subsetted, only the subsetted portion of the font file will be returned.
- * @return The byte array containing the font file content that is available for embedding, or null if
- * {@link Font#isEmbeddable()} is false.
- * @see FontUse#getContent()
- */
- ByteSequence getContentPostScriptHex();
-
- /**
* Converts a String to the content that should be written into a PDF to show that String.
* @param theString The input String, that is, the text that needs to be shown in the PDF.
* @param fontOptions The font options, such as ligatures and small-caps that should be used when computing the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-11 21:52:22
|
Revision: 2862
http://sourceforge.net/p/axsl/code/2862
Author: victormote
Date: 2025-06-11 21:52:19 +0000 (Wed, 11 Jun 2025)
Log Message:
-----------
Fix checkstyle config change to JavadocVariable from 10.22.
Modified Paths:
--------------
trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
Modified: trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml
===================================================================
--- trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2025-06-11 21:35:22 UTC (rev 2861)
+++ trunk/axsl/axsl-00-dev/config/checkstyle/checkstyle-config.xml 2025-06-11 21:52:19 UTC (rev 2862)
@@ -112,7 +112,7 @@
<!-- Make sure each variable has javadoc. -->
<module name="JavadocVariable">
- <property name="scope" value="private"/>
+ <property name="accessModifiers" value="private"/>
</module>
<!-- Check the javadoc style. If there is a javadoc comment, it must be well-formed, even if it is private. -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-11 21:35:24
|
Revision: 2861
http://sourceforge.net/p/axsl/code/2861
Author: victormote
Date: 2025-06-11 21:35:22 +0000 (Wed, 11 Jun 2025)
Log Message:
-----------
Upgrade checkstyle to 10.23, to match Eclipse plugin.
Modified Paths:
--------------
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-04 19:02:53 UTC (rev 2860)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-11 21:35:22 UTC (rev 2861)
@@ -32,7 +32,7 @@
mockito: '4.11.0', // Latest is 5.18.0 as of 2025-06-04. See Note 3.
/* Build-time-only dependencies that should never be permanently used in build.gradle files. */
- checkstyle: '10.4', // Latest is 10.6 as of 2023-01-23. See Note 2.
+ checkstyle: '10.23', // Latest is 10.25 as of 2025-06-11. See Note 2.
]
/*
* Notes on Dependency Releases (See above for references)
@@ -40,7 +40,7 @@
* 1. Latest release information above is per www.mvnrepository.com, and ignores non-released artifacts (no alpha or
* beta releases).
*
- * 2. The current (as of 2023-01-23) Eclipse plugin for checkstyle uses Checkstyle 10.4.
+ * 2. The current (as of 2025-06-11) Eclipse plugin for checkstyle uses Checkstyle 10.23.
* We will use that for now to avoid configuration conflicts between the two versions.
*
* 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-04 19:03:05
|
Revision: 2860
http://sourceforge.net/p/axsl/code/2860
Author: victormote
Date: 2025-06-04 19:02:53 +0000 (Wed, 04 Jun 2025)
Log Message:
-----------
Minor doc changes.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractByteSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java
trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -55,7 +55,7 @@
/* We cannot use Arrays.equals() here, as BooleanSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractByteSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractByteSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractByteSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as ByteSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as CharSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as DoubleSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as FloatSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as IntSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as LongSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java 2025-06-04 19:02:53 UTC (rev 2860)
@@ -49,7 +49,7 @@
/* We cannot use Arrays.equals() here, as ShortSequence should not expose its immutable internal array.
* Instead, we imitate it. */
- /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ /* The Arrays.equals() logic first compares the identity of the two arrays. Although we could devise a way to do
* the same here, such a comparison should always be negative, since implementations should ensure that those
* two arrays /never/ have the same identity, to avoid mutation. */
Modified: trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle
===================================================================
--- trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-04 16:27:34 UTC (rev 2859)
+++ trunk/axsl/buildSrc/src/main/groovy/axsl.common-conventions.gradle 2025-06-04 19:02:53 UTC (rev 2860)
@@ -29,7 +29,7 @@
checkerFramework: '3.49.2', // Latest is 3.49.2 as of 2025-04-20.
junit: '5.10.2', // Latest is 5.10.2 as of 2024-05-08.
- mockito: '4.9.0', // Latest is 4.9.0 as of 2022-11-26.
+ mockito: '4.11.0', // Latest is 5.18.0 as of 2025-06-04. See Note 3.
/* Build-time-only dependencies that should never be permanently used in build.gradle files. */
checkstyle: '10.4', // Latest is 10.6 as of 2023-01-23. See Note 2.
@@ -42,6 +42,8 @@
*
* 2. The current (as of 2023-01-23) Eclipse plugin for checkstyle uses Checkstyle 10.4.
* We will use that for now to avoid configuration conflicts between the two versions.
+ *
+ * 3. Starting with 5.0.0, Mockito requires Java class file version 55.0 (Java 11).
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2025-06-04 16:27:38
|
Revision: 2859
http://sourceforge.net/p/axsl/code/2859
Author: victormote
Date: 2025-06-04 16:27:34 +0000 (Wed, 04 Jun 2025)
Log Message:
-----------
Add equals and hashCode method logic for the abstract primitive sequence classes.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractNibbleSequence.java
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractBooleanSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,62 @@
*/
public abstract class AbstractBooleanSequence extends AbstractPrimitiveSequence implements BooleanSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR_TRUE = 1231;
+
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR_FALSE = 1237;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of booleans.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof BooleanSequence)) {
+ return false;
+ }
+
+ final BooleanSequence otherSequence = (BooleanSequence) other;
+ /* We cannot use Arrays.equals() here, as BooleanSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.booleanAt(index) != otherSequence.booleanAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of booleans.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(boolean[]) here, as BooleanSequence should not expose its immutable internal
+ * array. Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final boolean element = booleanAt(index);
+ result = HASH_FACTOR * result + (element ? HASH_FACTOR_TRUE : HASH_FACTOR_FALSE);
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractCharSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,56 @@
*/
public abstract class AbstractCharSequence extends AbstractPrimitiveSequence implements CharSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of chars.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof CharSequence)) {
+ return false;
+ }
+
+ final CharSequence otherSequence = (CharSequence) other;
+ /* We cannot use Arrays.equals() here, as CharSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.charAt(index) != otherSequence.charAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of chars.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(char[]) here, as CharSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final char element = charAt(index);
+ result = HASH_FACTOR * result + element;
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractDoubleSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,58 @@
*/
public abstract class AbstractDoubleSequence extends AbstractPrimitiveSequence implements DoubleSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of doubles.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof DoubleSequence)) {
+ return false;
+ }
+
+ final DoubleSequence otherSequence = (DoubleSequence) other;
+ /* We cannot use Arrays.equals() here, as DoubleSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (Double.doubleToLongBits(this.doubleAt(index)) !=
+ Double.doubleToLongBits(otherSequence.doubleAt(index))) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of doubles.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(double[]) here, as DoubleSequence should not expose its immutable internal
+ * array. Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final double element = doubleAt(index);
+ final long bits = Double.doubleToLongBits(element);
+ result = HASH_FACTOR * result + (int) (bits ^ (bits >>> Integer.SIZE));
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractFloatSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,56 @@
*/
public abstract class AbstractFloatSequence extends AbstractPrimitiveSequence implements FloatSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of floats.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof FloatSequence)) {
+ return false;
+ }
+
+ final FloatSequence otherSequence = (FloatSequence) other;
+ /* We cannot use Arrays.equals() here, as FloatSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.floatAt(index) != otherSequence.floatAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of floats.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(float[]) here, as FloatSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final float element = floatAt(index);
+ result = HASH_FACTOR * result + Float.floatToIntBits(element);
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractIntSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,56 @@
*/
public abstract class AbstractIntSequence extends AbstractPrimitiveSequence implements IntSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of ints.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof IntSequence)) {
+ return false;
+ }
+
+ final IntSequence otherSequence = (IntSequence) other;
+ /* We cannot use Arrays.equals() here, as IntSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.intAt(index) != otherSequence.intAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of ints.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(int[]) here, as IntSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final int element = intAt(index);
+ result = HASH_FACTOR * result + element;
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractLongSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,57 @@
*/
public abstract class AbstractLongSequence extends AbstractPrimitiveSequence implements LongSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of longs.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof LongSequence)) {
+ return false;
+ }
+
+ final LongSequence otherSequence = (LongSequence) other;
+ /* We cannot use Arrays.equals() here, as LongSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.longAt(index) != otherSequence.longAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of longs.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(long[]) here, as LongSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final long element = longAt(index);
+ final int elementHash = (int) (element ^ (element >>> Integer.SIZE));
+ result = HASH_FACTOR * result + elementHash;
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractNibbleSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractNibbleSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractNibbleSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,52 @@
*/
public abstract class AbstractNibbleSequence extends AbstractPrimitiveSequence implements NibbleSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of nibbles.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof NibbleSequence)) {
+ return false;
+ }
+
+ final NibbleSequence otherSequence = (NibbleSequence) other;
+ /* This would be a good place to compare the identity of the two arrays. Although we could devise a way to do
+ * so, such a comparison should always be negative, since implementations should ensure that those two arrays
+ * /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.nibbleAt(index) != otherSequence.nibbleAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of nibbles.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We use the same logic as ByteArray#hasCode(). */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final byte element = (byte) (nibbleAt(index) & 0x0F);
+ result = HASH_FACTOR * result + element;
+ }
+ return result;
}
}
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java 2025-06-04 12:11:01 UTC (rev 2858)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/AbstractShortSequence.java 2025-06-04 16:27:34 UTC (rev 2859)
@@ -28,14 +28,56 @@
*/
public abstract class AbstractShortSequence extends AbstractPrimitiveSequence implements ShortSequence {
- @Override
+ /** A magic number used in the computation of the hash code. */
+ private static final int HASH_FACTOR = 31;
+
+ /**
+ * A reasonable implementation of {@link Object#equals(Object)}, assuming that the only content in the
+ * implementation is the sequence of shorts.
+ * @param other The object being compared for equality.
+ * @return True if and only if {@code this} is equal to {@code other}.
+ */
public boolean equals(final Object other) {
- return super.equals(other);
+ if (this == other) {
+ return true;
+ }
+ if (! (other instanceof ShortSequence)) {
+ return false;
+ }
+
+ final ShortSequence otherSequence = (ShortSequence) other;
+ /* We cannot use Arrays.equals() here, as ShortSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+
+ /* The Arrays.equals() logic first compares the identify of the two arrays. Although we could devise a way to do
+ * the same here, such a comparison should always be negative, since implementations should ensure that those
+ * two arrays /never/ have the same identity, to avoid mutation. */
+
+ if (this.length() != otherSequence.length()) {
+ return false;
+ }
+ for (int index = 0; index < this.length(); index ++) {
+ if (this.shortAt(index) != otherSequence.shortAt(index)) {
+ return false;
+ }
+ }
+ return true;
}
- @Override
+ /**
+ * A reasonable implementation of {@link Object#hashCode()}, assuming that the only content in the implementation is
+ * the sequence of shorts.
+ * @return The hash code.
+ */
public int hashCode() {
- return super.hashCode();
+ /* We cannot use Arrays#hashCode(short[]) here, as ShortSequence should not expose its immutable internal array.
+ * Instead, we imitate it. */
+ int result = 1;
+ for (int index = 0; index < length(); index ++) {
+ final short element = shortAt(index);
+ result = HASH_FACTOR * result + element;
+ }
+ return result;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|