Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/arXivId
Browse files Browse the repository at this point in the history
* upstream/main: (29 commits)
  Bump org.glassfish.jersey.containers:jersey-container-grizzly2-http (JabRef#12384)
  Bump src/main/resources/csl-styles from `080516e` to `6bae16d` (JabRef#12387)
  Bump src/main/resources/csl-locales from `96d704d` to `9914965` (JabRef#12386)
  Bump buildres/abbrv.jabref.org from `93a2cad` to `e74e6eb` (JabRef#12385)
  Bump org.openrewrite.rewrite from 6.29.3 to 7.0.0 (JabRef#12383)
  Bump org.glassfish.jersey.core:jersey-server from 3.1.9 to 3.1.10 (JabRef#12381)
  Bump org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2 (JabRef#12380)
  fix linux build not updated
  Refactor the isUnwantedText (JabRef#12369)
  Searching for entries with empty field (JabRef#12376)
  Downgrade Ubuntu (JabRef#12375)
  Downgrade Ubuntu
  Fix main table sorting (JabRef#12371)
  fix bib and pdf name (JabRef#12366)
  use v4 instead of master
  Update abbrv.jabref.org (JabRef#12365)
  Bump buildres/abbrv.jabref.org from `78e1b08` to `c202741` (JabRef#12363)
  Bump org.beryx.jlink from 3.1.0-rc-1 to 3.1.1 (JabRef#12362)
  Bump tech.units:indriya from 2.2.1 to 2.2.2 (JabRef#12361)
  Bump com.dlsc.gemsfx:gemsfx from 2.80.0 to 2.81.0 (JabRef#12360)
  ...

# Conflicts:
#	buildres/abbrv.jabref.org
#	src/main/resources/csl-styles
  • Loading branch information
Siedlerchr committed Jan 13, 2025
2 parents 1512d7e + b701821 commit 0308a0b
Show file tree
Hide file tree
Showing 33 changed files with 170 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
- name: Download from GitHub workflow artifacts store (macOS)
if: (steps.checksecrets.outputs.secretspresent == 'YES')
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: JabRef-macOS-arm-tbn
path: build/distribution/
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
matrix: # if you change the os version rename all other occurrences
os: [ubuntu-22.04, windows-latest, macos-13]
include:
- os: ubuntu-latest
- os: ubuntu-22.04
displayName: linux
archivePortable: tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux.tar.gz && rm -R build/distribution/JabRef
- os: windows-latest
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
submodules: 'true'
show-progress: 'false'
- name: Install pigz and cache (linux)
if: (matrix.os == 'ubuntu-latest')
if: (matrix.os == 'ubuntu-22.04')
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pigz
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"}
- name: Repack deb file for Debian
if: (matrix.os == 'ubuntu-latest') && (steps.checksecrets.outputs.secretspresent == 'YES')
if: (matrix.os == 'ubuntu-22.04') && (steps.checksecrets.outputs.secretspresent == 'YES')
shell: bash
run: |
cd build/distribution
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
# macOS: Negated condition of "Upload to GitHub workflow artifacts store (macOS)"
# Reason: We either upload the non-notarized files - or notarize the files later (and upload these later)
# needs to be on one line; multi line does not work
if: ${{ (!startsWith(github.ref, 'refs/heads/gh-readonly-queue')) && (steps.checksecrets.outputs.secretspresent == 'YES') && ((matrix.os == 'ubuntu-latest') || ((matrix.os == 'macos-13') && !((startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)))) }}
if: ${{ (!startsWith(github.ref, 'refs/heads/gh-readonly-queue')) && (steps.checksecrets.outputs.secretspresent == 'YES') && ((matrix.os == 'ubuntu-22.04') || ((matrix.os == 'macos-13') && !((startsWith(github.ref, 'refs/tags/') || inputs.notarization == true)))) }}
shell: bash
run: |
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' build/distribution/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
Expand All @@ -268,7 +268,7 @@ jobs:
compression-level: 0 # no compression
announce:
name: Comment on pull request
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [build]
if: ${{ github.event_name == 'pull_request' }}
steps:
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
- name: Download from GitHub workflow artifacts store (macOS)
if: (steps.checksecrets.outputs.secretspresent == 'YES')
uses: actions/download-artifact@master
uses: actions/download-artifact@v4
with:
name: JabRef-macOS-tbn
path: build/distribution/
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv

### Changed

- We improved the offline parsing of BibTeX data from PDF-documents. [#12278](/~https://github.com/JabRef/jabref/issues/12278)

### Fixed

- We fixed an issue where a bib file with UFF-8 charset was wrongly loaded with a different charset [forum#5369](https://discourse.jabref.org/t/jabref-5-15-opens-bib-files-with-shift-jis-encoding-instead-of-utf-8/5369/)
- We fixed an issue where new entries were inserted in the middle of the table instead of at the end. [#12371](/~https://github.com/JabRef/jabref/pull/12371)
- We fixed an issue where removing the sort from the table did not restore the original order. [#12371](/~https://github.com/JabRef/jabref/pull/12371)

### Removed

- "Web of Science" [journal abbreviation list](https://docs.jabref.org/advanced/journalabbreviations) was removed. [abbrv.jabref.org#176](/~https://github.com/JabRef/abbrv.jabref.org/issues/176)

## [6.0-alpha] – 2024-12-23

### Added
Expand Down
28 changes: 14 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {

id 'org.openjfx.javafxplugin' version '0.1.0'

id 'org.beryx.jlink' version '3.1.0-rc-1'
id 'org.beryx.jlink' version '3.1.1'

// nicer test outputs during running and completion
// Homepage: /~https://github.com/radarsh/gradle-test-logger-plugin
Expand All @@ -29,7 +29,7 @@ plugins {

id 'idea'

id 'org.openrewrite.rewrite' version '6.29.0'
id 'org.openrewrite.rewrite' version '7.0.0'

id "org.itsallcode.openfasttrace" version "3.0.1"
}
Expand Down Expand Up @@ -211,7 +211,7 @@ dependencies {

implementation 'com.fasterxml:aalto-xml:1.3.3'

implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.9'
implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.12'

implementation 'org.postgresql:postgresql:42.7.4'

Expand Down Expand Up @@ -243,8 +243,8 @@ dependencies {
exclude group: 'org.openjfx'
}
implementation 'org.fxmisc.flowless:flowless:0.7.3'
implementation 'org.fxmisc.richtext:richtextfx:0.11.3'
implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.80.0') {
implementation 'org.fxmisc.richtext:richtextfx:0.11.4'
implementation (group: 'com.dlsc.gemsfx', name: 'gemsfx', version: '2.81.0') {
exclude module: 'javax.inject' // Split package, use only jakarta.inject
exclude module: 'commons-lang3'
exclude group: 'org.apache.commons.validator'
Expand All @@ -256,7 +256,7 @@ dependencies {
exclude group: 'tech.units'
}
// Required by gemsfx
implementation 'tech.units:indriya:2.2.1'
implementation 'tech.units:indriya:2.2.2'
// Required by gemsfx and langchain4j
implementation ('com.squareup.retrofit2:retrofit:2.11.0') {
exclude group: 'com.squareup.okhttp3'
Expand All @@ -281,7 +281,7 @@ dependencies {
// route all requests to log4j to SLF4J
implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.24.3'

implementation('de.undercouch:citeproc-java:3.1.0') {
implementation('de.undercouch:citeproc-java:3.2.0') {
exclude group: 'org.antlr'
}

Expand All @@ -308,7 +308,7 @@ dependencies {
// API
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:4.0.0'
// Implementation of the API
implementation 'org.glassfish.jersey.core:jersey-server:3.1.9'
implementation 'org.glassfish.jersey.core:jersey-server:3.1.10'
// injection framework
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.9'
implementation 'org.glassfish.hk2:hk2-api:3.1.1'
Expand All @@ -317,8 +317,8 @@ dependencies {
// testImplementation 'org.glassfish.hk2:hk2-junitrunner:3.0.4'
// HTTP server
// implementation 'org.glassfish.jersey.containers:jersey-container-netty-http:3.1.1'
implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.9'
testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.9'
implementation 'org.glassfish.jersey.containers:jersey-container-grizzly2-http:3.1.10'
testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:3.1.10'
// Allow objects "magically" to be mapped to JSON using GSON
// implementation 'org.glassfish.jersey.media:jersey-media-json-gson:3.1.1'

Expand Down Expand Up @@ -358,7 +358,7 @@ dependencies {
}

implementation 'org.apache.velocity:velocity-engine-core:2.4.1'
implementation platform('ai.djl:bom:0.30.0')
implementation platform('ai.djl:bom:0.31.1')
implementation 'ai.djl:api'
implementation 'ai.djl.huggingface:tokenizers'
implementation 'ai.djl.pytorch:pytorch-model-zoo'
Expand All @@ -383,7 +383,7 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
testImplementation 'org.junit.platform:junit-platform-launcher:1.11.4'

testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.mockito:mockito-core:5.15.2'
testImplementation 'org.xmlunit:xmlunit-core:2.10.0'
testImplementation 'org.xmlunit:xmlunit-matchers:2.10.0'
testRuntimeOnly 'com.tngtech.archunit:archunit-junit5-engine:1.3.0'
Expand All @@ -396,12 +396,12 @@ dependencies {
// recommended by /~https://github.com/wiremock/wiremock/issues/2149#issuecomment-1835775954
testImplementation 'org.wiremock:wiremock-standalone:3.10.0'

checkstyle 'com.puppycrawl.tools:checkstyle:10.21.0'
checkstyle 'com.puppycrawl.tools:checkstyle:10.21.1'
// xjc needs the runtime as well for the ant task, otherwise it fails
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '3.0.2'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '3.0.2'

rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.22.0"))
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.23.2"))
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void updateItem(CitationKeyPatternsPanelItemModel item, boolean empty) {
setStyle("");
} else if (isSelected()) {
setStyle("-fx-background-color: -fx-selection-bar");
} else if (item.getEntryType().getName().equals(CitationKeyPatternsPanelViewModel.ENTRY_TYPE_DEFAULT_NAME)) {
} else if (CitationKeyPatternsPanelViewModel.ENTRY_TYPE_DEFAULT_NAME.equals(item.getEntryType().getName())) {
setStyle("-fx-background-color: -fx-default-button");
} else {
setStyle("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public class CitationKeyPatternsPanelViewModel {

if (itemOneName.equals(itemTwoName)) {
return 0;
} else if (itemOneName.equals(ENTRY_TYPE_DEFAULT_NAME)) {
} else if (ENTRY_TYPE_DEFAULT_NAME.equals(itemOneName)) {
return -1;
} else if (itemTwoName.equals(ENTRY_TYPE_DEFAULT_NAME)) {
} else if (ENTRY_TYPE_DEFAULT_NAME.equals(itemTwoName)) {
return 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static Set<ExternalFileType> fromString(String storedFileTypes) {
// Read the prefs information for file types:
String[][] vals = StringUtil.decodeStringDoubleArray(storedFileTypes);
for (String[] val : vals) {
if ((val.length == 2) && val[1].equals(FILE_TYPE_REMOVED_FLAG)) {
if ((val.length == 2) && FILE_TYPE_REMOVED_FLAG.equals(val[1])) {
// This entry indicates that a default entry type should be removed:
ExternalFileType toRemove = null;
for (ExternalFileType type : types) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public void setValues() {
if (parentNode != null) {
parentNode.getGroup()
.getIconName()
.filter(iconName -> !iconName.equals(DefaultGroupsFactory.ALL_ENTRIES_GROUP_DEFAULT_ICON))
.filter(iconName -> !DefaultGroupsFactory.ALL_ENTRIES_GROUP_DEFAULT_ICON.equals(iconName))
.ifPresent(iconProperty::setValue);
parentNode.getGroup().getColor().ifPresent(color -> colorUseProperty.setValue(true));
}
Expand Down
23 changes: 22 additions & 1 deletion src/main/java/org/jabref/gui/maintable/MainTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,28 @@ public MainTable(MainTableDataModel model,
this.setItems(model.getEntriesFilteredAndSorted());

// Enable sorting
model.getEntriesFilteredAndSorted().comparatorProperty().bind(this.comparatorProperty());
// Workaround for a JavaFX bug: https://bugs.openjdk.org/browse/JDK-8301761 (The sorting of the SortedList can become invalid)
// The default comparator of the SortedList does not consider the insertion index of entries that are equal according to the comparator.
// When two entries are equal based on the comparator, the entry that was inserted first should be considered smaller.
this.setSortPolicy(_ -> true);
model.getEntriesFilteredAndSorted().comparatorProperty().bind(
this.comparatorProperty().map(comparator -> {
if (comparator == null) {
return null;
}

return (entry1, entry2) -> {
int result = comparator.compare(entry1, entry2);
if (result != 0) {
return result;
}
// If the entries are equal according to the comparator, compare them by their index in the database.
// The comparison should ideally be based on the database index, but retrieving the index takes log(n). See {@link BibDatabase#indexOf}.
// Using the entry ID is also valid since IDs are monotonically increasing.
return entry1.getEntry().getId().compareTo(entry2.getEntry().getId());
};
})
);

// Store visual state
new PersistenceVisualStateTable(this, mainTablePreferences.getColumnPreferences()).addListeners();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void setValues() {
catalogs.addAll(WebFetchers.getSearchBasedFetchers(importFormatPreferences, importerPreferences)
.stream()
.map(SearchBasedFetcher::getName)
.filter(name -> !name.equals(CompositeSearchBasedFetcher.FETCHER_NAME))
.filter(name -> !CompositeSearchBasedFetcher.FETCHER_NAME.equals(name))
.map(name -> {
boolean enabled = importerPreferences.getCatalogs().contains(name);
return new StudyCatalogItem(name, enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ManageStudyDefinitionViewModel(ImportFormatPreferences importFormatPrefer
.map(SearchBasedFetcher::getName)
// The user wants to select specific fetchers
// The fetcher summarizing ALL fetchers can be emulated by selecting ALL fetchers (which happens rarely when doing an SLR)
.filter(name -> !name.equals(CompositeSearchBasedFetcher.FETCHER_NAME))
.filter(name -> !CompositeSearchBasedFetcher.FETCHER_NAME.equals(name))
.map(name -> {
boolean enabled = DEFAULT_SELECTION.contains(name);
return new StudyCatalogItem(name, enabled);
Expand Down Expand Up @@ -108,7 +108,7 @@ public ManageStudyDefinitionViewModel(Study study,
.map(SearchBasedFetcher::getName)
// The user wants to select specific fetchers
// The fetcher summarizing ALL fetchers can be emulated by selecting ALL fetchers (which happens rarely when doing an SLR)
.filter(name -> !name.equals(CompositeSearchBasedFetcher.FETCHER_NAME))
.filter(name -> !CompositeSearchBasedFetcher.FETCHER_NAME.equals(name))
.map(name -> {
boolean enabled = studyDatabases.contains(new StudyDatabase(name, true));
return new StudyCatalogItem(name, enabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static Map<String, String> serializeMetaData(Map<String, List<String>> s
continue;
}

boolean isSaveActions = metaItem.getKey().equals(MetaData.SAVE_ACTIONS);
boolean isSaveActions = MetaData.SAVE_ACTIONS.equals(metaItem.getKey());
// The last "MetaData.SEPARATOR_STRING" adds compatibility to JabRef v5.9 and earlier
StringJoiner joiner = new StringJoiner(MetaData.SEPARATOR_STRING, "", MetaData.SEPARATOR_STRING);
boolean lastWasSaveActionsEnablement = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/logic/exporter/XmpExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void export(BibDatabaseContext databaseContext, Path file, List<BibEntry>

// This is a distinction between writing all entries from the supplied list to a single .xmp file,
// or write every entry to a separate file.
if (file.getFileName().toString().trim().equals(XMP_SPLIT_DIRECTORY_INDICATOR)) {
if (XMP_SPLIT_DIRECTORY_INDICATOR.equals(file.getFileName().toString().trim())) {
for (BibEntry entry : entries) {
// Avoid situations, where two citation keys are null
Path entryFile;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/logic/importer/Importer.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ protected static Charset getCharset(BufferedInputStream bufferedInputStream) {
return defaultCharSet;
}

if (Arrays.stream(matches).anyMatch(charset -> "ASCII".equals(charset.getName()))) {
// if we have utf8 with 100 confidence we assume that the file is in utf8, more likely
if (Arrays.stream(matches).anyMatch(charset -> "ASCII".equals(charset.getName()) || ("UTF-8".equals(charset.getName()) && charset.getConfidence() == 100))) {
return defaultCharSet;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,6 @@ private boolean isAPSJournal(BibEntry entry, String doiAsString) {
}
String suffix = doiAsString.substring(doiAsString.lastIndexOf('/') + 1);
String organizationId = doiAsString.substring(doiAsString.indexOf('.') + 1, doiAsString.indexOf('/'));
return organizationId.equals(APS_JOURNAL_ORG_DOI_ID) && APS_SUFFIX_PATTERN.matcher(suffix).matches();
return APS_JOURNAL_ORG_DOI_ID.equals(organizationId) && APS_SUFFIX_PATTERN.matcher(suffix).matches();
}
}
Loading

0 comments on commit 0308a0b

Please sign in to comment.