Liubsyy / JarEditor

IDEA plugin for directly editing and modifying files in jar without decompression. (一款无需解压直接编辑修改jar包内文件的IDEA插件)
Apache License 2.0
533 stars 46 forks source link

compile error on 1.5.2 #5

Closed saltedfisholdxu closed 4 months ago

saltedfisholdxu commented 4 months ago

I have installed JarEditor 1.5.2 on IDEA 2023.3 and hava a try on it,But an interesting thing happend. I just add ezjava.jar to libraries for decompile,When I randomly opened a class and directly click 'Save' the compile will return error. I tried 1.8 17 and Default SDK they all cant compile it

https://pastebin.com/hPQLjpq9

cd5cea78-1d96-4d99-8fe2-bdbab0381e08

Compile err: [F:\AWDP\ezjavadec\src\com\mongodb\DB.java:147: error: invalid method declaration; return type required AnonymousClass2(ClientSession clientSession, OperationExecutor executor, ReadConcern readConcern, ReadPreference readPreference, boolean retryReads) { ^F:\AWDP\ezjavadec\src\com\mongodb\DB.java:156: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\DBCollection.java:466: error: invalid method declaration; return type required AnonymousClass2(ClientSession clientSession, OperationExecutor executor, ReadConcern readConcern, ReadPreference readPreference, boolean retryReads, String fieldName2, DBCollectionDistinctOptions options2) { ^F:\AWDP\ezjavadec\src\com\mongodb\DBCollection.java:477: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\DBCollection.java:931: error: invalid method declaration; return type required AnonymousClass3(ClientSession clientSession, OperationExecutor executor, ReadConcern readConcern, ReadPreference readPreference, boolean retryReads) { ^F:\AWDP\ezjavadec\src\com\mongodb\MongoClient.java:161: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\MongoClient.java:267: error: invalid method declaration; return type required AnonymousClass2() { ^F:\AWDP\ezjavadec\src\com\mongodb\client\internal\MongoIterableImpl.java:129: error: invalid method declaration; return type required AnonymousClass1(Collection target2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\AggregateToCollectionOperation.java:168: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\AggregateToCollectionOperation.java:202: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\AggregateToCollectionOperation.java:244: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\AggregateToCollectionOperation.java:259: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\BaseWriteOperation.java:117: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback callback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:138: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback callback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:148: error: invalid method declaration; return type required C00051() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:197: error: invalid method declaration; return type required C00051() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:261: error: invalid method declaration; return type required AnonymousClass2() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:285: error: invalid method declaration; return type required AnonymousClass3() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CountOperation.java:315: error: invalid method declaration; return type required AnonymousClass4(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateIndexesOperation.java:111: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateIndexesOperation.java:149: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateIndexesOperation.java:159: error: invalid method declaration; return type required C00061() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateIndexesOperation.java:200: error: invalid method declaration; return type required C00061() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DistinctOperation.java:116: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DistinctOperation.java:142: error: invalid method declaration; return type required AnonymousClass2() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DistinctOperation.java:173: error: invalid method declaration; return type required AnonymousClass3(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropCollectionOperation.java:65: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropCollectionOperation.java:104: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback releasingCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropCollectionOperation.java:146: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropCollectionOperation.java:161: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback releasingCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropIndexOperation.java:97: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropIndexOperation.java:136: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback releasingCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropIndexOperation.java:178: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropIndexOperation.java:193: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback releasingCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindAndDeleteOperation.java:117: error: invalid method declaration; return type required AnonymousClass1(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindAndReplaceOperation.java:158: error: invalid method declaration; return type required AnonymousClass1(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindAndUpdateOperation.java:193: error: invalid method declaration; return type required AnonymousClass1(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:109: error: invalid method declaration; return type required AnonymousClass1(ReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:156: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback errHandlingCallback2, AsyncConnectionSource source2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:177: error: invalid method declaration; return type required C00092(SingleResultCallback wrappedCallback2, AsyncConnectionSource source2, AsyncConnection connection2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:246: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:261: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback errHandlingCallback22, AsyncConnectionSource source22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:282: error: invalid method declaration; return type required C00092(SingleResultCallback wrappedCallback22, AsyncConnectionSource source22, AsyncConnection connection22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:379: error: invalid method declaration; return type required AnonymousClass3() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:411: error: invalid method declaration; return type required AnonymousClass4() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListIndexesOperation.java:435: error: invalid method declaration; return type required AnonymousClass5() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:239: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:273: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:315: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:330: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:394: error: invalid method declaration; return type required AnonymousClass3() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceToCollectionOperation.java:420: error: invalid method declaration; return type required AnonymousClass4() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceWithInlineResultsOperation.java:192: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceWithInlineResultsOperation.java:216: error: invalid method declaration; return type required AnonymousClass2() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MapReduceWithInlineResultsOperation.java:246: error: invalid method declaration; return type required AnonymousClass3(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:110: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:146: error: invalid method declaration; return type required AnonymousClass1(AsyncConnectionSource source2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:211: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback errHandlingCallback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:224: error: invalid method declaration; return type required AnonymousClass1(AsyncConnectionSource source22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:366: error: invalid method declaration; return type required AnonymousClass3(WriteBinding binding2, BulkWriteBatch retryBatch2, MongoException originalError2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:447: error: invalid method declaration; return type required AnonymousClass1(AsyncConnection connection2, OperationHelper.ConnectionReleasingWrappedCallback releasingCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:506: error: invalid method declaration; return type required AnonymousClass4(SingleResultCallback callback2, Throwable originalError2, AsyncWriteBinding binding2, BulkWriteBatch retryBatch2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:525: error: invalid method declaration; return type required AnonymousClass1(AsyncConnection connection22, OperationHelper.ConnectionReleasingWrappedCallback releasingCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:588: error: invalid method declaration; return type required AnonymousClass5(SingleResultCallback callback2, AsyncConnection connection2, List remaining2, int batchNum2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\MixedBulkWriteOperation.java:733: error: invalid method declaration; return type required AnonymousClass6(boolean isSecondAttempt2, boolean retryWrites2, BulkWriteBatch batch2, AsyncWriteBinding binding2, AsyncConnection connection2, OperationHelper.ConnectionReleasingWrappedCallback callback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ParallelCollectionScanOperation.java:99: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ParallelCollectionScanOperation.java:135: error: invalid method declaration; return type required AnonymousClass2() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ParallelCollectionScanOperation.java:183: error: invalid method declaration; return type required AnonymousClass3(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\RenameCollectionOperation.java:71: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\RenameCollectionOperation.java:110: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:358: error: invalid method declaration; return type required AnonymousClass1(ReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:410: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:423: error: invalid method declaration; return type required C00071(AsyncConnectionSource source22, AsyncConnection connection22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:482: error: invalid method declaration; return type required C00071(AsyncConnectionSource source222, AsyncConnection connection222) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:551: error: invalid method declaration; return type required AnonymousClass3() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:623: error: invalid method declaration; return type required AnonymousClass1(ReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:664: error: invalid method declaration; return type required AnonymousClass4() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:713: error: invalid method declaration; return type required AnonymousClass1(ReadBinding binding22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:792: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback callback2, AsyncReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:818: error: invalid method declaration; return type required AnonymousClass5() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:854: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback callback22, AsyncReadBinding binding22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:1055: error: invalid method declaration; return type required AnonymousClass6(SessionContext sessionContext2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:1094: error: invalid method declaration; return type required AnonymousClass7() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:1127: error: invalid method declaration; return type required AnonymousClass8() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\FindOperation.java:1165: error: invalid method declaration; return type required AnonymousClass1(AsyncBatchCursor cursor2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CommandReadOperation.java:51: error: invalid method declaration; return type required AnonymousClass1() { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateCollectionOperation.java:191: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateCollectionOperation.java:226: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateCollectionOperation.java:268: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateCollectionOperation.java:283: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback22) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateUserOperation.java:69: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateUserOperation.java:115: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateViewOperation.java:94: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\CreateViewOperation.java:141: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropDatabaseOperation.java:59: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropDatabaseOperation.java:99: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropUserOperation.java:61: error: invalid method declaration; return type required AnonymousClass1(WriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\DropUserOperation.java:107: error: invalid method declaration; return type required AnonymousClass2(SingleResultCallback callback2, AsyncWriteBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListCollectionsOperation.java:142: error: invalid method declaration; return type required AnonymousClass1(ReadBinding binding2) { ^F:\AWDP\ezjavadec\src\com\mongodb\operation\ListCollectionsOperation.java:192: error: invalid method declaration; return type required AnonymousClass1(SingleResultCallback wrappedCallback2, AsyncConnectionSource source2) { ^F:\AWDP\ezjavadec\src\ch\qos\logback\classic\spi\PackagingDataCalculator.java:6: warning: Reflection is internal proprietary API and may be removed in a future releaseimport sun.reflect.Reflection; ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\sun\UnsafeFactoryInstantiator.java:8: warning: Unsafe is internal proprietary API and may be removed in a future releaseimport sun.misc.Unsafe; ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\util\UnsafeUtils.java:5: warning: Unsafe is internal proprietary API and may be removed in a future releaseimport sun.misc.Unsafe; ^F:\AWDP\ezjavadec\src\ch\qos\logback\classic\spi\PackagingDataCalculator.java:17: warning: Reflection is internal proprietary API and may be removed in a future release Reflection.getCallerClass(2); ^F:\AWDP\ezjavadec\src\ch\qos\logback\classic\spi\PackagingDataCalculator.java:53: warning: Reflection is internal proprietary API and may be removed in a future release callerClass = Reflection.getCallerClass(((localFirstCommon + i) - missfireCount) + 1); ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\sun\UnsafeFactoryInstantiator.java:13: warning: Unsafe is internal proprietary API and may be removed in a future release private final Unsafe unsafe = UnsafeUtils.getUnsafe(); ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\util\UnsafeUtils.java:9: warning: Unsafe is internal proprietary API and may be removed in a future release private static final Unsafe unsafe; ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\util\UnsafeUtils.java:13: warning: Unsafe is internal proprietary API and may be removed in a future release Field f = Unsafe.class.getDeclaredField("theUnsafe"); ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\util\UnsafeUtils.java:16: warning: Unsafe is internal proprietary API and may be removed in a future release unsafe = (Unsafe) f.get(null); ^F:\AWDP\ezjavadec\src\org\springframework\objenesis\instantiator\util\UnsafeUtils.java:28: warning: Unsafe is internal proprietary API and may be removed in a future release public static Unsafe getUnsafe() { ^]
Liubsyy commented 4 months ago

This error is that the compiled class depends on com. mongodb.DB, but there is no com. mongodb.DB.class in this jar, so it will go to the src directory to find the source code src\com\mongodb\DB.java.

These errors should be caused by source code compilation. mistake.

Try to modify the src code (com.mongodb.*) and compile it successfully, then package it into a jar and add it to Libraries.