Skip to content

CFR, Fernflower, Vineflower: No line numbers available in class file #118

Description

@basinilya

Version 3.5.1, Eclipse 4.36.0
I'm checking org.slf4j.Logger from slf4j-api-2.0.7.jar.
Unless I choose "JD Core" or "Procyon", there's the comment at the beginning of decompiled class:

// Warning: No line numbers available in class file

Yet, with CFR or Fernflower the line numbers are there!

   default boolean isEnabledForLevel(Level level) {
      int levelInt = level.toInt();// 146
      switch (levelInt) {// 147
         case 0:
            return this.isTraceEnabled();// 149
         case 10:
            return this.isDebugEnabled();// 151
         case 20:
            return this.isInfoEnabled();// 153
         case 30:
            return this.isWarnEnabled();// 155
         case 40:
            return this.isErrorEnabled();// 157
         default:
            throw new IllegalArgumentException("Level [" + level + "] not recognized.");// 159
      }
   }

With Vineflower there are no line number comments at all.

With JD Core or Procyon it still works:

/*     */   default boolean isEnabledForLevel(Level level) {
/* 146 */     int levelInt = level.toInt();
/* 147 */     switch (levelInt) {
/*     */       case 0:
/* 149 */         return isTraceEnabled();
/*     */       case 10:
/* 151 */         return isDebugEnabled();
/*     */       case 20:
/* 153 */         return isInfoEnabled();
/*     */       case 30:
/* 155 */         return isWarnEnabled();
/*     */       case 40:
/* 157 */         return isErrorEnabled();
/*     */     } 
/* 159 */     throw new IllegalArgumentException("Level [" + level + "] not recognized.");
/*     */   }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions