Skip to content

Commit d0d4967

Browse files
committed
nit
1 parent f566354 commit d0d4967

File tree

2 files changed

+18
-94
lines changed

2 files changed

+18
-94
lines changed
Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
/*
2-
* Copyright 2010 Ning, Inc.
2+
* Copyright (c) 2018 AsyncHttpClient Project. All rights reserved.
33
*
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.
158
*
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.
1613
*/
1714
package org.asynchttpclient.oauth;
1815

@@ -43,39 +40,4 @@ public String getSecret() {
4340
public String getPercentEncodedKey() {
4441
return percentEncodedKey;
4542
}
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-
}
8143
}
Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
/*
2-
* Copyright 2010 Ning, Inc.
2+
* Copyright (c) 2017 AsyncHttpClient Project. All rights reserved.
33
*
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.
158
*
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.
1613
*/
1714
package org.asynchttpclient.oauth;
1815

@@ -45,39 +42,4 @@ public String getSecret() {
4542
public String getPercentEncodedKey() {
4643
return percentEncodedKey;
4744
}
48-
49-
@Override
50-
public String toString() {
51-
StringBuilder sb = new StringBuilder("{ key=");
52-
appendValue(sb, key);
53-
sb.append(", secret=");
54-
appendValue(sb, secret);
55-
sb.append("}");
56-
return sb.toString();
57-
}
58-
59-
private void appendValue(StringBuilder sb, String value) {
60-
if (value == null) {
61-
sb.append("null");
62-
} else {
63-
sb.append('"');
64-
sb.append(value);
65-
sb.append('"');
66-
}
67-
}
68-
69-
@Override
70-
public int hashCode() {
71-
return key.hashCode() + secret.hashCode();
72-
}
73-
74-
@Override
75-
public boolean equals(Object o) {
76-
if (o == this)
77-
return true;
78-
if (o == null || o.getClass() != getClass())
79-
return false;
80-
RequestToken other = (RequestToken) o;
81-
return key.equals(other.key) && secret.equals(other.secret);
82-
}
8345
}

0 commit comments

Comments
 (0)