Comments (7)
@carlosmiranda This task is yours, please go ahead keeping in mind this. If any questions, don't hesitate to ask right here
from jcabi-matchers.
@carlosmiranda Task's budget is 30 mins (see this for explanation)
from jcabi-matchers.
This is a limitation of the Java Generics facility. The problem is, the type of new JAXBElement<Object>
and the return type of object.getClass
is Class<? extends Object>
are determined at compile time, while the actual class of object
is known at runtime. I can't think of any way to make this compile without having to suppress warnings.
The best that can be done to my knowledge is to create a variable inside the method and move the suppression to the variable to reduce the scope of the suppression:
@SuppressWarnings("unchecked")
Class<Object> type = (Class<Object>) object.getClass();
subject = new JAXBElement<Object>(
JaxbConverter.qname(object),
(Class<Object>) object.getClass(),
object
);
@yegor256 , what do you think?
from jcabi-matchers.
yes, I agree, let's do it
from jcabi-matchers.
I made a pull request in #4, please review.
from jcabi-matchers.
@carlosmiranda Thank you, I've added 30 mins to your account in payment/transaction "39063127
"
from jcabi-matchers.
Closed, thanks all
from jcabi-matchers.
Related Issues (20)
- Estimate project size HOT 7
- 1.4 HOT 3
- Indie tech review no.1 HOT 1
- Build failed on windows with lots of EOL violations HOT 3
- XhtmlMatchers.hasXPaths should print which matcher failed HOT 14
- <<< FAILURE! - in com.jcabi.matchers.NoBrokenLinksTest HOT 4
- XhtmlMatchers.hasXPath throws IllegalArgumentException HOT 3
- Please add xhtml example HOT 3
- Allow matching extracted XPath HOT 1
- Do not require namespace for xmlns without prefix HOT 1
- jcabi-w3c 1.3 HOT 3
- jcabi-matchers vc cactoos-matchers HOT 6
- Make matchers that comply with EO HOT 2
- Make com.jcabi.matchers.XPathMatcher public HOT 5
- Update parent to 1.25.1 HOT 29
- Update rultor configuration HOT 4
- upgrade to jcabi 1.27.0 HOT 3
- saxon up to 11 HOT 4
- Dependency Dashboard
- refresh HOT 4
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 jcabi-matchers.