|
1 | 1 | /*
|
2 |
| - * Copyright 2010 Ning, Inc. |
| 2 | + * Copyright (c) 2018 AsyncHttpClient Project. All rights reserved. |
3 | 3 | *
|
4 |
| - * This program is licensed to you under the Apache License, version 2.0 |
5 |
| - * (the "License"); you may not use this file except in compliance with the |
6 |
| - * License. You may obtain a copy of the License at: |
7 |
| - * |
8 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
9 |
| - * |
10 |
| - * Unless required by applicable law or agreed to in writing, software |
11 |
| - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
12 |
| - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
13 |
| - * License for the specific language governing permissions and limitations |
14 |
| - * under the License. |
| 4 | + * This program is licensed to you under the Apache License Version 2.0, |
| 5 | + * and you may not use this file except in compliance with the Apache License Version 2.0. |
| 6 | + * You may obtain a copy of the Apache License Version 2.0 at |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0. |
15 | 8 | *
|
| 9 | + * Unless required by applicable law or agreed to in writing, |
| 10 | + * software distributed under the Apache License Version 2.0 is distributed on an |
| 11 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. |
16 | 13 | */
|
17 | 14 | package org.asynchttpclient.oauth;
|
18 | 15 |
|
@@ -43,39 +40,4 @@ public String getSecret() {
|
43 | 40 | public String getPercentEncodedKey() {
|
44 | 41 | return percentEncodedKey;
|
45 | 42 | }
|
46 |
| - |
47 |
| - @Override |
48 |
| - public String toString() { |
49 |
| - StringBuilder sb = new StringBuilder("{Consumer key, key="); |
50 |
| - appendValue(sb, key); |
51 |
| - sb.append(", secret="); |
52 |
| - appendValue(sb, secret); |
53 |
| - sb.append("}"); |
54 |
| - return sb.toString(); |
55 |
| - } |
56 |
| - |
57 |
| - private void appendValue(StringBuilder sb, String value) { |
58 |
| - if (value == null) { |
59 |
| - sb.append("null"); |
60 |
| - } else { |
61 |
| - sb.append('"'); |
62 |
| - sb.append(value); |
63 |
| - sb.append('"'); |
64 |
| - } |
65 |
| - } |
66 |
| - |
67 |
| - @Override |
68 |
| - public int hashCode() { |
69 |
| - return key.hashCode() + secret.hashCode(); |
70 |
| - } |
71 |
| - |
72 |
| - @Override |
73 |
| - public boolean equals(Object o) { |
74 |
| - if (o == this) |
75 |
| - return true; |
76 |
| - if (o == null || o.getClass() != getClass()) |
77 |
| - return false; |
78 |
| - ConsumerKey other = (ConsumerKey) o; |
79 |
| - return key.equals(other.key) && secret.equals(other.secret); |
80 |
| - } |
81 | 43 | }
|
0 commit comments