Skip to content

Commit

Permalink
335: Improve and fix JavaDoc
Browse files Browse the repository at this point in the history
Task-Url: #335
  • Loading branch information
keilw committed Mar 13, 2021
1 parent 243ea9d commit d85087a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/main/java/tech/units/indriya/unit/UnitDimension.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ public class UnitDimension implements Dimension, Serializable {
public static <Q extends Quantity<Q>> Dimension of(Class<Q> quantityType) {
// TODO: Track services and aggregate results (register custom types)
Unit<Q> siUnit = Units.getInstance().getUnit(quantityType);
if (siUnit == null) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Quantity type: " + quantityType + " unknown");
}
if (siUnit == null && LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Quantity type: " + quantityType + " unknown");
}
return (siUnit != null) ? siUnit.getDimension() : null;
}
Expand Down
8 changes: 3 additions & 5 deletions src/main/jdk9/tech/units/indriya/unit/UnitDimension.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ public class UnitDimension implements Dimension, Serializable {
public static <Q extends Quantity<Q>> Dimension of(Class<Q> quantityType) {
// TODO: Track services and aggregate results (register custom types)
Unit<Q> siUnit = Units.getInstance().getUnit(quantityType);
if (siUnit == null) {
if (LOGGER.isLoggable(Level.DEBUG)) {
LOGGER.log(Level.DEBUG, "Quantity type: " + quantityType + " unknown");
}
if (siUnit == null && LOGGER.isLoggable(Level.DEBUG)) {
LOGGER.log(Level.DEBUG, "Quantity type: " + quantityType + " unknown");
}
return (siUnit != null) ? siUnit.getDimension() : null;
}
Expand Down Expand Up @@ -308,4 +306,4 @@ public boolean equals(Object obj) {
public int hashCode() {
return Objects.hashCode(pseudoUnit);
}
}
}

0 comments on commit d85087a

Please sign in to comment.