Giter VIP home page Giter VIP logo

overmapped's People

Contributors

wolvereness avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

overmapped's Issues

StringIndexOutOfBoundsException when using a field mapping with no space

 members:
   java/package/SomeClass:
     FIELD_NAME: NEW_NAME

Produces this stack trace:

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1949)
    at com.wolvereness.overmapped.MembersSubRoutine.parseMapping(MembersSubRoutine.java:418)
    at com.wolvereness.overmapped.MembersSubRoutine.processSingleClassMappings(MembersSubRoutine.java:230)
    at com.wolvereness.overmapped.MembersSubRoutine.invoke(MembersSubRoutine.java:195)
    at com.wolvereness.overmapped.OverMapped.process(OverMapped.java:210)
    ... 22 more

NullPointerException when executing

Caused by: java.lang.NullPointerException
    at org.objectweb.asm.Type.getObjectType(Unknown Source)
    at com.wolvereness.overmapped.asm.ByteClass$3$1.<init>(ByteClass.java:218)
    at com.wolvereness.overmapped.asm.ByteClass$3.visitMethod(ByteClass.java:216)
    at org.objectweb.asm.ClassVisitor.visitMethod(Unknown Source)
    at org.objectweb.asm.commons.RemappingClassAdapter.visitMethod(Unknown Source)
    at org.objectweb.asm.ClassReader.b(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at com.wolvereness.overmapped.asm.ByteClass.call(ByteClass.java:186)
    at com.wolvereness.overmapped.asm.ByteClass$2.call(ByteClass.java:171)
    at com.wolvereness.overmapped.asm.ByteClass$2.call(ByteClass.java:168)
    at com.wolvereness.overmapped.lib.ProperProcessor$Task.calculate(MultiProcessor.java:195)
    at com.wolvereness.overmapped.lib.ProperProcessor$Task.handle(MultiProcessor.java:189)
    at com.wolvereness.overmapped.lib.ProperProcessor$1.run(MultiProcessor.java:255)
    at java.lang.Thread.run(Thread.java:679)

Constructors are inherited

Constructors are inherited and incorrectly act as valid targets for flag manipulation in subclasses that do not have the signature.

Allow short-hand listing of member maps

The current format is very verbose for multiple member maps to a single class. An example:

members:
  "org/bukkit/entity/Damageable _INVALID_damage (I)V": damage
  "org/bukkit/entity/Damageable _INVALID_damage (ILorg/bukkit/entity/Entity;)V": damage
  "org/bukkit/entity/Damageable _INVALID_getHealth ()I": getHealth
  "org/bukkit/entity/Damageable _INVALID_setHealth (I)V": setHealth
  "org/bukkit/entity/Damageable _INVALID_getMaxHealth ()I": getMaxHealth
  "org/bukkit/entity/Damageable _INVALID_setMaxHealth (I)V": setMaxHealth
  "org/bukkit/entity/LivingEntity _INVALID_getLastDamage ()I": getLastDamage
  "org/bukkit/entity/LivingEntity _INVALID_setLastDamage (I)V": setLastDamage
  "org/bukkit/event/entity/EntityDamageEvent _INVALID_getDamage ()I": getDamage
  "org/bukkit/event/entity/EntityDamageEvent _INVALID_setDamage (I)V": setDamage
  "org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_getDamage ()I": getDamage
  "org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_setDamage (I)V": setDamage
  "org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_getAmount ()I": getAmount
  "org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_setAmount (I)V": setAmount

This could be improved by using a format like this:

members:
  "org/bukkit/entity/Damageable":
    "_INVALID_damage (I)V": damage
    "_INVALID_damage (ILorg/bukkit/entity/Entity;)V": damage
    "_INVALID_getHealth ()I": getHealth
    "_INVALID_setHealth (I)V": setHealth
    "_INVALID_getMaxHealth ()I": getMaxHealth
    "_INVALID_setMaxHealth (I)V": setMaxHealth
  "org/bukkit/entity/LivingEntity":
    "_INVALID_getLastDamage ()I": getLastDamage
    "_INVALID_setLastDamage (I)V": setLastDamage
  "org/bukkit/event/entity/EntityDamageEvent":
    "_INVALID_getDamage ()I": getDamage
    "_INVALID_setDamage (I)V": setDamage
  "org/bukkit/event/vehicle/VehicleDamageEvent":
    "_INVALID_getDamage ()I": getDamage
    "_INVALID_setDamage (I)V": setDamage
  "org/bukkit/event/entity/EntityRegainHealthEvent":
    "_INVALID_getAmount ()I": getAmount
    "_INVALID_setAmount (I)V": setAmount

Private methods are inherited

Private methods are inherited so renaming them incorrectly modifies sub-classes that have a similarly named method.

Output doesn't behave like a state machine

All mappings behave like a state machine (as if previous mappings have been applied). The debug output however, is only in perspective of the original class names and member descriptions.

Field references to sub-classes are not mapped

When accessing a field of a sub-class, it changes the bytecode reference for that field to use the name of the current class, instead of the field's declaring class. This is valid bytecode, but OverMapped does not correctly change that reference to use a new name in those situations.

UnknownFormatConversionException

members:
  java/package/Class:
    { [f1, 2, f3]: f1}
    - value1
    - value2

Causes:

Caused by: java.util.UnknownFormatConversionException: Conversion = '2'
    at java.util.Formatter.checkText(Formatter.java:2519)
    at java.util.Formatter.parse(Formatter.java:2483)
    at java.util.Formatter.format(Formatter.java:2430)
    at java.util.Formatter.format(Formatter.java:2383)
    at java.lang.String.format(String.java:2781)
    at com.wolvereness.overmapped.SubRoutine.asType(SubRoutine.java:89)
    at com.wolvereness.overmapped.MembersSubRoutine.processSingleClassMappings(MembersSubRoutine.java:326)
    at com.wolvereness.overmapped.MembersSubRoutine.invoke(MembersSubRoutine.java:196)
    at com.wolvereness.overmapped.OverMapped.process(OverMapped.java:213)
    ... 22 more

And:

members:
  java/package/Class:
    { [f1, f2, f3]: f1}
    - 1

Causes:

Caused by: java.util.UnknownFormatConversionException: Conversion = '2'
    at java.util.Formatter.checkText(Formatter.java:2519)
    at java.util.Formatter.parse(Formatter.java:2483)
    at java.util.Formatter.format(Formatter.java:2430)
    at java.util.Formatter.format(Formatter.java:2383)
    at java.lang.String.format(String.java:2781)
    at com.wolvereness.overmapped.SubRoutine.asType(SubRoutine.java:89)
    at com.wolvereness.overmapped.MembersSubRoutine.processSingleClassMappings(MembersSubRoutine.java:318)
    at com.wolvereness.overmapped.MembersSubRoutine.invoke(MembersSubRoutine.java:196)
    at com.wolvereness.overmapped.OverMapped.process(OverMapped.java:213)
    ... 22 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.