Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental Document Build Based on Git Management #657

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>5.13.2.202306221912-r</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import com.power.common.model.EnumDictionary;

import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.Collections;

Expand All @@ -38,8 +37,7 @@ public interface DictionaryValuesResolver {
* @param clazz dictionary class
* @return the dictionary
*/
@Nonnull
default <T extends EnumDictionary> Collection<T> resolve(@Nonnull Class<?> clazz) {
default <T extends EnumDictionary> Collection<T> resolve(Class<?> clazz) {
return resolve();
}

Expand All @@ -48,7 +46,6 @@ default <T extends EnumDictionary> Collection<T> resolve(@Nonnull Class<?> clazz
*
* @see #resolve(Class)
*/
@Nonnull
default <T extends EnumDictionary> Collection<T> resolve() {
return Collections.emptyList();
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/ly/doc/factory/BuildTemplateFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package com.ly.doc.factory;

import com.ly.doc.constants.FrameworkEnum;
import com.ly.doc.model.IDoc;
import com.ly.doc.template.IDocBuildTemplate;

/**
Expand All @@ -35,10 +36,10 @@ public class BuildTemplateFactory {
* @param <T> API doc type
* @return Implements of IDocBuildTemplate
*/
public static <T> IDocBuildTemplate getDocBuildTemplate(String framework) {
public static <T extends IDoc> IDocBuildTemplate<T> getDocBuildTemplate(String framework) {
String className = FrameworkEnum.getClassNameByFramework(framework);
try {
return (IDocBuildTemplate) Class.forName(className).newInstance();
return (IDocBuildTemplate<T>) Class.forName(className).newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
Expand Down
Loading
Loading