Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Procyon line number realignment #111

Closed
wants to merge 1 commit into from

Conversation

nbauma109
Copy link

Fixes issue #109

@jpstotz
Copy link
Collaborator

jpstotz commented May 26, 2024

@nbauma109 Thanks for the PR, however applying it onto the sample from #109 the decompiled Procyon code is afterwards defect:

The two constructors are missing code and their closing brackets.

/*     */ public class ModelInputStream2 extends AbstractModelInput
/*     */ {
/*     */     private BufferedRandomAccessInputStream ris;
/*     */     private Cipher decodingCipher;
/*     */     public static final int MAGIC_NUMBER = 1196246578;
/*     */     private int[] offsets;
/*     */     private String[] identifiers;
/*     */     private long bufferStart;
/*     */     private List<String> stringPool;
/*     */     private boolean loadRoot;
/*     */     
/*     */     protected int getMagicNumber() {
/*  44 */         return 1196246578;
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     public ModelInputStream2(final Session session, final URL base, final Cipher decrypter) {
/*  56 */         super(session, base);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     public ModelInputStream2(final Session session, final URL base) {
/*  68 */         super(session, base);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     private boolean getAddIdToIndex() {
/*  74 */         return (this.flags & 0x10) != 0x0;
/*     */     }
...

Original code of the constructors:

    public ModelInputStream2(final Session session, final URL base, final Cipher decrypter) {
        super(session, base);
        this.loadRoot = false;
        this.decodingCipher = decrypter;
    }
    
    public ModelInputStream2(final Session session, final URL base) {
        super(session, base);
        this.loadRoot = false;
    }

@nbauma109
Copy link
Author

nbauma109 commented May 26, 2024

good catch, thanks for point that out!
I think the easier way to solve this would be to have Procyon's maintainer merge my pull request mstrobel/procyon#60.

@nbauma109
Copy link
Author

I've posted a reminder on Procyon PR. I'm closing this PR, as the right strategy will be to update Procyon version instead.

@nbauma109 nbauma109 closed this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants