Skip to content

Commit

Permalink
Update xstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Oct 28, 2023
1 parent 57113e9 commit 56d1d77
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/org.python.pydev.refactoring/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="contrib/ch/hsr/ukistler/astgraph/jgraph-5.8.3.1.jar"/>
<classpathentry kind="lib" path="tests/lib/xpp3-1.1.3.4.O.jar"/>
<classpathentry kind="lib" path="tests/lib/xstream-1.4.4.jar"/>
<classpathentry kind="lib" path="tests/lib/xstream-1.4.20.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Contributors:
* Fabio Zadrozny <fabiofz@gmail.com> - initial implementation
******************************************************************************/
/*
/*
* Copyright (C) 2006, 2007 Dennis Hunziker, Ueli Kistler
* Copyright (C) 2007 Reto Schuettel, Robin Stocker
*/
Expand All @@ -41,6 +41,10 @@ public void runTest() throws Throwable {

ModuleAdapterTestConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});
xstream.alias("config", ModuleAdapterTestConfig.class);

ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ private MockupConstructorFieldRequestProcessor setupRequestProcessor(MockupConst
private MockupConstructorFieldConfig initConfig() {
MockupConstructorFieldConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});
xstream.alias("config", MockupConstructorFieldConfig.class);

if (data.config.length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ private MockupGeneratePropertiesRequestProcessor setupRequestProcessor(MockupGen
private MockupGeneratePropertiesConfig initConfig() {
MockupGeneratePropertiesConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});
xstream.alias("config", MockupGeneratePropertiesConfig.class);

if (data.config.length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ private MockupOverrideMethodsRequestProcessor setupRequestProcessor(MockupOverri
private MockupOverrideMethodsConfig initConfig() {
MockupOverrideMethodsConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});
xstream.alias("config", MockupOverrideMethodsConfig.class);

if (data.config.length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ private MockupExtractMethodRequestProcessor setupRequestProcessor(MockupExtractM
private MockupExtractMethodConfig initConfig() {
MockupExtractMethodConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});
xstream.alias("config", MockupExtractMethodConfig.class);

if (data.config.length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public AdditionalGrammarVersionsToCheck getAdditionalGrammarVersions() throws Mi
private MockupSelectionConfig initConfig() {
MockupSelectionConfig config = null;
XStream xstream = new XStream();
XStream.setupDefaultSecurity(xstream);
xstream.allowTypesByWildcard(new String[] {
"org.python.pydev.**"
});

xstream.alias("config", MockupSelectionConfig.class);

if (data.config.length() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void testRecursion() throws FileNotFoundException, Exception, CompletionR
} catch (CompletionRecursionException e) {
//that's ok... we're asking for it here...
}
requestCompl(f, strDoc, strDoc.length(), -1, new String[] { "args", "with_traceback(tb)" });
requestCompl(f, strDoc, strDoc.length(), -1, new String[] { "args", "with_traceback(self, tb)" });
}

public void testCompleteImportBuiltin() throws BadLocationException, IOException, Exception {
Expand Down Expand Up @@ -236,12 +236,12 @@ public void testBuiltinsInNamespace1() throws BadLocationException, IOException,

public void testBuiltinsInNamespace2() throws BadLocationException, IOException, Exception {
String s = "__builtins__.RuntimeError.";
requestCompl(s, s.length(), 2, new String[] { "args", "with_traceback(tb)" });
requestCompl(s, s.length(), 2, new String[] { "args", "with_traceback(self, tb)" });
}

public void testBuiltinsInNamespace2Underline() throws BadLocationException, IOException, Exception {
String s = "__builtins__.RuntimeError._";
requestCompl(s, s.length(), -1, new String[] { "__doc__", "__init__()", "__str__()" });
requestCompl(s, s.length(), -1, new String[] { "__doc__", "__init__(self)", "__str__(self)" });
}

public void testPreferForcedBuiltin() throws BadLocationException, IOException, Exception {
Expand Down

0 comments on commit 56d1d77

Please sign in to comment.