unitsofmeasurement/uom-systems

Outdated Indriya package in properties

keilw opened this issue · 4 comments

keilw commented

It seems at least one properties file is missing the new Indriya package, as seen in

SEVERE: Error
java.lang.ClassNotFoundException: tec.units.indriya.unit.Units
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:292)
	at tech.units.indriya.format.SymbolMap.<init>(SymbolMap.java:116)
	at tech.units.indriya.format.SymbolMap.of(SymbolMap.java:143)
	at systems.uom.ucum.format.UCUMFormat$Print.<clinit>(UCUMFormat.java:361)
	at systems.uom.ucum.format.UCUMFormat.getInstance(UCUMFormat.java:106)
	at systems.uom.ucum.format.UCUMFormatTestBase.<clinit>(UCUMFormatTestBase.java:54)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)

So, here's what happening on my system:

/uom-systems/common/src/main/java/systems/uom/common/USCustomary.java:[40,35] tech.units.indriya.function.RationalConverter is not public in tech.units.indriya.function; cannot be accessed from outside package
[ERROR] /Users/toubou91/git/uom-systems/common/src/main/java/systems/uom/common/USCustomary.java:[310,99] cannot find symbol

Apparently, that's a result of this commit.

I know, I've missed a few discussions lately, but why did we change our architecture so dramatically? Was something breaking so badly?

keilw commented

It was a result of changes by @andi-huber but they actually simplify the whole UnitConverter chain, so it makes sense. uom-systems were broken before because the codebase needed adoption to the new API compared to 1.x for example Prefix and other elements. Nothing in the architecture of the API changed, it is just an implementation detail of the RI that got simplified compared to the 1.x branch of Indriya.

keilw commented

This is pretty much a duplicate of the already ongoing changes based on #142

Great!