Comments (5)
ChatGTP is pretty much correct. There's no need to limit the scope here as the assignment can never yield an exception. I assume that it's a simple simplification.
from byte-buddy.
Thanks a lot for the detailed response.
Actually, i used ByteBuddy and asm to develop a online debug tools.
I decompile user's class to java source code, and user can debug at any source code line. We will record every variable before user debug code line . for example below code ,if user debug at L15, we will record the value of 'a' and 'b' variables.
L11 public void sum2() {
L12 int a = 25;
L13 try {
L14 int b = 8;
L15 if (a > 20) {
L16 int k = a + b;
L17 System.out.println("k=" + k);
L18 }
L19 } catch (Exception e) {
L20 e.printStackTrace();
L21 }
L22 }
But if user debug at L20. we will generate error bytecode base ' LocalVariableTable ' , Because our bytecode will try to record variable 'b' at catch statement but actually it can't be accessed.
So could you give some advice to me for this case?
from byte-buddy.
i think may be need parse source code manually for resolve this case
from byte-buddy.
I would argue that it would be possible to access the value using the Java debugger.
from byte-buddy.
Thanks , Have a nice day.
from byte-buddy.
Related Issues (20)
- Not able to intercept methods of java.net.HttpURLConnection class in Java 17 HOT 1
- Strange interaction with method implementations for methods from composite interfaces HOT 1
- Replace Method Code HOT 3
- Can I replace the new byte[] in the onTransformation method? HOT 1
- I want to use bytebuddy to advice java.time.LocalDateTime HOT 3
- BUG: instrumentation error HOT 3
- No classes have been predefined during the image build to load from bytecodes at runtime HOT 8
- Verify Error on Byte Buddy generated class HOT 1
- Question: copy class hierarchy in an environment without Java Agent HOT 1
- Can 'private final method' in 'public final class' be redefined? HOT 4
- Method matchers works by chance HOT 2
- Why does ClassNotFoundException appear in Interceptor when running in SpringBoot? HOT 1
- Compilation error after adding lombok to classpath HOT 1
- why is the byte-buudy AgentBuilder source code so long ? HOT 2
- Invalid module descriptor of byte-buddy `jar` when `JAVA_HOME` is set to version 21 HOT 16
- matched class wasn't transformered and the issue appears just twice, and i didn't reproducing the issue HOT 10
- Fail to read property due to `IllegalArgumentException` when using it on withX methods HOT 4
- Improve diagnostics/troubleshooting features for agent installation HOT 1
- ByteBudy agent required by Mockito fails to install on GraalVM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from byte-buddy.