Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions base/src/main/java/org/bitcoinj/base/exceptions/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright by 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
*
* http://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.
*/

/**
* Exceptions thrown by classes in bitcoinj base.
*/
@NullMarked
package org.bitcoinj.base.exceptions;

import org.jspecify.annotations.NullMarked;
3 changes: 3 additions & 0 deletions base/src/main/java/org/bitcoinj/base/internal/Stopwatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* limitations under the License.
*/

import org.jspecify.annotations.Nullable;

import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
Expand All @@ -33,6 +35,7 @@
*/
public class Stopwatch implements TemporalAmount {
private final Instant startTime;
@Nullable
private Instant stopTime = null;

/**
Expand Down
23 changes: 23 additions & 0 deletions base/src/main/java/org/bitcoinj/base/internal/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright by 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
*
* http://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.
*/

/**
* Classes for internal use only (in both {@code bitcoinj-base} and {@code bitcoinj-core}.)
*/
@NullMarked
package org.bitcoinj.base.internal;

import org.jspecify.annotations.NullMarked;
3 changes: 3 additions & 0 deletions base/src/main/java/org/bitcoinj/base/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
* The {@code base} package provides foundational types for <b>bitcoinj</b>. This package
* has no dependencies other than {@code slf4j-api} and {@code jspecify}.
*/
@NullMarked
package org.bitcoinj.base;

import org.jspecify.annotations.NullMarked;
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.bitcoinj.base.Coin;
import org.bitcoinj.base.Monetary;
import org.jspecify.annotations.Nullable;

import java.math.BigDecimal;
import java.math.RoundingMode;
Expand Down Expand Up @@ -78,10 +79,10 @@ public final class MonetaryFormat {
private final char zeroDigit;
private final char decimalMark;
private final int minDecimals;
private final List<Integer> decimalGroups;
private final @Nullable List<Integer> decimalGroups;
private final int shift;
private final RoundingMode roundingMode;
private final String[] codes;
private final String @Nullable[] codes;
private final char codeSeparator;
private final boolean codePrefixed;

Expand Down Expand Up @@ -342,7 +343,7 @@ public MonetaryFormat(boolean useSymbol) {
}

private MonetaryFormat(char negativeSign, char positiveSign, char zeroDigit, char decimalMark, int minDecimals,
List<Integer> decimalGroups, int shift, RoundingMode roundingMode, String[] codes,
@Nullable List<Integer> decimalGroups, int shift, RoundingMode roundingMode, String @Nullable[] codes,
char codeSeparator, boolean codePrefixed) {
this.negativeSign = negativeSign;
this.positiveSign = positiveSign;
Expand Down Expand Up @@ -513,6 +514,7 @@ private long parseValue(String str, int smallestUnitExponent) {
/**
* Get currency code that will be used for current shift.
*/
@Nullable
public String code() {
if (codes == null)
return null;
Expand Down
23 changes: 23 additions & 0 deletions base/src/main/java/org/bitcoinj/base/utils/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright by 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
*
* http://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.
*/

/**
* bitcoinj utility classes.
*/
@NullMarked
package org.bitcoinj.base.utils;

import org.jspecify.annotations.NullMarked;
Loading