Skip to content

Commit 23e1e2f

Browse files
committed
8359180: Apply java.io.Serial annotations in java.instrument
Reviewed-by: phh, sspitsyn
1 parent 5a62e99 commit 23e1e2f

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/java.instrument/share/classes/java/lang/instrument/IllegalClassFormatException.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package java.lang.instrument;
2727

28+
import java.io.Serial;
29+
2830
/*
2931
* Copyright 2003 Wily Technology, Inc.
3032
*/
@@ -40,6 +42,8 @@
4042
* @since 1.5
4143
*/
4244
public class IllegalClassFormatException extends Exception {
45+
46+
@Serial
4347
private static final long serialVersionUID = -3841736710924794009L;
4448

4549
/**

src/java.instrument/share/classes/java/lang/instrument/UnmodifiableClassException.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
2525

2626
package java.lang.instrument;
2727

28+
import java.io.Serial;
29+
2830
/**
2931
* Thrown by an implementation of
3032
* {@link java.lang.instrument.Instrumentation#redefineClasses Instrumentation.redefineClasses}
@@ -34,6 +36,8 @@
3436
* @since 1.5
3537
*/
3638
public class UnmodifiableClassException extends Exception {
39+
40+
@Serial
3741
private static final long serialVersionUID = 1716652643585309178L;
3842

3943
/**

src/java.instrument/share/classes/java/lang/instrument/UnmodifiableModuleException.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,17 @@
2525

2626
package java.lang.instrument;
2727

28+
import java.io.Serial;
29+
2830
/**
2931
* Thrown to indicate that a module cannot be modified.
3032
*
3133
* @see Instrumentation#redefineModule
3234
* @since 9
3335
*/
34-
3536
public class UnmodifiableModuleException extends RuntimeException {
37+
38+
@Serial
3639
private static final long serialVersionUID = 6912511912351080644L;
3740

3841
/**

0 commit comments

Comments
 (0)