Skip to content

Instantly share code, notes, and snippets.

@rotty3000
Last active December 19, 2015 06:38
Show Gist options
  • Save rotty3000/5912459 to your computer and use it in GitHub Desktop.
Save rotty3000/5912459 to your computer and use it in GitHub Desktop.
using the @SinceJava annotation
@@ -15,4 +15,6 @@
package com.liferay.portal.dao.jdbc.util;
+import com.liferay.portal.tools.sourceformatter.SinceJava;
+
import java.io.PrintWriter;
@@ -55,8 +57,6 @@ public class DataSourceWrapper implements DataSource {
}
+ @SinceJava(1.7)
public Logger getParentLogger() {
-
- // JDK 7
-
throw new UnsupportedOperationException();
}
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.tools.sourceformatter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Raymond Augé
*/
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
public @interface SinceJava {
public double value() default 1.6;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment