File tree Expand file tree Collapse file tree 6 files changed +23
-27
lines changed
eclipse/plugin/views/snyktoolview
languageserver/protocolextension/messageObjects Expand file tree Collapse file tree 6 files changed +23
-27
lines changed Original file line number Diff line number Diff line change 11# Snyk Security Changelog
22
3+ ## [ 3.2.1]
4+ ### Changes
5+ - fixed compatibility with some older Eclipse versions, by removing GSON dependency
6+
37## [ 3.2.0]
48### Changes
59- Fixed Issue Status view filters for ignored issues not hiding non-shown issues in editor (early access).
Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ Require-Bundle: org.eclipse.ui,
2424 org.eclipse.ui.editors,
2525 org.eclipse.ui.genericeditor,
2626 org.eclipse.swt,
27- org.eclipse.jface,
28- com.google.gson;bundle-version="2.11.0"
27+ org.eclipse.jface
2928Automatic-Module-Name : io.snyk.eclipse.plugin.tests
3029Bundle-ActivationPolicy : lazy
3130Bundle-ClassPath : .,
Original file line number Diff line number Diff line change 2323import org .eclipse .ui .PlatformUI ;
2424import org .eclipse .ui .handlers .IHandlerService ;
2525
26- import com .google . gson . Gson ;
26+ import com .fasterxml . jackson . databind . ObjectMapper ;
2727
2828import io .snyk .eclipse .plugin .html .BaseHtmlProvider ;
2929import io .snyk .eclipse .plugin .html .HtmlProviderFactory ;
@@ -175,10 +175,16 @@ public CompletableFuture<Void> updateBrowserContent(TreeNode node) {
175175 String errorJson = ptn .getErrorMessage ();
176176 if (errorJson != null && !errorJson .isBlank ()) {
177177 shouldShowDefaultMessage = false ;
178- var error = new Gson ().fromJson (errorJson , ErrorMessage .class );
179- String errorHtml = htmlProvider .getErrorHtml (error .error , error .path );
178+ String errorHTML ;
179+ try {
180+ ErrorMessage errorMessage = new ObjectMapper ().readValue (errorJson , ErrorMessage .class );
181+ errorHTML = htmlProvider .getErrorHtml (errorMessage .error , errorMessage .path );
182+ } catch (Exception e ) {
183+ errorHTML = htmlProvider .getErrorHtml ("Error: failed to display error" , "" );
184+ }
185+ final String errorHTMLFinal = errorHTML ;
180186 Display .getDefault ().syncExec (() -> {
181- browser .setText (errorHtml );
187+ browser .setText (errorHTMLFinal );
182188 });
183189 }
184190 }
Original file line number Diff line number Diff line change 22
33import java .util .Map ;
44
5- import com .google .gson .annotations .SerializedName ;
6-
7- public record Fix (
8- @ SerializedName ("fixId" ) String fixId ,
9- @ SerializedName ("unifiedDiffsPerFile" ) Map <String , String > unifiedDiffsPerFile ) {
5+ public record Fix (
6+ String fixId ,
7+ Map <String , String > unifiedDiffsPerFile ) {
108 // no-arg constructor is generated automatically by Java compiler
11- }
9+ }
Original file line number Diff line number Diff line change 33import java .util .ArrayList ;
44import java .util .List ;
55
6- import com .google .gson .annotations .SerializedName ;
7-
86public class FolderConfig {
97
10- @ SerializedName ("folderPath" )
118 private String folderPath ;
129
13- @ SerializedName ("baseBranch" )
1410 private String baseBranch = "" ;
1511
16- @ SerializedName ("localBranches" )
1712 private List <String > localBranches = new ArrayList <>();
1813
19- @ SerializedName ("additionalParameters" )
2014 private List <String > additionalParameters = new ArrayList <>();
21-
22- @ SerializedName ("referenceFolderPath" )
15+
2316 private String referenceFolderPath = "" ;
24-
25- @ SerializedName ("scanCommandConfig" )
17+
2618 private ScanCommandConfig scanCommandConfig ;
2719
2820 public FolderConfig (String folderPath ) {
@@ -80,4 +72,4 @@ public ScanCommandConfig getScanCommandConfig() {
8072 public void setScanCommandConfig (ScanCommandConfig scanCommandConfig ) {
8173 this .scanCommandConfig = scanCommandConfig ;
8274 }
83- }
75+ }
Original file line number Diff line number Diff line change 22
33import java .util .List ;
44
5- import com .google .gson .annotations .SerializedName ;
6-
75public class FolderConfigsParam {
86
9- @ SerializedName ("folderConfigs" )
107 private List <FolderConfig > folderConfigs ;
118
129 public FolderConfigsParam (List <FolderConfig > folderConfigs ) {
@@ -20,4 +17,4 @@ public List<FolderConfig> getFolderConfigs() {
2017 public void setFolderConfigs (List <FolderConfig > folderConfigs ) {
2118 this .folderConfigs = folderConfigs ;
2219 }
23- }
20+ }
You can’t perform that action at this time.
0 commit comments