Skip to content

Commit 94fb94c

Browse files
javier-godoypaodb
authored andcommitted
feat: use DEFAULT_VALUE instead of GITHUB_SOURCE
1 parent b94dab1 commit 94fb94c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/flowingcode/vaadin/addons/demo/DemoSource.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
@Target(ElementType.TYPE)
4444
public @interface DemoSource {
4545

46+
/** @deprecated. Use {@link #DEFAULT_VALUE} */
47+
@Deprecated
4648
static final String GITHUB_SOURCE = "__GITHUB__";
4749

4850
static final String DEFAULT_VALUE = "__DEFAULT__";
@@ -52,7 +54,7 @@
5254
* <p>
5355
* It is an error if both {@code value} and {@link #clazz()} are specified.
5456
*/
55-
String value() default GITHUB_SOURCE;
57+
String value() default DEFAULT_VALUE;
5658

5759
/**
5860
* The class to display, if different from the annotated class.

src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public void showRouterLayoutContent(HasElement content) {
235235
private Optional<SourceCodeTab> createSourceCodeTab(Class<?> annotatedClass, DemoSource annotation) {
236236
String demoFile;
237237
String url = annotation.value();
238-
if (url.equals(DemoSource.GITHUB_SOURCE)) {
238+
if (url.equals(DemoSource.GITHUB_SOURCE) || url.equals(DemoSource.DEFAULT_VALUE)) {
239239
String className;
240240
if (annotation.clazz() == DemoSource.class) {
241241
className = annotatedClass.getName().replace('.', '/');

0 commit comments

Comments
 (0)