Skip to content

Commit

Permalink
Hide deprecated Stopwatch constructors in Guava.
Browse files Browse the repository at this point in the history
The constructors are scheduled for deletion in Guava 17.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=60668113
  • Loading branch information
cpovirk committed Jan 31, 2014
1 parent af5afef commit fd0cbc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,21 @@ public static Stopwatch createStarted(Ticker ticker) {
* Creates (but does not start) a new stopwatch using {@link System#nanoTime}
* as its time source.
*
* @deprecated Use {@link Stopwatch#createUnstarted()} instead. This
* constructor is scheduled to be removed in Guava release 17.0.
* @deprecated Use {@link Stopwatch#createUnstarted()} instead.
*/
@Deprecated
public Stopwatch() {
Stopwatch() {
this(Ticker.systemTicker());
}

/**
* Creates (but does not start) a new stopwatch, using the specified time
* source.
*
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead. This
* constructor is scheduled to be removed in Guava release 17.0.
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead.
*/
@Deprecated
public Stopwatch(Ticker ticker) {
Stopwatch(Ticker ticker) {
this.ticker = checkNotNull(ticker, "ticker");
}

Expand Down Expand Up @@ -252,4 +250,3 @@ private static String abbreviate(TimeUnit unit) {
}
}
}

10 changes: 4 additions & 6 deletions guava/src/com/google/common/base/Stopwatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,21 @@ public static Stopwatch createStarted(Ticker ticker) {
* Creates (but does not start) a new stopwatch using {@link System#nanoTime}
* as its time source.
*
* @deprecated Use {@link Stopwatch#createUnstarted()} instead. This
* constructor is scheduled to be removed in Guava release 17.0.
* @deprecated Use {@link Stopwatch#createUnstarted()} instead.
*/
@Deprecated
public Stopwatch() {
Stopwatch() {
this(Ticker.systemTicker());
}

/**
* Creates (but does not start) a new stopwatch, using the specified time
* source.
*
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead. This
* constructor is scheduled to be removed in Guava release 17.0.
* @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead.
*/
@Deprecated
public Stopwatch(Ticker ticker) {
Stopwatch(Ticker ticker) {
this.ticker = checkNotNull(ticker, "ticker");
}

Expand Down

0 comments on commit fd0cbc2

Please sign in to comment.