Merge pull request #72 from onixbyte/feature/remove-devkit-core
refactor: remove `devkit-core`
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# Module `devkit-core`
|
||||
|
||||
## Introduction
|
||||
|
||||
This module serves as the basement of `JDevKit`. It provides some base exceptions that `JDevKit` might use.
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024-2025 OnixByte.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.onixbyte.devkit.core.exceptions;
|
||||
|
||||
/**
|
||||
* The {@code NotImplementedException} class is a custom runtime exception that represents a
|
||||
* situation where a particular method or functionality is not implemented or is currently
|
||||
* unavailable in the codebase.
|
||||
* <p>
|
||||
* This exception is typically thrown when developers need to indicate that a specific part of the
|
||||
* code is incomplete or requires further implementation. It serves as a placeholder to highlight
|
||||
* unfinished sections of the application during development and testing phases.
|
||||
* <p>
|
||||
* Usage Example:
|
||||
* <pre>
|
||||
* public void someMethod() {
|
||||
* // Some code...
|
||||
* throw new NotImplementedException("""
|
||||
* This feature will be implemented in a future release.""");
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @author Zihlu Wang
|
||||
* @version 1.1.0
|
||||
* @see RuntimeException
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class NotImplementedException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* Creates a new {@code NotImplementedException} with no specific error message.
|
||||
*/
|
||||
public NotImplementedException() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code NotImplementedException} with the provided error message.
|
||||
*
|
||||
* @param message the error message associated with this exception
|
||||
*/
|
||||
public NotImplementedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code NotImplementedException} with the specified error message and a cause
|
||||
* for this exception.
|
||||
*
|
||||
* @param message the error message associated with this exception
|
||||
* @param cause the cause of this exception
|
||||
*/
|
||||
public NotImplementedException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code NotImplementedException} with the specified cause.
|
||||
*
|
||||
* @param cause the cause of this exception
|
||||
*/
|
||||
public NotImplementedException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code NotImplementedException} with the specified error message, cause,
|
||||
* suppression flag, and stack trace writable flag.
|
||||
*
|
||||
* @param message the error message associated with this
|
||||
* exception
|
||||
* @param cause the cause of this exception
|
||||
* @param enableSuppression whether suppression is enabled or disabled
|
||||
* @param writableStackTrace whether the stack trace should be writable
|
||||
*/
|
||||
public NotImplementedException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2024-2025 OnixByte.
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<property name="COLOURFUL_OUTPUT"
|
||||
value="%black(%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK}) %highlight(%-5level) %black(---) %black([%10.10t]) %cyan(%-20.20logger{20}) %black(:) %msg%n"/>
|
||||
<property name="STANDARD_OUTPUT"
|
||||
value="%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK} %-5level %black(---) [%10.10t] %-20.20logger{20} : %msg%n"/>
|
||||
|
||||
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>${COLOURFUL_OUTPUT}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
</configuration>
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024-2025 OnixByte.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.onixbyte.devkit.core.exceptions;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class NotImplementationExceptionTest {
|
||||
|
||||
private final static Logger log = LoggerFactory.getLogger(NotImplementationExceptionTest.class);
|
||||
|
||||
@Test
|
||||
public void testExceptionWithEmptyConstructor() {
|
||||
try {
|
||||
throw new NotImplementedException();
|
||||
} catch (NotImplementedException e) {
|
||||
log.error("NotImplementedException: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExceptionWithStringConstructor() {
|
||||
try {
|
||||
throw new NotImplementedException("This function is not implemented yet, please contact developer for further information.");
|
||||
} catch (NotImplementedException e) {
|
||||
log.error("NotImplementedException: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -54,7 +54,6 @@ tasks.withType<Jar> {
|
||||
dependencies {
|
||||
compileOnly(libs.slf4j)
|
||||
implementation(libs.logback)
|
||||
api(project(":devkit-core"))
|
||||
testImplementation(platform(libs.junit.bom))
|
||||
testImplementation(libs.junit.jupiter)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ tasks.withType<Jar> {
|
||||
dependencies {
|
||||
compileOnly(libs.slf4j)
|
||||
implementation(libs.logback)
|
||||
api(project(":devkit-core"))
|
||||
testImplementation(platform(libs.junit.bom))
|
||||
testImplementation(libs.junit.jupiter)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ tasks.withType<Jar> {
|
||||
dependencies {
|
||||
compileOnly(libs.slf4j)
|
||||
implementation(libs.logback)
|
||||
api(project(":devkit-core"))
|
||||
testImplementation(libs.jwt.core)
|
||||
testImplementation(platform(libs.junit.bom))
|
||||
testImplementation(libs.junit.jupiter)
|
||||
|
||||
@@ -54,7 +54,6 @@ tasks.withType<Jar> {
|
||||
dependencies {
|
||||
compileOnly(libs.slf4j)
|
||||
implementation(libs.logback)
|
||||
api(project(":devkit-core"))
|
||||
testImplementation(platform(libs.junit.bom))
|
||||
testImplementation(libs.junit.jupiter)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ rootProject.name = "JDevKit"
|
||||
|
||||
include(
|
||||
"devkit-bom",
|
||||
"devkit-core",
|
||||
"devkit-utils",
|
||||
"guid",
|
||||
"key-pair-loader",
|
||||
|
||||
@@ -55,7 +55,6 @@ dependencies {
|
||||
compileOnly(libs.slf4j)
|
||||
implementation(libs.logback)
|
||||
|
||||
api(project(":devkit-core"))
|
||||
api(project(":devkit-utils"))
|
||||
api(project(":guid"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user