Skip to content

Commit 4f32128

Browse files
committed
fixed CVEs in jettison by repacing it
1 parent 6ca1eed commit 4f32128

6 files changed

Lines changed: 65 additions & 2 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1+
/*
2+
* This file is part of "TweetyProject", a collection of Java libraries for
3+
* logical aspects of artificial intelligence and knowledge representation.
4+
*
5+
* TweetyProject is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Lesser General Public License version 3 as
7+
* published by the Free Software Foundation.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*
17+
* Copyright 2022 The TweetyProject Team <http://tweetyproject.org/contact/>
18+
*/
119
package org.tweetyproject.arg.bipolar.analysis;
220

21+
/**
22+
* probablisitic justification analysis
23+
* @author Matthias Thimm
24+
*
25+
*/
326
public interface ProbabilisticJustificationAnalysis {
427
}

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/examples/AFLearnerExample.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
* @author Lars Bengel
3434
*/
3535
public class AFLearnerExample {
36+
/**
37+
* main method
38+
* @param args command line arguments
39+
*/
3640
public static void main(String[] args ) {
3741

3842
// create a hidden argumentation framework that we will try to learn
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.tweetyproject.logics.pl.examples;
2+
3+
import java.io.FileNotFoundException;
4+
import java.io.IOException;
5+
import org.tweetyproject.commons.ParserException;
6+
import org.tweetyproject.logics.pl.parser.PlParser;
7+
import org.tweetyproject.logics.pl.syntax.PlBeliefSet;
8+
import org.tweetyproject.logics.pl.syntax.PlFormula;
9+
import org.tweetyproject.logics.pl.syntax.Proposition;
10+
11+
public class A_sebi {
12+
public static void main(String[] args) throws FileNotFoundException, ParserException, IOException {
13+
PlParser parser = new PlParser();
14+
PlBeliefSet p = parser.parseBeliefBaseFromFile("C:\\Users\\Sebastian\\Desktop\\a.txt");
15+
PlFormula f = p.getCanonicalOrdering().get(0);
16+
Proposition a = f.getAtoms().iterator().next();
17+
Proposition a1 = new Proposition("a");
18+
System.out.println("formula: " + f.toString());
19+
System.out.println("chosen from formula: " + a.toString());
20+
System.out.println("occurence of " + a + "(chosen from formula): " + f.numberOfOccurrences(a));
21+
System.out.println("occurence of " + a1 + "(newly created): " + f.numberOfOccurrences(a1));
22+
}
23+
}

org-tweetyproject-web/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
<artifactId>delp</artifactId>
7878
<version>1.23-SNAPSHOT</version>
7979
</dependency>
80+
<dependency>
81+
<groupId>org.json</groupId>
82+
<artifactId>json</artifactId>
83+
<version>20220924</version>
84+
</dependency>
8085
</dependencies>
8186

8287

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.tweetyproject.util;
2+
3+
public class JSONObject {
4+
5+
}

org-tweetyproject-web/src/main/java/org/tweetyproject/web/services/DelpService.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import javax.ws.rs.Path;
2626
import javax.ws.rs.Produces;
2727
import javax.ws.rs.core.MediaType;
28+
import org.json.*;
2829

2930
import org.tweetyproject.arg.delp.parser.DelpParser;
3031
import org.tweetyproject.arg.delp.reasoner.DelpReasoner;
@@ -40,8 +41,10 @@
4041
import org.tweetyproject.logics.fol.syntax.Negation;
4142
import org.tweetyproject.web.TweetyServer;
4243

43-
import org.codehaus.jettison.json.JSONException;
44-
import org.codehaus.jettison.json.JSONObject;
44+
45+
46+
import org.json.JSONObject;
47+
import org.json.JSONException;
4548

4649
/**
4750
* Web service for defeasible logic programming.

0 commit comments

Comments
 (0)