Skip to content

makeConcatWithConstants seems not decompiled correctly #476

@oicu0619

Description

@oicu0619

Vineflower version

1.11.1

Describe the bug

BaseErrorInfoInterface.txt should be renamed to a class file.
BaseErrorInfoInterface.txt

While decompile this class file with vineflow, i get

package com.siemens.fdd.common.exception;

import com.siemens.fdd.common.enums.CommonEnum;
import java.lang.invoke.StringConcatFactory;
import java.text.MessageFormat;
import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.i18n.LocaleContextHolder;

public interface BaseErrorInfoInterface {
   String getName();

   MessageSource getMessageSource();

   Integer getResultCode();

   String getOriginResultMsg();

   default String getResultMsg(Object... args) {
      String name = this.getName();
      String msg = this.getOriginResultMsg();
      if (CommonEnum.messageSource != null) {
         try {
            msg = CommonEnum.messageSource.getMessage(name, null, LocaleContextHolder.getLocale());
         } catch (NoSuchMessageException var5) {
            msg = CommonEnum.messageSource
               .getMessage(
                  StringConcatFactory.makeConcatWithConstants<"makeConcatWithConstants","\u0001">(this.getOriginResultMsg()),
                  null,
                  StringConcatFactory.makeConcatWithConstants<"makeConcatWithConstants","\u0001">(this.getOriginResultMsg()),
                  LocaleContextHolder.getLocale()
               );
         }
      }

      return args != null && args.length != 0 ? MessageFormat.format(msg, args) : msg;
   }
}

In which i think the "makeConcatWithConstants" part is not correct. This should be a constant string concatination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions