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

Recoder can not parse the byte code of 'de.uka.ilkd.key.util.MiscTools' #46

Open
wadoon opened this issue Dec 23, 2022 · 0 comments
Open

Comments

@wadoon
Copy link
Member

wadoon commented Dec 23, 2022

This issue was created at git.key-project.org where the discussions are preserved.


  • Mantis: MT-1563
  • Submitted on: 2015-08-10 by (at)mhentschel
  • Updated: 2015-08-18

Description

The following exception is thrown by remove generics.

Caused by: java.lang.UnsupportedOperationException: TODO
at recoder.bytecode.ByteCodeParser.readFormalTypeParameters(ByteCodeParser.java:813)
at recoder.bytecode.ByteCodeParser.readMethodSignature(ByteCodeParser.java:1017)
at recoder.bytecode.ByteCodeParser.readAttributesForMethod(ByteCodeParser.java:394)
at recoder.bytecode.ByteCodeParser.readMethodInfo(ByteCodeParser.java:571)
at recoder.bytecode.ByteCodeParser.parseClassFile(ByteCodeParser.java:119)
at recoder.bytecode.ByteCodeParser.parseClassFile(ByteCodeParser.java:71)
at recoder.io.DefaultClassFileRepository.getClassFile(DefaultClassFileRepository.java:117)
at recoder.service.DefaultNameInfo.loadClassFromPrecompiledCode(DefaultNameInfo.java:631)
at recoder.service.DefaultNameInfo.loadClass(DefaultNameInfo.java:614)
at recoder.service.DefaultNameInfo.getType(DefaultNameInfo.java:492)
at recoder.service.DefaultNameInfo.getClassType(DefaultNameInfo.java:429)
at recoder.service.DefaultSourceInfo.getType(DefaultSourceInfo.java:826)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:460)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:430)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:430)
at recoder.service.DefaultCrossReferenceSourceInfo.modelChanged(DefaultCrossReferenceSourceInfo.java:222)
at recoder.service.ChangeHistory.updateModel(ChangeHistory.java:502)
at de.uka.ilkd.key.util.removegenerics.AbstractGenericRemover.removeGenerics(AbstractGenericRemover.java:65)
at org.key_project.removegenerics.ui.wizard.RemoveGenericsWizard.removeGeneris(RemoveGenericsWizard.java:166)
... 2 more
Root exception:
java.lang.UnsupportedOperationException: TODO
at recoder.bytecode.ByteCodeParser.readFormalTypeParameters(ByteCodeParser.java:813)
at recoder.bytecode.ByteCodeParser.readMethodSignature(ByteCodeParser.java:1017)
at recoder.bytecode.ByteCodeParser.readAttributesForMethod(ByteCodeParser.java:394)
at recoder.bytecode.ByteCodeParser.readMethodInfo(ByteCodeParser.java:571)
at recoder.bytecode.ByteCodeParser.parseClassFile(ByteCodeParser.java:119)
at recoder.bytecode.ByteCodeParser.parseClassFile(ByteCodeParser.java:71)
at recoder.io.DefaultClassFileRepository.getClassFile(DefaultClassFileRepository.java:117)
at recoder.service.DefaultNameInfo.loadClassFromPrecompiledCode(DefaultNameInfo.java:631)
at recoder.service.DefaultNameInfo.loadClass(DefaultNameInfo.java:614)
at recoder.service.DefaultNameInfo.getType(DefaultNameInfo.java:492)
at recoder.service.DefaultNameInfo.getClassType(DefaultNameInfo.java:429)
at recoder.service.DefaultSourceInfo.getType(DefaultSourceInfo.java:826)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:460)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:430)
at recoder.service.DefaultCrossReferenceSourceInfo.analyzeReferences(DefaultCrossReferenceSourceInfo.java:430)
at recoder.service.DefaultCrossReferenceSourceInfo.modelChanged(DefaultCrossReferenceSourceInfo.java:222)
at recoder.service.ChangeHistory.updateModel(ChangeHistory.java:502)
at de.uka.ilkd.key.util.removegenerics.AbstractGenericRemover.removeGenerics(AbstractGenericRemover.java:65)
at org.key_project.removegenerics.ui.wizard.RemoveGenericsWizard.removeGeneris(RemoveGenericsWizard.java:166)
at org.key_project.removegenerics.ui.wizard.RemoveGenericsWizard$2.run(RemoveGenericsWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Steps to reproduce

1. Use Eclipse with Remove Generics installed.
2. Import the attached Java project.
3. Select context menu item 'Remove Generics' of the Java Project.

Additional Information

I set the priority to low, because a different example with a TODO works as it should.

Files

Notes

(at)mulbrich at 2015-08-11

With which bytecode version of the class did this occur?

(at)mulbrich at 2015-08-11

I assume the method "concat" in MiscTool may be responsible for that:

public static <S,T extends S> S[] concat(S[] s1, T[] s2)

.method public static concat([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;
.signature "<S:Ljava/lang/Object;T:TS;>([TS;[TT;)[TS;"

"T extends S" seems to be the case that is tagged "TODO" in recoder.
I checked the current version of original recoder and this TODO is still there.

History

  • (at)mhentschel -- (NEW_BUG) 2015-08-10

  • (at)mulbrich -- (BUGNOTE_ADDED) 2015-08-11

  • (at)mulbrich -- (BUGNOTE_ADDED) 2015-08-11

  • (at)grahl -- (TAG_ATTACHED) 2015-08-18

Attributes

  • Category: Parser
  • Status: NEW
  • Severity: MINOR
  • OS:
  • Target Version:
  • Resolution: OPEN
  • Priority: LOW
  • Reproducibility: ALWAYS
  • Platform:
  • Commit: d1e9bf3ee09fe1751efca74e2be8de1ddbfe920f
  • Build:
  • Tags [{'name': 'recoder bug'}]
  • Labels: ~KeY Parser ~Bug ~LOW

View in Mantis


Information:

  • created_at: 2017-05-29T02:27:26.497Z
  • updated_at: 2017-05-29T02:27:27.289Z
  • closed_at: None (closed_by: )
  • milestone:
  • user_notes_count: 0
@wadoon wadoon changed the title <placeholder> Recoder can not parse the byte code of 'de.uka.ilkd.key.util.MiscTools' Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant