Skip to content

Commit 9029659

Browse files
committed
UNITSOFMEASUREMENT-183: getProductUnits should probably be renamed
Task-Url: https://java.net/jira/browse/UNITSOFMEASUREMENT-183
1 parent 0c16b91 commit 9029659

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

pom.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@
6767
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
6868

6969
<!-- Plugins -->
70-
<felix.version>2.5.3</felix.version>
70+
<felix.version>3.0.1</felix.version>
7171
<github.maven.version>0.12</github.maven.version>
7272
<github.global.server>github</github.global.server>
73+
<maven.resources.version>3.0.1</maven.resources.version>
74+
<maven.site.version>3.5.1</maven.site.version>
75+
<maven.jar.version>3.0.2</maven.jar.version>
7376
</properties>
7477

7578
<!-- Developers and Contributors -->
@@ -314,7 +317,7 @@
314317
<plugin>
315318
<groupId>org.apache.maven.plugins</groupId>
316319
<artifactId>maven-compiler-plugin</artifactId>
317-
<version>3.1</version>
320+
<version>3.5.1</version>
318321
<configuration>
319322
<source>${maven.compile.sourceLevel}</source>
320323
<target>${maven.compile.targetLevel}</target>
@@ -326,7 +329,7 @@
326329
<plugin>
327330
<groupId>org.jacoco</groupId>
328331
<artifactId>jacoco-maven-plugin</artifactId>
329-
<version>0.7.5.201505241946</version>
332+
<version>0.7.7.201606060606</version>
330333
<configuration>
331334
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
332335
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
@@ -373,7 +376,7 @@
373376
<plugin>
374377
<groupId>org.eluder.coveralls</groupId>
375378
<artifactId>coveralls-maven-plugin</artifactId>
376-
<version>4.1.0</version>
379+
<version>4.2.0</version>
377380
<configuration>
378381
<repoToken>${env.COVERALLS_REPO_TOKEN}</repoToken>
379382
</configuration>
@@ -383,7 +386,7 @@
383386
<plugin>
384387
<groupId>org.apache.maven.plugins</groupId>
385388
<artifactId>maven-source-plugin</artifactId>
386-
<version>2.4</version>
389+
<version>3.0.1</version>
387390
<executions>
388391
<execution>
389392
<id>attach-sources</id>
@@ -398,7 +401,7 @@
398401
<plugin>
399402
<groupId>org.apache.maven.plugins</groupId>
400403
<artifactId>maven-javadoc-plugin</artifactId>
401-
<version>2.10.2</version>
404+
<version>2.10.4</version>
402405
<executions>
403406
<execution>
404407
<id>attach-javadocs</id>
@@ -423,7 +426,7 @@
423426
<plugin>
424427
<groupId>org.apache.maven.plugins</groupId>
425428
<artifactId>maven-jar-plugin</artifactId>
426-
<version>2.6</version>
429+
<version>${maven.jar.version}</version>
427430
<configuration>
428431
<archive>
429432
<manifest>
@@ -454,7 +457,7 @@
454457
<plugin>
455458
<groupId>org.apache.maven.plugins</groupId>
456459
<artifactId>maven-resources-plugin</artifactId>
457-
<version>2.6</version>
460+
<version>${maven.resources.version}</version>
458461
<configuration>
459462
<encoding>${project.build.sourceEncoding}</encoding>
460463
</configuration>
@@ -517,7 +520,7 @@
517520
<plugin>
518521
<groupId>org.apache.maven.plugins</groupId>
519522
<artifactId>maven-site-plugin</artifactId>
520-
<version>3.4</version>
523+
<version>${maven.site.version}</version>
521524
<configuration>
522525
<locales>en</locales>
523526
<inputEncoding>${project.build.sourceEncoding}</inputEncoding>

src/main/java/javax/measure/Unit.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* @author <a href="mailto:steve@unidata.ucar.edu">Steve Emmerson</a>
6868
* @author <a href="mailto:desruisseaux@users.sourceforge.net">Martin Desruisseaux</a>
6969
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
70-
* @version 0.21, April 3, 2016
70+
* @version 0.22, June 28, 2016
7171
*
7272
* @see <a href="http://en.wikipedia.org/wiki/Units_of_measurement">Wikipedia: Units of measurement</a>
7373
*/
@@ -133,11 +133,6 @@ public interface Unit<Q extends Quantity<Q>> {
133133
*/
134134
Map<? extends Unit<?>, Integer> getBaseUnits();
135135

136-
/**
137-
* @deprecated use #getBaseUnits instead
138-
*/
139-
Map<? extends Unit<?>, Integer> getProductUnits();
140-
141136
/**
142137
* Indicates if this unit is compatible with the unit specified. Units don't need to be equals to be compatible. For example (assuming {@code ONE}
143138
* is a dimensionless unit):

src/test/java/javax/measure/test/TestUnit.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@
4444
* @author Werner Keil
4545
*/
4646
public abstract class TestUnit<Q extends Quantity<Q>> implements Unit<Q> {
47-
4847
public static final Unit<Dimensionless> ONE = new BaseUnit<Dimensionless>("one");
4948

50-
// public static final Unit<Mass> METRIC_MASS =
51-
// QuantityFactory.getInstance(Mass.class).getMetricUnit();
52-
5349
protected String symbol; // e.g. "A"
5450
protected final String name; // e.g. "Angstrom"
5551
protected double multFactor; // e.g. 1E-10
@@ -192,8 +188,4 @@ public double getMultFactor() {
192188
public String toString() {
193189
return getName();
194190
}
195-
196-
public Map getProductUnits() {
197-
throw new UnsupportedOperationException("Use getBaseUnits() instead");
198-
}
199191
}

0 commit comments

Comments
 (0)