From 835f31af6fe633ace7c710e59c49316a373fba7b Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 2 Feb 2011 00:40:45 +0000 Subject: [PATCH] 335682 --- tests/bugs1611/pr335682/foo.jar | Bin 0 -> 2482 bytes tests/bugs1611/pr335682/theSource.zip | Bin 0 -> 1293 bytes .../systemtest/ajc1611/Ajc1611Tests.java | 4 ++ .../aspectj/systemtest/ajc1611/ajc1611.xml | 3 + .../tools/IncrementalCompilationTests.java | 62 +++++++++++++++++- 5 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 tests/bugs1611/pr335682/foo.jar create mode 100644 tests/bugs1611/pr335682/theSource.zip diff --git a/tests/bugs1611/pr335682/foo.jar b/tests/bugs1611/pr335682/foo.jar new file mode 100644 index 0000000000000000000000000000000000000000..ddc5728dc8533707f049be18fc0e316b697e35df GIT binary patch literal 2482 zcmaJ@c{CJiA0A^uk&r3kbLq3M&7fSNCd*)&!PpX6#-44MkUiTdyPKV4&?G{Zv6W=Y zK7%aTmx(DPWTKFdbN}FWzV7p$_nh}V?>W!!ywCalp7ZD<7(v_smi-0Pg{c9KfExe; zAT^C(GCC+NIV23FqorwRB#YGg*#!W6MfP-GN65(bpG3$=l6xqX=nI4LGxJ`ux=3jq zWWRS&6&footBsUhLu1JlnT{SEnYsD7c_2U^!OT)IXd329R zJUrx#>~VKsIIO+x9a&pf8ys%Z*u~>CoLiL&UsfWA1B9GePbPAVb7xg;Xad{(`lCV% zffbvK8r#liPS>~76y zJb8zK4LgGT9c0>1xT8hVtiakmFBLOj{6S^~i70}V_3C|NCbJECSZIZIUepP2caksP zxXXY!WY|^52|S{(Y}`^gSTAuMl$9!nEgFc+y6V4_^U{5Eon5hvCRtiz0Nt1}N$;wl zWuk|r9jUkxuT(!~`R`r*MxVqhw>pyPZ@m6$%hw<7gY>p&7zB%d>%zdckc-o8V@YmioH(`wXaxwoBAi=rd#KWWxNUZauiF4D$83Wi6Z*(!1q;F1WT2-Z@g0srY$e6e^H3Yx;vE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index 0000000000000000000000000000000000000000..aeb53c1a904e2cc0ec60d9b80e71fe8d7193811a GIT binary patch literal 1293 zcmWIWW@h1H0D+h~dpj@#O0Y1nFeK;a>i;{%zz_gebtcRaMHL57HAq!je!f0Pl?Vd| z5XMxZs**-lRg|BWnUk90n_7~QpQ4wQSeDp(ZX?$r0|B-NwiC)vL`>h);LXl$72@5= zU$E@DRBo~294F1%^2JRZ&AaY?`1}7a;~Pn;urIK8UQu55XCdzqzMqD{U4N#YwTmj*dw-U1q>fOPn~~|> z-0P`{*LGiBBg8S?xogFp%40X0Tti*6V*7nNYnHfmd3OE$_ns}lo1LRJ_}BjhKyTaq{U2YJqzZnQ3JxPAKBt)=_6{(7R@&b_&7Pt*pPvuPV{zm;=H zxE;X!=4EB6SW44!k*qabx!I@ki>w68Qhu(|sL{5*bt-6Kwl1Spdg`@Z3*;g{&0vye zn!f6?d(!r4&l*dPACjIbkuv?-qvv6D7q4FMkZaAqvO`kog>YZpq#N_&K@nipbJ)WM z82Euq$Pq9XEv1Q|MSx3c0VMSM_U0XO;5q)><&?F=u9l~94O@e!D;?yvXy+8yOMiWi zabZ{a`pG5P?NR?Gz4?D$?2GvuPMiLBhxX*ZTE@4yAnd^%YaORJc5%b6?xZd}i^=tLY)$@O*n@eyz?fTq%%Ra&21mBlgKNA~v zCWv#UIW7IU)9mWU$SH2eCtICV>sont-&r=-i~ICWeRBAE{cPFxc#)YUr%pali^$vd z`oY#Zng7mdKY8mSHyQi~r@}wK%uEjhz32)~g^WyG47f8dP#F?HWMzadY?&FMMGeSA zWNk(!5e7u&M$QeO%#8p(Kqg!lW>ydIMi>OjJjk&M$~*{Q3iKk(AhfK6YzQa;AcqPl e0U*FOU}8Zw1eP2Eyjj^ms#t*#l&E$ygLnW7fxgKA literal 0 HcmV?d00001 diff --git a/tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java b/tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java index 3468d5e48..aee6649d7 100644 --- a/tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java @@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc1611Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testDeserialization_335682() { + runTest("pr335682"); + } + public void testNPEAddSerialVersionUID_bug335783() { runTest("pr335783"); } diff --git a/tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml b/tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml index 663ad68a0..afcd5a8e5 100644 --- a/tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml +++ b/tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml @@ -2,6 +2,9 @@ + + + diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java index 29941da8e..247af6369 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java @@ -11,6 +11,7 @@ package org.aspectj.systemtest.incremental.tools; import java.io.File; +import java.util.List; import java.util.Set; import org.aspectj.ajde.core.AjCompiler; @@ -120,6 +121,65 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental assertContains("B.java:4:0::0 Unhandled exception type Exception", getErrorMessages(p).get(0)); } + /** + * Checking if we have the right information on the member nodes. + */ + public void testModelStructure_333123() throws Exception { + String p = "pr333123"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + printModel(p); + + AspectJElementHierarchy model = (AspectJElementHierarchy) getModelFor(p).getHierarchy(); + + IProgramElement ipe = null; + // fieldInt [field] 10 hid:=pr333123;", ipe.getCorrespondingTypeSignature()); + assertEquals("java.util.List", ipe.getCorrespondingType(true)); + + // method(java.lang.String) [method] 4 hid:=pr333123 paramSigs = ipe.getParameterSignatures(); + assertEquals("La/b/Code;", new String(paramSigs.get(0))); + assertEquals("Ljava/lang/String;", new String(paramSigs.get(1))); + assertEquals("J", new String(paramSigs.get(2))); + + assertEquals("a.b.Code", ipe.getCorrespondingType(true)); + assertEquals("La/b/Code;", ipe.getCorrespondingTypeSignature()); + + ipe = model.findElementForHandle("=pr333123;"); + assertEquals("(Ljava/util/List;)Ljava/util/List;", ipe.getBytecodeSignature()); + paramSigs = ipe.getParameterSignatures(); + assertEquals("Ljava/util/List;", new String(paramSigs.get(0))); + assertEquals("java.util.List", ipe.getCorrespondingType(true)); + assertEquals("Ljava/util/List;", ipe.getCorrespondingTypeSignature()); + + } + // changing method return type parameterization public void testModifiedMethodReturnTypeGenericTypeParameterShouldTriggerError_318884_3() throws Exception { String p = "pr318884_3"; @@ -276,7 +336,7 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental IProgramElement ipe = model.findElementForHandleOrCreate("=PR278496_1