Skip to content

Commit 48ee7a7

Browse files
committed
Migrate "controller" package to Kotlin
1 parent e992de1 commit 48ee7a7

15 files changed

+1946
-1923
lines changed

server/src/main/java/com/adobe/testing/s3mock/controller/package-info.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

server/src/main/kotlin/com/adobe/testing/s3mock/controller/BucketController.kt

Lines changed: 389 additions & 363 deletions
Large diffs are not rendered by default.

server/src/main/kotlin/com/adobe/testing/s3mock/controller/ChecksumModeHeaderConverter.kt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
package com.adobe.testing.s3mock.controller
1617

17-
package com.adobe.testing.s3mock.controller;
18-
19-
import com.adobe.testing.s3mock.dto.ChecksumMode;
20-
import com.adobe.testing.s3mock.util.AwsHttpHeaders;
21-
import org.jspecify.annotations.Nullable;
22-
import org.springframework.core.convert.converter.Converter;
18+
import com.adobe.testing.s3mock.dto.ChecksumMode
19+
import org.springframework.core.convert.converter.Converter
2320

2421
/**
25-
* Converts values of the {@link AwsHttpHeaders#X_AMZ_CHECKSUM_MODE} which is sent by the Amazon
22+
* Converts values of the [AwsHttpHeaders.X_AMZ_CHECKSUM_MODE] which is sent by the Amazon
2623
* client.
2724
* Example: x-amz-checksum-mode: ENABLED
28-
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">API Reference</a>
25+
* [API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
2926
*/
30-
class ChecksumModeHeaderConverter implements Converter<String, ChecksumMode> {
31-
32-
@Override
33-
@Nullable
34-
public ChecksumMode convert(String source) {
35-
return ChecksumMode.fromValue(source);
27+
open class ChecksumModeHeaderConverter : Converter<String, ChecksumMode> {
28+
override fun convert(source: String): ChecksumMode? {
29+
return ChecksumMode.fromValue(source)
3630
}
3731
}

0 commit comments

Comments
 (0)