Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347633 - units defined in NonSI cannot be accessed from outside UOMo
Summary: units defined in NonSI cannot be accessed from outside UOMo
Status: CLOSED FIXED
Alias: None
Product: UOMo
Classification: Technology
Component: Units (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P4 minor (vote)
Target Milestone: ---   Edit
Assignee: Werner Keil CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 357326
Blocks:
  Show dependency tree
 
Reported: 2011-05-30 07:20 EDT by Luca CLA
Modified: 2013-03-20 16:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca CLA 2011-05-30 07:20:22 EDT
Build Identifier: 20110218-0911

The class org.eclipse.uomo.units.NonSI and the Unit constants in it are not public (unlike the classes SI and USCustomary and their constants, in the same package).

The class header says it is an "internal collection ...", but currently, users cannot access those units in their projects.

If it is agreed that NonSI is too vague, some units should be moved to a UK specific set, and others to an SI-affine set, in which I would put units which are non-SI but whose definition is dependent on SI (e.g., kilogram-force, metric ton, angstrom).

Reproducible: Always
Comment 1 Werner Keil CLA 2013-03-19 07:32:32 EDT
The use of NonSI is disregarded.
Like all other unit systems it was moved to org.eclipse.uomo.units.impl.system.
Actually it should probably go to org.eclipse.uomo.units.internal or subpackages, which is a reserved package name for these kinds of internal types. 
OSGi usually prevents them from being used. Will explore that, otherwise it is package local in "system" and CommonUnits should instead be used to access these kinds of units.

Unlike other systems, CommonUnits is not final, and it could theoretically be extended by something like MyCommonUnits. For most other cases however, defining custom unit systems should be done by extending org.eclipse.uomo.units.AbstractSystemOfUnits.
Comment 2 Werner Keil CLA 2013-03-20 16:35:23 EDT
moved NonSI to "internal", works fine.