Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
UNITSOFMEASUREMENT-35: Make RI and related libraries available to public
Browse files Browse the repository at this point in the history
Maven repositories 
Updated to 0.8-RC1
Task-Url: https://java.net/jira/browse/UNITSOFMEASUREMENT-35
  • Loading branch information
keilw committed Mar 22, 2015
1 parent 24986db commit bdff969
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<url>http://unitsofmeasurement.github.io</url>
</organization>
<description>Unit Standard (JSR 363) Reference Implementation.</description>
<version>0.8-SNAPSHOT</version>
<version>0.8-RC1</version>
<parent>
<groupId>tec.uom</groupId>
<artifactId>uom-parent</artifactId>
Expand All @@ -37,6 +37,7 @@
<!-- Build Settings -->
<!-- ======================================================= -->
<properties>
<jsr.version>${project.version}</jsr.version>
<jdkVersion>1.7</jdkVersion>
<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
<maven.compile.targetLevel>1.7</maven.compile.targetLevel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static L10nResources getBundle(String baseName, Locale targetLocale) {
L10nResources bundle = null;
// Get a list of candidate locales for which resource bundles are
// searched
List<Locale> candidateLocales = getCandidateLocales(targetLocale);
final List<Locale> candidateLocales = getCandidateLocales(targetLocale);
// Go through every candidate locale and try to instantiate a
// L10nResources using the base name and the candidate locale
for (int i = candidateLocales.size() - 1; i >= 0; i--) {
Expand All @@ -61,7 +61,7 @@ public static L10nResources getBundle(String baseName, Locale targetLocale) {
try {
// Try to instantiate a resource bundle using the name
// constructed above
Class bundleClass = Class.forName("tec.units.ri.format.internal.l10n." + bundleName); // TODO try use generics here
Class bundleClass = Class.forName(bundleName); // TODO try use generics here
bundle = (L10nResources)bundleClass.newInstance();
// Set the parent bundle for this bundle. For the base bundle
// (the one with the root locale, Locale.ROOT), the parent is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void testL10() {
public void testMapBundle() {
Locale locale = Locale.getDefault();

L10nBundle resources = L10nResources.getBundle("Resources", locale);
L10nBundle resources = L10nResources.getBundle("tec.units.ri.format.internal.l10n.Resources", locale);
assertNotNull(resources);
String text = resources.getString("title");
assertEquals("Localization example", text);
Expand All @@ -30,7 +30,7 @@ public void testMapBundle() {
public void testMapBundle_de() {
Locale locale = new Locale("de");

L10nBundle resources = L10nResources.getBundle("Resources", locale);
L10nBundle resources = L10nResources.getBundle("tec.units.ri.format.internal.l10n.Resources", locale);
assertNotNull(resources);
String text = resources.getString("text");
assertEquals("Da ist ein Text.", text);
Expand All @@ -40,7 +40,7 @@ public void testMapBundle_de() {
public void testMapBundle_fr() {
Locale locale = new Locale("fr");

L10nBundle resources = L10nResources.getBundle("Resources", locale);
L10nBundle resources = L10nResources.getBundle("tec.units.ri.format.internal.l10n.Resources", locale);
assertNotNull(resources);
String text = resources.getString("text");
assertEquals("Voici du texte.", text);
Expand Down

0 comments on commit bdff969

Please sign in to comment.