Skip to content
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
6 changes: 0 additions & 6 deletions .jbang/JabLsLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@

// from jabls
//DEPS com.fasterxml.jackson.core:jackson-annotations:2.20
//DEPS tools.jackson.core:jackson-core:3.0.2
//DEPS tools.jackson.core:jackson-databind:3.0.2
//DEPS tools.jackson.dataformat:jackson-dataformat-yaml:3.0.2
//DEPS info.picocli:picocli:4.7.7
//DEPS org.apache.logging.log4j:log4j-to-slf4j:2.25.2
//DEPS org.eclipse.lsp4j:org.eclipse.lsp4j:0.24.0
//DEPS org.jabref:afterburner.fx:2.0.0
//DEPS org.slf4j:jul-to-slf4j:2.0.17
//DEPS org.slf4j:slf4j-api:2.0.17
//DEPS org.tinylog:slf4j-tinylog:2.7.0
//DEPS org.tinylog:tinylog-impl:2.7.0
//DEPS com.github.ben-manes.caffeine:caffeine:3.2.3
//DEPS org.apache.commons:commons-lang3:3.20.0

//SOURCES ../jabls/src/main/java/org/jabref/languageserver/BibtexTextDocumentService.java
//SOURCES ../jabls/src/main/java/org/jabref/languageserver/BibtexWorkspaceService.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ public DonationPreferences getDonationPreferences() {
}

donationPreferences = getDonationPreferencesFromBackingStore(DonationPreferences.getDefault());

EasyBind.listen(donationPreferences.neverShowAgainProperty(), (_, _, newValue) -> putBoolean(DONATION_NEVER_SHOW, newValue));
EasyBind.listen(donationPreferences.lastShownEpochDayProperty(), (_, _, newValue) -> putInt(DONATION_LAST_SHOWN_EPOCH_DAY, newValue.intValue()));
return donationPreferences;
Expand Down
1 change: 0 additions & 1 deletion jablib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ javaModuleTesting.whitebox(testing.suites["test"]) {
requires.add("org.xmlunit")
requires.add("org.xmlunit.matchers")


requires.add("com.tngtech.archunit")
requires.add("com.tngtech.archunit.junit5.api")
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
import com.tngtech.archunit.library.GeneralCodingRules;

import static com.tngtech.archunit.base.DescribedPredicate.not;
import static com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAnyPackage;

/**
* This class checks JabRef's shipped classes for architecture quality.
* Does not analyze test classes. Hint from <a href="https://stackoverflow.com/a/44681895/873282">StackOverflow</a>
Expand Down Expand Up @@ -57,6 +60,19 @@ public void doNotUseSwing(JavaClasses classes) {
.check(classes);
}

@ArchTest
public void doNotUseJackson2(JavaClasses classes) {
// annotations still reside in com.fasterxml package:
ArchRuleDefinition.noClasses()
.should()
.dependOnClassesThat(
resideInAnyPackage("com.fasterxml..")
// https://github.com/FasterXML/jackson-databind/blob/37b593e4836af62a267f09d2193414078df36eb0/src/test/java/tools/jackson/databind/deser/AnySetterTest.java#L7C8-L7C42
.and(not(resideInAnyPackage("com.fasterxml.jackson.annotation..")))
)
.check(classes);
}

@ArchTest
public void doNotUseAssertJ(JavaClasses classes) {
ArchRuleDefinition.noClasses().should().accessClassesThat().resideInAPackage("org.assertj..")
Expand All @@ -66,7 +82,7 @@ public void doNotUseAssertJ(JavaClasses classes) {
@ArchTest
public void doNotUseJavaAWT(JavaClasses classes) {
ArchRuleDefinition.noClasses().that().areNotAnnotatedWith(AllowedToUseAwt.class)
.should().accessClassesThat().resideInAPackage(PACKAGE_JAVA_AWT)
.should().dependOnClassesThat().resideInAPackage(PACKAGE_JAVA_AWT)
.check(classes);
}

Expand Down