Jochen Sprickerhof pushed to branch master at Debian Java Maintainers / osgi-core
Commits: 94615390 by Jochen Sprickerhof at 2023-04-03T14:56:24+02:00 Preserve backward compatibility in logging interface Turned the new interface methods into default methods to preserve the backward compatibility. Taken from osgi-compendium. Closes: #1026606 - - - - - 68bfe87e by Jochen Sprickerhof at 2023-04-03T14:57:41+02:00 Update changelog for 8.0.0-2 release - - - - - 3 changed files: - debian/changelog - + debian/patches/01-backward-compatibility.patch - + debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,12 @@ +osgi-core (8.0.0-2) unstable; urgency=medium + + * Team upload. + * Preserve backward compatibility in logging interface. + Turned the new interface methods into default methods to preserve the + backward compatibility. Taken from osgi-compendium. (Closes: #1026606) + + -- Jochen Sprickerhof <[email protected]> Mon, 03 Apr 2023 14:57:28 +0200 + osgi-core (8.0.0-1) unstable; urgency=medium * Team upload. ===================================== debian/patches/01-backward-compatibility.patch ===================================== @@ -0,0 +1,95 @@ +Description: Preserves the source compatibility with older versions of the API +Author: Emmanuel Bourg <[email protected]> +Forwarded: not-needed +--- a/org/osgi/service/log/LoggerFactory.java ++++ b/org/osgi/service/log/LoggerFactory.java +@@ -61,7 +61,7 @@ + * parameter is equal to {@link Logger#ROOT_LOGGER_NAME}, then the + * root logger is returned. + */ +- Logger getLogger(String name); ++ default Logger getLogger(String name) { throw new UnsupportedOperationException(); } + + /** + * Return the {@link Logger} named with the specified class. +@@ -70,7 +70,7 @@ + * {@code null}. + * @return The {@link Logger} named with the name of the specified class. + */ +- Logger getLogger(Class< ? > clazz); ++ default Logger getLogger(Class< ? > clazz) { throw new UnsupportedOperationException(); } + + /** + * Return the {@link Logger} of the specified type named with the specified +@@ -88,7 +88,7 @@ + * @throws IllegalArgumentException If the specified type is not a supported + * Logger type. + */ +- <L extends Logger> L getLogger(String name, Class<L> loggerType); ++ default <L extends Logger> L getLogger(String name, Class<L> loggerType) { throw new UnsupportedOperationException(); } + + /** + * Return the {@link Logger} of the specified type named with the specified +@@ -104,7 +104,7 @@ + * @throws IllegalArgumentException If the specified type is not a supported + * Logger type. + */ +- <L extends Logger> L getLogger(Class< ? > clazz, Class<L> loggerType); ++ default <L extends Logger> L getLogger(Class< ? > clazz, Class<L> loggerType) {throw new UnsupportedOperationException(); } + + /** + * Return the {@link Logger} of the specified type named with the specified +@@ -130,6 +130,6 @@ + * @throws IllegalArgumentException If the specified type is not a supported + * Logger type or the specified Bundle is not a resolved bundle. + */ +- <L extends Logger> L getLogger(Bundle bundle, String name, +- Class<L> loggerType); ++ default <L extends Logger> L getLogger(Bundle bundle, String name, ++ Class<L> loggerType) { throw new UnsupportedOperationException(); } + } +--- a/org/osgi/service/log/LogEntry.java ++++ b/org/osgi/service/log/LogEntry.java +@@ -111,7 +111,7 @@ + * @return The level of this {@code LogEntry} object. + * @since 1.4 + */ +- LogLevel getLogLevel(); ++ default LogLevel getLogLevel() { throw new UnsupportedOperationException(); } + + /** + * Returns the name of the {@link Logger} object used to create this +@@ -121,7 +121,7 @@ + * {@code LogEntry} object. + * @since 1.4 + */ +- String getLoggerName(); ++ default String getLoggerName() { throw new UnsupportedOperationException(); } + + /** + * Returns the sequence number for this {@code LogEntry} object. +@@ -133,7 +133,7 @@ + * @return The sequence number for this {@code LogEntry} object. + * @since 1.4 + */ +- long getSequence(); ++ default long getSequence() { throw new UnsupportedOperationException(); } + + /** + * Returns a string representing the thread which created this +@@ -146,7 +146,7 @@ + * {@code LogEntry} object. + * @since 1.4 + */ +- String getThreadInfo(); ++ default String getThreadInfo() { throw new UnsupportedOperationException(); } + + /** + * Returns the location information of the creation of this {@code LogEntry} +@@ -156,5 +156,5 @@ + * object. + * @since 1.4 + */ +- StackTraceElement getLocation(); ++ default StackTraceElement getLocation() { throw new UnsupportedOperationException(); } + } ===================================== debian/patches/series ===================================== @@ -0,0 +1 @@ +01-backward-compatibility.patch View it on GitLab: https://salsa.debian.org/java-team/osgi-core/-/compare/21b976230087bb7a852f0c8776e9d4c5c6d9c1d6...68bfe87e2a340db8162de0c96395c2e42cd6336d -- View it on GitLab: https://salsa.debian.org/java-team/osgi-core/-/compare/21b976230087bb7a852f0c8776e9d4c5c6d9c1d6...68bfe87e2a340db8162de0c96395c2e42cd6336d You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

