diff --git a/CHANGELOG.md b/CHANGELOG.md index 611b509e4..1dcb1fced 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. - Ctrl + G shortcut for tag list view - Uncompressed FLA (XFL) export creates a directory - [#1827] Video replacing VP6 reading +- [#1926] Constructors namespace taken from class - should be always public ### Changed - [#1913] SVG export/import of shapes - shape exact position (bounds) is retained @@ -2829,10 +2830,11 @@ All notable changes to this project will be documented in this file. [#1905]: https://www.free-decompiler.com/flash/issues/1905 [#1915]: https://www.free-decompiler.com/flash/issues/1915 [#1923]: https://www.free-decompiler.com/flash/issues/1923 +[#1827]: https://www.free-decompiler.com/flash/issues/1827 +[#1926]: https://www.free-decompiler.com/flash/issues/1926 [#1922]: https://www.free-decompiler.com/flash/issues/1922 [#1921]: https://www.free-decompiler.com/flash/issues/1921 [#1917]: https://www.free-decompiler.com/flash/issues/1917 -[#1827]: https://www.free-decompiler.com/flash/issues/1827 [#1424]: https://www.free-decompiler.com/flash/issues/1424 [#1473]: https://www.free-decompiler.com/flash/issues/1473 [#1835]: https://www.free-decompiler.com/flash/issues/1835 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java index 05cb34b62..b041555cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java @@ -170,18 +170,8 @@ public class TraitClass extends Trait implements TraitWithSlot { //instance initializer - constructor if (!instanceInfo.isInterface()) { - String modifier = ""; - Multiname m = abc.constants.getMultiname(instanceInfo.name_index); - Namespace ns = m.getNamespace(abc.constants); - if (ns != null) { - modifier = ns.getPrefix(abc) + " "; - if (modifier.equals(" ")) { - modifier = ""; - } - if (modifier.startsWith("private")) { //cannot have private constuctor - modifier = ""; - } - } + String modifier = "public "; + Multiname m = abc.constants.getMultiname(instanceInfo.name_index); writer.newLine(); writer.startTrait(GraphTextWriter.TRAIT_INSTANCE_INITIALIZER);