Skip to content

Storing selected preview throws java.lang.IllegalArgumentException: Value too long:  #6198

@Siedlerchr

Description

@Siedlerchr

Current dev version

  1. Go to Preferences -> Entry Preview
  2. Search American Psychological Association...
  3. Move the style to the right
  4. Select it or move it up to the top
  5. Save preferences:
  6. Exception occurs

The problem is that the maximum allowed value for the Preferences Value is:
8192 characters (MAX_VALUE_LENGTH)

Solution: I think the solution would be to store the name of the style

20:45:28.751 [JavaFX Application Thread] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[JavaFX Application Thread,5,main]
java.lang.IllegalArgumentException: Value too long: <?xml version="1.0" encoding="utf-8"?> (omitted here) 
	at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:253) ~[?:?]
	at org.jabref.preferences.JabRefPreferences.put(JabRefPreferences.java:937) ~[main/:?]
	at org.jabref.preferences.JabRefPreferences.storePreviewPreferences(JabRefPreferences.java:1441) ~[main/:?]
	at org.jabref.gui.preferences.PreviewTabViewModel.storeSettings(PreviewTabViewModel.java:203) ~[main/:?]
	at org.jabref.gui.preferences.AbstractPreferenceTabView.storeSettings(AbstractPreferenceTabView.java:30) ~[main/:?]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions