Unable to edit package-info files
See original GitHub issueDescribe the bug
I have an OSGi Bundle (a jar with some extra metadata added) that normally has package-info files at package level to state which version the package is
Example:
// Decompiled with: CFR 0.150
import org.osgi.annotation.versioning.Version;
@Version(value="1.0.0")
package my.package.name;
It states that it has a parse error. Found “package”, expected one of “;” “@” “class” "enum “interface” “module” “open”
To Reproduce
Open a jar (for example the following one: https://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.api/2.23.0/org.apache.sling.api-2.23.0.jar) and go to org.apache.sling.api.package-info and see the error
I would have expected to still be able to edit the file in assembler mode, but I don’t get any action anywhere to go to assembler mode?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Unable to modify annotation of package-info.java using Java 8
A permanent fix is to change the annotation itself, instead of dynamically modifying it at runtime. Field annotationDataField = Class.class.getDeclaredField(" ...
Read more >The package-info.java File - Baeldung
In this tutorial, we're going to understand the purpose of package-info.java and how it is useful. Simply put, package-info is a Java file...
Read more >43114 – package-info.java repeatedly compiled
After upgrading from 1.7.0 to 1.7.1, our package-info.java files don't get compiled any more, and this breaks our JAXB code. The reason for...
Read more >PackageInfo - Android Developers
Signing information read from the package file, potentially including past ... in case multiple signatures are reported you cannot assume the one at...
Read more >DISM Operating System Package (.cab or .msu) Servicing ...
/Get-PackageInfo. Displays detailed information about a package provided as a .cab file. Only .cab files can be specified. You cannot use ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Opened an issue with CFR so hopefully they will be printed in the correct location by default some time in the near future 👍
1.17.1
will fix phantom generation for the annotations, so you no longer need to add the jar defining those annotations 😃