Skip to content

Commit

Permalink
#252 - Polishing.
Browse files Browse the repository at this point in the history
Missing license headers or updates to those. Trailing whitespace.
  • Loading branch information
odrotbohm committed Sep 25, 2020
1 parent 7241e67 commit 681180b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.salespointframework.inventory;

import lombok.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class OrderCompletionReport implements Streamable<OrderLineCompletion> {

/**
* Creates an {@link OrderCompletionReport} representing a successful verification of the given {@link Order}.
*
*
* @param order must not be {@literal null}.
* @return will never be {@literal null}.
*/
Expand All @@ -55,7 +55,7 @@ public static OrderCompletionReport success(Order order) {

/**
* Creates an {@link OrderCompletionReport} for an {@link Order} that's marked as failed.
*
*
* @param order must not be {@literal null}.
* @return will never be {@literal null}.
*/
Expand All @@ -65,7 +65,7 @@ public static OrderCompletionReport failed(Order order) {

/**
* Creates a new {@link OrderCompletionReport} for the given {@link Order} and {@link OrderLineCompletion}s.
*
*
* @param order must not be {@literal null}.
* @param completions must not be {@literal null}.
* @return will never be {@literal null}.
Expand All @@ -76,7 +76,7 @@ public static OrderCompletionReport forCompletions(Order order, Iterable<OrderLi

/**
* Creates a new {@link OrderCompletionReport} for the given {@link Order} and {@link OrderLineCompletion}s.
*
*
* @param order must not be {@literal null}.
* @param completions must not be {@literal null}.
* @return will never be {@literal null}.
Expand All @@ -92,7 +92,7 @@ static OrderCompletionReport forCompletions(Order order, Streamable<OrderLineCom
/**
* Returns whether there report contains any errors. If {@literal true}, clients should go ahead and inspect the
* report for {@link OrderLineCompletion} (e.g. using {@link #stream()} to access the individual completions).
*
*
* @return
*/
public boolean hasErrors() {
Expand All @@ -101,7 +101,7 @@ public boolean hasErrors() {

/**
* Applies the given {@link Function} to produce an exception in case the report has errors.
*
*
* @param exception must not be {@literal null}.
* @since 7.1
*/
Expand All @@ -116,7 +116,7 @@ public OrderCompletionReport onError(Function<OrderCompletionReport, ? extends R
return this;
}

/*
/*
* (non-Javadoc)
* @see java.lang.Iterable#iterator()
*/
Expand All @@ -125,7 +125,7 @@ public Iterator<OrderLineCompletion> iterator() {
return completions.iterator();
}

/*
/*
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
Expand Down Expand Up @@ -162,7 +162,7 @@ public static OrderLineCompletion skipped(OrderLine ordeLine) {

/**
* Creates an {@link OrderLineCompletion} representing the successful completion of an {@link OrderLine}.
*
*
* @param orderLine must not be {@literal null}.
* @return
*/
Expand All @@ -172,7 +172,7 @@ public static OrderLineCompletion success(OrderLine orderLine) {

/**
* Creates an {@link OrderLineCompletion} representing an erroneous {@link OrderLine} alongside an error message.
*
*
* @param orderLine must not be {@literal null}.
* @param message must not be {@literal null}.
* @return
Expand All @@ -183,7 +183,7 @@ public static OrderLineCompletion error(OrderLine orderLine, String message) {

/**
* Returns whether the {@link OrderLineCompletion} represents a failure.
*
*
* @return
*/
public boolean isFailure() {
Expand All @@ -192,7 +192,7 @@ public boolean isFailure() {

/**
* Applies the given {@link Consumer} in case the {@link OrderLineCompletion} is successful.
*
*
* @param action must not be {@literal null}.
* @return the current {@link OrderLineCompletion}.
* @since 7.1
Expand All @@ -212,6 +212,7 @@ public OrderLineCompletion onSuccess(Consumer<OrderLine> action) {
* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {

StringBuilder builder = new StringBuilder() //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* A dedicated Spring {@link Formatter} to print and parse {@link Quantity} instances. Uses a
* {@link NumberStyleFormatter} for parsing of the amount.
*
*
* @author Oliver Gierke
* @see NumberStyleFormatter
* @since 6.4.1
Expand Down Expand Up @@ -63,7 +63,7 @@ class QuantityFormatter implements Converter<String, Quantity>, Formatter<Quanti
QUANTITY_PATTERN = Pattern.compile(builder.toString());
}

/*
/*
* (non-Javadoc)
* @see org.springframework.format.Printer#print(java.lang.Object, java.util.Locale)
*/
Expand All @@ -74,7 +74,7 @@ public String print(Quantity object, Locale locale) {
object.getMetric().getAbbreviation());
}

/*
/*
* (non-Javadoc)
* @see org.springframework.format.Parser#parse(java.lang.String, java.util.Locale)
*/
Expand Down Expand Up @@ -123,7 +123,7 @@ public Quantity convert(String source) {
/**
* Tries to create a {@link Metric} from the given source and reports invalid attempts as {@link ParseException}
* applying the given exception mapper.
*
*
* @param source the source value that symbolizes the {@link Metric}
* @param index the index at which the metric part was
* @return
Expand Down

0 comments on commit 681180b

Please sign in to comment.